diff --git a/CMakeLists.txt b/CMakeLists.txt index 949e329a..10f261a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -234,14 +234,9 @@ target_link_libraries(sACNView PRIVATE ${SACNVIEW_QT_LIBRARIES}) # Link PCap/WinPCap libraries target_link_libraries(sACNView PRIVATE ${PCAP_LIBS}) - -if(WIN32) - # Copy WinPCap DLLs - foreach(DLLFILE IN LISTS PCAP_LIBS) - add_custom_command (TARGET sACNView POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different - $ $) - endforeach() +if(MSVC) + target_link_libraries(sACNView PRIVATE delayimp) + target_link_options(sACNView PRIVATE "/DELAYLOAD:wpcap.dll") endif() # Blake2 diff --git a/install/install.cmake b/install/install.cmake index 75457a62..f9daf5cd 100644 --- a/install/install.cmake +++ b/install/install.cmake @@ -41,13 +41,6 @@ COMMAND ${CMAKE_COMMAND} -E copy_if_different $ ${SACNVIEW_DEPLOY_DIR}) - # Copy WinPCap DLLs - foreach(DLLFILE IN LISTS PCAP_LIBS) - add_custom_command (TARGET sACNView POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different - $ ${SACNVIEW_DEPLOY_DIR}) - endforeach() - # Run makensis if is installed in default location if(EXISTS ${SACNVIEW_MAKENSIS_FILE}) if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "AMD64") diff --git a/libs/WinPcap-413-173-b4.7z b/libs/WinPcap-413-173-b4.7z deleted file mode 100644 index dec658b4..00000000 Binary files a/libs/WinPcap-413-173-b4.7z and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/Bin/Packet.dll b/libs/WinPcap-413-173-b4/Bin/Packet.dll deleted file mode 100644 index 6b15cfa1..00000000 Binary files a/libs/WinPcap-413-173-b4/Bin/Packet.dll and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/Bin/wpcap.dll b/libs/WinPcap-413-173-b4/Bin/wpcap.dll deleted file mode 100644 index 0668eab6..00000000 Binary files a/libs/WinPcap-413-173-b4/Bin/wpcap.dll and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/Bin/x64/Packet.dll b/libs/WinPcap-413-173-b4/Bin/x64/Packet.dll deleted file mode 100644 index 57c9cfa7..00000000 Binary files a/libs/WinPcap-413-173-b4/Bin/x64/Packet.dll and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/Bin/x64/wpcap.dll b/libs/WinPcap-413-173-b4/Bin/x64/wpcap.dll deleted file mode 100644 index 3c48c1a1..00000000 Binary files a/libs/WinPcap-413-173-b4/Bin/x64/wpcap.dll and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/Include/Packet32.h b/libs/WinPcap-413-173-b4/Include/Packet32.h deleted file mode 100644 index e24622cb..00000000 --- a/libs/WinPcap-413-173-b4/Include/Packet32.h +++ /dev/null @@ -1,361 +0,0 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** @ingroup packetapi - * @{ - */ - -/** @defgroup packet32h Packet.dll definitions and data structures - * Packet32.h contains the data structures and the definitions used by packet.dll. - * The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included - * by the applications that use the functions of this library - * @{ - */ - -#ifndef __PACKET32 -#define __PACKET32 - -#include - -#ifdef HAVE_AIRPCAP_API -#include -#else -#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) -#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ -typedef struct _AirpcapHandle *PAirpcapHandle; -#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */ -#endif /* HAVE_AIRPCAP_API */ - -#ifdef HAVE_DAG_API -#include -#endif /* HAVE_DAG_API */ - -// Working modes -#define PACKET_MODE_CAPT 0x0 ///< Capture mode -#define PACKET_MODE_STAT 0x1 ///< Statistical mode -#define PACKET_MODE_MON 0x2 ///< Monitoring mode -#define PACKET_MODE_DUMP 0x10 ///< Dump mode -#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode - - -/// Alignment macro. Defines the alignment size. -#define Packet_ALIGNMENT sizeof(int) -/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT. -#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1)) - -#define NdisMediumNull -1 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumCHDLC -2 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumPPPSerial -3 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumBare80211 -4 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumRadio80211 -5 ///< Custom linktype: NDIS doesn't provide an equivalent -#define NdisMediumPpi -6 ///< Custom linktype: NDIS doesn't provide an equivalent - -// Loopback behaviour definitions -#define NPF_DISABLE_LOOPBACK 1 ///< Drop the packets sent by the NPF driver -#define NPF_ENABLE_LOOPBACK 2 ///< Capture the packets sent by the NPF driver - -/*! - \brief Network type structure. - - This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed. -*/ -typedef struct NetType -{ - UINT LinkType; ///< The MAC of the current network adapter (see function PacketGetNetType() for more information) - ULONGLONG LinkSpeed; ///< The speed of the network in bits per second -}NetType; - - -//some definitions stolen from libpcap - -#ifndef BPF_MAJOR_VERSION - -/*! - \brief A BPF pseudo-assembly program. - - The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. -*/ -#ifndef lib_pcap_bpf_h -struct bpf_program -{ - UINT bf_len; ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow. - struct bpf_insn *bf_insns; ///< A pointer to the first instruction of the program. -}; - -/*! - \brief A single BPF pseudo-instruction. - - bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver. -*/ -struct bpf_insn -{ - USHORT code; ///< Instruction type and addressing mode. - UCHAR jt; ///< Jump if true - UCHAR jf; ///< Jump if false - int k; ///< Generic field used for various purposes. -}; -#endif // lib_pcap_bpf_h - -/*! - \brief Structure that contains a couple of statistics values on the current capture. - - It is used by packet.dll to return statistics about a capture session. -*/ -struct bpf_stat -{ - UINT bs_recv; ///< Number of packets that the driver received from the network adapter - ///< from the beginning of the current capture. This value includes the packets - ///< lost by the driver. - UINT bs_drop; ///< number of packets that the driver lost from the beginning of a capture. - ///< Basically, a packet is lost when the the buffer of the driver is full. - ///< In this situation the packet cannot be stored and the driver rejects it. - UINT ps_ifdrop; ///< drops by interface. XXX not yet supported - UINT bs_capt; ///< number of packets that pass the filter, find place in the kernel buffer and - ///< thus reach the application. -}; - -/*! - \brief Packet header. - - This structure defines the header associated with every packet delivered to the application. -*/ -struct bpf_hdr -{ - struct timeval bh_tstamp; ///< The timestamp associated with the captured packet. - ///< It is stored in a TimeVal structure. - UINT bh_caplen; ///< Length of captured portion. The captured portion can be different - ///< from the original packet, because it is possible (with a proper filter) - ///< to instruct the driver to capture only a portion of the packets. - UINT bh_datalen; ///< Original length of packet - USHORT bh_hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases, - ///< a padding could be added between the end of this structure and the packet - ///< data for performance reasons. This filed can be used to retrieve the actual data - ///< of the packet. -}; - -/*! - \brief Dump packet header. - - This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets(). - It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a - packet in a dump file. This makes straightforward sending WinPcap dump files to the network. -*/ -struct dump_bpf_hdr{ - struct timeval ts; ///< Time stamp of the packet - UINT caplen; ///< Length of captured portion. The captured portion can smaller than the - ///< the original packet, because it is possible (with a proper filter) to - ///< instruct the driver to capture only a portion of the packets. - UINT len; ///< Length of the original packet (off wire). -}; - - -#endif - -struct bpf_stat; - -#define DOSNAMEPREFIX TEXT("Packet_") ///< Prefix added to the adapters device names to create the WinPcap devices -#define MAX_LINK_NAME_LENGTH 64 //< Maximum length of the devices symbolic links -#define NMAX_PACKET 65535 - -/*! - \brief Addresses of a network adapter. - - This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with - an adapter. -*/ -typedef struct npf_if_addr { - struct sockaddr_storage IPAddress; ///< IP address. - struct sockaddr_storage SubnetMask; ///< Netmask for that address. - struct sockaddr_storage Broadcast; ///< Broadcast address. -}npf_if_addr; - - -#define ADAPTER_NAME_LENGTH 256 + 12 ///< Maximum length for the name of an adapter. The value is the same used by the IP Helper API. -#define ADAPTER_DESC_LENGTH 128 ///< Maximum length for the description of an adapter. The value is the same used by the IP Helper API. -#define MAX_MAC_ADDR_LENGTH 8 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. -#define MAX_NETWORK_ADDRESSES 16 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. - - -typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API -typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API - -#define INFO_FLAG_NDIS_ADAPTER 0 ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter -#define INFO_FLAG_NDISWAN_ADAPTER 1 ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET -#define INFO_FLAG_DAG_CARD 2 ///< Flag for ADAPTER_INFO: this is a DAG card -#define INFO_FLAG_DAG_FILE 6 ///< Flag for ADAPTER_INFO: this is a DAG file -#define INFO_FLAG_DONT_EXPORT 8 ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones. -#define INFO_FLAG_AIRPCAP_CARD 16 ///< Flag for ADAPTER_INFO: this is an airpcap card -#define INFO_FLAG_NPFIM_DEVICE 32 - -/*! - \brief Describes an opened network adapter. - - This structure is the most important for the functioning of packet.dll, but the great part of its fields - should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters -*/ -typedef struct _ADAPTER { - HANDLE hFile; ///< \internal Handle to an open instance of the NPF driver. - CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened. - int NumWrites; ///< \internal Number of times a packets written on this adapter will be repeated - ///< on the wire. - HANDLE ReadEvent; ///< A notification event associated with the read calls on the adapter. - ///< It can be passed to standard Win32 functions (like WaitForSingleObject - ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some - ///< data. It is particularly useful in GUI applications that need to wait - ///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy() - ///< function can be used to define the minimum amount of data in the kernel buffer - ///< that will cause the event to be signalled. - - UINT ReadTimeOut; ///< \internal The amount of time after which a read on the driver will be released and - ///< ReadEvent will be signaled, also if no packets were captured - CHAR Name[ADAPTER_NAME_LENGTH]; - PWAN_ADAPTER pWanAdapter; - UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API. - -#ifdef HAVE_AIRPCAP_API - PAirpcapHandle AirpcapAd; -#endif // HAVE_AIRPCAP_API - -#ifdef HAVE_NPFIM_API - void* NpfImHandle; -#endif // HAVE_NPFIM_API - -#ifdef HAVE_DAG_API - dagc_t *pDagCard; ///< Pointer to the dagc API adapter descriptor for this adapter - PCHAR DagBuffer; ///< Pointer to the buffer with the packets that is received from the DAG card - struct timeval DagReadTimeout; ///< Read timeout. The dagc API requires a timeval structure - unsigned DagFcsLen; ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry - DWORD DagFastProcess; ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps). -#endif // HAVE_DAG_API -} ADAPTER, *LPADAPTER; - -/*! - \brief Structure that contains a group of packets coming from the driver. - - This structure defines the header associated with every packet delivered to the application. -*/ -typedef struct _PACKET { - HANDLE hEvent; ///< \deprecated Still present for compatibility with old applications. - OVERLAPPED OverLapped; ///< \deprecated Still present for compatibility with old applications. - PVOID Buffer; ///< Buffer with containing the packets. See the PacketReceivePacket() for - ///< details about the organization of the data in this buffer - UINT Length; ///< Length of the buffer - DWORD ulBytesReceived; ///< Number of valid bytes present in the buffer, i.e. amount of data - ///< received by the last call to PacketReceivePacket() - BOOLEAN bIoComplete; ///< \deprecated Still present for compatibility with old applications. -} PACKET, *LPPACKET; - -/*! - \brief Structure containing an OID request. - - It is used by the PacketRequest() function to send an OID to the interface card driver. - It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, - the list of the multicast groups defined on it, and so on. -*/ -struct _PACKET_OID_DATA { - ULONG Oid; ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h - ///< for a complete list of valid codes. - ULONG Length; ///< Length of the data field - UCHAR Data[1]; ///< variable-lenght field that contains the information passed to or received - ///< from the adapter. -}; -typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA; - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @} - */ - -/* -BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName, - CHAR *Value, - UINT *pValueLen, - CHAR *DefaultVal); - -BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName, - WCHAR *Value, - UINT *pValueLen, - WCHAR *DefaultVal); -*/ - -//--------------------------------------------------------------------------- -// EXPORTED FUNCTIONS -//--------------------------------------------------------------------------- - -PCHAR PacketGetVersion(); -PCHAR PacketGetDriverVersion(); -BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes); -BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites); -BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode); -BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout); -BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp); -BOOLEAN PacketSetLoopbackBehavior(LPADAPTER AdapterObject, UINT LoopbackBehavior); -INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen); -BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s); -BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s); -BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim); -BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type); -LPADAPTER PacketOpenAdapter(PCHAR AdapterName); -BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync); -INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync); -LPPACKET PacketAllocatePacket(void); -VOID PacketInitPacket(LPPACKET lpPacket,PVOID Buffer,UINT Length); -VOID PacketFreePacket(LPPACKET lpPacket); -BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync); -BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter); -BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize); -BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr* buffer, PLONG NEntries); -BOOLEAN PacketRequest(LPADAPTER AdapterObject,BOOLEAN Set,PPACKET_OID_DATA OidData); -HANDLE PacketGetReadEvent(LPADAPTER AdapterObject); -BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len); -BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks); -BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync); -BOOL PacketStopDriver(); -VOID PacketCloseAdapter(LPADAPTER lpAdapter); -BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength); -BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags); -PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject); - -// -// Used by PacketStartOemEx -// -#define PACKET_START_OEM_NO_NETMON 0x00000001 - -#ifdef __cplusplus -} -#endif - -#endif //__PACKET32 diff --git a/libs/WinPcap-413-173-b4/Include/pcap/ipnet.h b/libs/WinPcap-413-173-b4/Include/pcap/ipnet.h deleted file mode 100644 index 53308470..00000000 --- a/libs/WinPcap-413-173-b4/Include/pcap/ipnet.h +++ /dev/null @@ -1,43 +0,0 @@ -/*- - * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from the Stanford/CMU enet packet filter, - * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence - * Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#define IPH_AF_INET 2 /* Matches Solaris's AF_INET */ -#define IPH_AF_INET6 26 /* Matches Solaris's AF_INET6 */ - -#define IPNET_OUTBOUND 1 -#define IPNET_INBOUND 2 diff --git a/libs/WinPcap-413-173-b4/Include/pcap/nflog.h b/libs/WinPcap-413-173-b4/Include/pcap/nflog.h deleted file mode 100644 index 388dd0c5..00000000 --- a/libs/WinPcap-413-173-b4/Include/pcap/nflog.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 2013, Petar Alilovic, - * Faculty of Electrical Engineering and Computing, University of Zagreb - * All rights reserved - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - */ - -#ifndef _PCAP_NFLOG_H__ -#define _PCAP_NFLOG_H__ - -/* - * Structure of an NFLOG header and TLV parts, as described at - * http://www.tcpdump.org/linktypes/LINKTYPE_NFLOG.html - * - * The NFLOG header is big-endian. - * - * The TLV length and type are in host byte order. The value is either - * big-endian or is an array of bytes in some externally-specified byte - * order (text string, link-layer address, link-layer header, packet - * data, etc.). - */ -typedef struct nflog_hdr { - u_int8_t nflog_family; /* address family */ - u_int8_t nflog_version; /* version */ - u_int16_t nflog_rid; /* resource ID */ -} nflog_hdr_t; - -typedef struct nflog_tlv { - u_int16_t tlv_length; /* tlv length */ - u_int16_t tlv_type; /* tlv type */ - /* value follows this */ -} nflog_tlv_t; - -typedef struct nflog_packet_hdr { - u_int16_t hw_protocol; /* hw protocol */ - u_int8_t hook; /* netfilter hook */ - u_int8_t pad; /* padding to 32 bits */ -} nflog_packet_hdr_t; - -typedef struct nflog_hwaddr { - u_int16_t hw_addrlen; /* address length */ - u_int16_t pad; /* padding to 32-bit boundary */ - u_int8_t hw_addr[8]; /* address, up to 8 bytes */ -} nflog_hwaddr_t; - -typedef struct nflog_timestamp { - u_int64_t sec; - u_int64_t usec; -} nflog_timestamp_t; - -/* - * TLV types. - */ -#define NFULA_PACKET_HDR 1 /* nflog_packet_hdr_t */ -#define NFULA_MARK 2 /* packet mark from skbuff */ -#define NFULA_TIMESTAMP 3 /* nflog_timestamp_t for skbuff's time stamp */ -#define NFULA_IFINDEX_INDEV 4 /* ifindex of device on which packet received (possibly bridge group) */ -#define NFULA_IFINDEX_OUTDEV 5 /* ifindex of device on which packet transmitted (possibly bridge group) */ -#define NFULA_IFINDEX_PHYSINDEV 6 /* ifindex of physical device on which packet received (not bridge group) */ -#define NFULA_IFINDEX_PHYSOUTDEV 7 /* ifindex of physical device on which packet transmitted (not bridge group) */ -#define NFULA_HWADDR 8 /* nflog_hwaddr_t for hardware address */ -#define NFULA_PAYLOAD 9 /* packet payload */ -#define NFULA_PREFIX 10 /* text string - null-terminated, count includes NUL */ -#define NFULA_UID 11 /* UID owning socket on which packet was sent/received */ -#define NFULA_SEQ 12 /* sequence number of packets on this NFLOG socket */ -#define NFULA_SEQ_GLOBAL 13 /* sequence number of pakets on all NFLOG sockets */ -#define NFULA_GID 14 /* GID owning socket on which packet was sent/received */ -#define NFULA_HWTYPE 15 /* ARPHRD_ type of skbuff's device */ -#define NFULA_HWHEADER 16 /* skbuff's MAC-layer header */ -#define NFULA_HWLEN 17 /* length of skbuff's MAC-layer header */ - -#endif diff --git a/libs/WinPcap-413-173-b4/Include/pcap/pcap.h b/libs/WinPcap-413-173-b4/Include/pcap/pcap.h deleted file mode 100644 index 4c43d9f4..00000000 --- a/libs/WinPcap-413-173-b4/Include/pcap/pcap.h +++ /dev/null @@ -1,485 +0,0 @@ -/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ -/* - * Copyright (c) 1993, 1994, 1995, 1996, 1997 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the Computer Systems - * Engineering Group at Lawrence Berkeley Laboratory. - * 4. Neither the name of the University nor of the Laboratory may be used - * to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef lib_pcap_pcap_h -#define lib_pcap_pcap_h - -#if defined(_WIN32) - #include -#elif defined(MSDOS) - #include - #include /* u_int, u_char etc. */ -#else /* UN*X */ - #include - #include -#endif /* _WIN32/MSDOS/UN*X */ - -#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H -#include -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Version number of the current version of the pcap file format. - * - * NOTE: this is *NOT* the version number of the libpcap library. - * To fetch the version information for the version of libpcap - * you're using, use pcap_lib_version(). - */ -#define PCAP_VERSION_MAJOR 2 -#define PCAP_VERSION_MINOR 4 - -#define PCAP_ERRBUF_SIZE 256 - -/* - * Compatibility for systems that have a bpf.h that - * predates the bpf typedefs for 64-bit support. - */ -#if BPF_RELEASE - 0 < 199406 -typedef int bpf_int32; -typedef u_int bpf_u_int32; -#endif - -typedef struct pcap pcap_t; -typedef struct pcap_dumper pcap_dumper_t; -typedef struct pcap_if pcap_if_t; -typedef struct pcap_addr pcap_addr_t; - -/* - * The first record in the file contains saved values for some - * of the flags used in the printout phases of tcpdump. - * Many fields here are 32 bit ints so compilers won't insert unwanted - * padding; these files need to be interchangeable across architectures. - * - * Do not change the layout of this structure, in any way (this includes - * changes that only affect the length of fields in this structure). - * - * Also, do not change the interpretation of any of the members of this - * structure, in any way (this includes using values other than - * LINKTYPE_ values, as defined in "savefile.c", in the "linktype" - * field). - * - * Instead: - * - * introduce a new structure for the new format, if the layout - * of the structure changed; - * - * send mail to "tcpdump-workers@lists.tcpdump.org", requesting - * a new magic number for your new capture file format, and, when - * you get the new magic number, put it in "savefile.c"; - * - * use that magic number for save files with the changed file - * header; - * - * make the code in "savefile.c" capable of reading files with - * the old file header as well as files with the new file header - * (using the magic number to determine the header format). - * - * Then supply the changes by forking the branch at - * - * https://github.com/the-tcpdump-group/libpcap/issues - * - * and issuing a pull request, so that future versions of libpcap and - * programs that use it (such as tcpdump) will be able to read your new - * capture file format. - */ -struct pcap_file_header { - bpf_u_int32 magic; - u_short version_major; - u_short version_minor; - bpf_int32 thiszone; /* gmt to local correction */ - bpf_u_int32 sigfigs; /* accuracy of timestamps */ - bpf_u_int32 snaplen; /* max length saved portion of each pkt */ - bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */ -}; - -/* - * Macros for the value returned by pcap_datalink_ext(). - * - * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro - * gives the FCS length of packets in the capture. - */ -#define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000) -#define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28) -#define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000) - -typedef enum { - PCAP_D_INOUT = 0, - PCAP_D_IN, - PCAP_D_OUT -} pcap_direction_t; - -/* - * Generic per-packet information, as supplied by libpcap. - * - * The time stamp can and should be a "struct timeval", regardless of - * whether your system supports 32-bit tv_sec in "struct timeval", - * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit - * and 64-bit applications. The on-disk format of savefiles uses 32-bit - * tv_sec (and tv_usec); this structure is irrelevant to that. 32-bit - * and 64-bit versions of libpcap, even if they're on the same platform, - * should supply the appropriate version of "struct timeval", even if - * that's not what the underlying packet capture mechanism supplies. - */ -struct pcap_pkthdr { - struct timeval ts; /* time stamp */ - bpf_u_int32 caplen; /* length of portion present */ - bpf_u_int32 len; /* length this packet (off wire) */ -}; - -/* - * As returned by the pcap_stats() - */ -struct pcap_stat { - u_int ps_recv; /* number of packets received */ - u_int ps_drop; /* number of packets dropped */ - u_int ps_ifdrop; /* drops by interface -- only supported on some platforms */ -#ifdef _WIN32 - u_int bs_capt; /* number of packets that reach the application */ -#endif /* _WIN32 */ -}; - -#ifdef MSDOS -/* - * As returned by the pcap_stats_ex() - */ -struct pcap_stat_ex { - u_long rx_packets; /* total packets received */ - u_long tx_packets; /* total packets transmitted */ - u_long rx_bytes; /* total bytes received */ - u_long tx_bytes; /* total bytes transmitted */ - u_long rx_errors; /* bad packets received */ - u_long tx_errors; /* packet transmit problems */ - u_long rx_dropped; /* no space in Rx buffers */ - u_long tx_dropped; /* no space available for Tx */ - u_long multicast; /* multicast packets received */ - u_long collisions; - - /* detailed rx_errors: */ - u_long rx_length_errors; - u_long rx_over_errors; /* receiver ring buff overflow */ - u_long rx_crc_errors; /* recv'd pkt with crc error */ - u_long rx_frame_errors; /* recv'd frame alignment error */ - u_long rx_fifo_errors; /* recv'r fifo overrun */ - u_long rx_missed_errors; /* recv'r missed packet */ - - /* detailed tx_errors */ - u_long tx_aborted_errors; - u_long tx_carrier_errors; - u_long tx_fifo_errors; - u_long tx_heartbeat_errors; - u_long tx_window_errors; - }; -#endif - -/* - * Item in a list of interfaces. - */ -struct pcap_if { - struct pcap_if *next; - char *name; /* name to hand to "pcap_open_live()" */ - char *description; /* textual description of interface, or NULL */ - struct pcap_addr *addresses; - bpf_u_int32 flags; /* PCAP_IF_ interface flags */ -}; - -#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */ -#define PCAP_IF_UP 0x00000002 /* interface is up */ -#define PCAP_IF_RUNNING 0x00000004 /* interface is running */ - -/* - * Representation of an interface address. - */ -struct pcap_addr { - struct pcap_addr *next; - struct sockaddr *addr; /* address */ - struct sockaddr *netmask; /* netmask for that address */ - struct sockaddr *broadaddr; /* broadcast address for that address */ - struct sockaddr *dstaddr; /* P2P destination address for that address */ -}; - -typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *, - const u_char *); - -/* - * Error codes for the pcap API. - * These will all be negative, so you can check for the success or - * failure of a call that returns these codes by checking for a - * negative value. - */ -#define PCAP_ERROR -1 /* generic error code */ -#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */ -#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */ -#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */ -#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */ -#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */ -#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */ -#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */ -#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */ -#define PCAP_ERROR_CANTSET_TSTAMP_TYPE -10 /* this device doesn't support setting the time stamp type */ -#define PCAP_ERROR_PROMISC_PERM_DENIED -11 /* you don't have permission to capture in promiscuous mode */ -#define PCAP_ERROR_TSTAMP_PRECISION_NOTSUP -12 /* the requested time stamp precision is not supported */ - -/* - * Warning codes for the pcap API. - * These will all be positive and non-zero, so they won't look like - * errors. - */ -#define PCAP_WARNING 1 /* generic warning code */ -#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */ -#define PCAP_WARNING_TSTAMP_TYPE_NOTSUP 3 /* the requested time stamp type is not supported */ - -/* - * Value to pass to pcap_compile() as the netmask if you don't know what - * the netmask is. - */ -#define PCAP_NETMASK_UNKNOWN 0xffffffff - -char *pcap_lookupdev(char *); -int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *); - -pcap_t *pcap_create(const char *, char *); -int pcap_set_snaplen(pcap_t *, int); -int pcap_set_promisc(pcap_t *, int); -int pcap_can_set_rfmon(pcap_t *); -int pcap_set_rfmon(pcap_t *, int); -int pcap_set_timeout(pcap_t *, int); -int pcap_set_tstamp_type(pcap_t *, int); -int pcap_set_immediate_mode(pcap_t *, int); -int pcap_set_buffer_size(pcap_t *, int); -int pcap_set_tstamp_precision(pcap_t *, int); -int pcap_get_tstamp_precision(pcap_t *); -int pcap_activate(pcap_t *); - -int pcap_list_tstamp_types(pcap_t *, int **); -void pcap_free_tstamp_types(int *); -int pcap_tstamp_type_name_to_val(const char *); -const char *pcap_tstamp_type_val_to_name(int); -const char *pcap_tstamp_type_val_to_description(int); - -/* - * Time stamp types. - * Not all systems and interfaces will necessarily support all of these. - * - * A system that supports PCAP_TSTAMP_HOST is offering time stamps - * provided by the host machine, rather than by the capture device, - * but not committing to any characteristics of the time stamp; - * it will not offer any of the PCAP_TSTAMP_HOST_ subtypes. - * - * PCAP_TSTAMP_HOST_LOWPREC is a time stamp, provided by the host machine, - * that's low-precision but relatively cheap to fetch; it's normally done - * using the system clock, so it's normally synchronized with times you'd - * fetch from system calls. - * - * PCAP_TSTAMP_HOST_HIPREC is a time stamp, provided by the host machine, - * that's high-precision; it might be more expensive to fetch. It might - * or might not be synchronized with the system clock, and might have - * problems with time stamps for packets received on different CPUs, - * depending on the platform. - * - * PCAP_TSTAMP_ADAPTER is a high-precision time stamp supplied by the - * capture device; it's synchronized with the system clock. - * - * PCAP_TSTAMP_ADAPTER_UNSYNCED is a high-precision time stamp supplied by - * the capture device; it's not synchronized with the system clock. - * - * Note that time stamps synchronized with the system clock can go - * backwards, as the system clock can go backwards. If a clock is - * not in sync with the system clock, that could be because the - * system clock isn't keeping accurate time, because the other - * clock isn't keeping accurate time, or both. - * - * Note that host-provided time stamps generally correspond to the - * time when the time-stamping code sees the packet; this could - * be some unknown amount of time after the first or last bit of - * the packet is received by the network adapter, due to batching - * of interrupts for packet arrival, queueing delays, etc.. - */ -#define PCAP_TSTAMP_HOST 0 /* host-provided, unknown characteristics */ -#define PCAP_TSTAMP_HOST_LOWPREC 1 /* host-provided, low precision */ -#define PCAP_TSTAMP_HOST_HIPREC 2 /* host-provided, high precision */ -#define PCAP_TSTAMP_ADAPTER 3 /* device-provided, synced with the system clock */ -#define PCAP_TSTAMP_ADAPTER_UNSYNCED 4 /* device-provided, not synced with the system clock */ - -/* - * Time stamp resolution types. - * Not all systems and interfaces will necessarily support all of these - * resolutions when doing live captures; all of them can be requested - * when reading a savefile. - */ -#define PCAP_TSTAMP_PRECISION_MICRO 0 /* use timestamps with microsecond precision, default */ -#define PCAP_TSTAMP_PRECISION_NANO 1 /* use timestamps with nanosecond precision */ - -pcap_t *pcap_open_live(const char *, int, int, int, char *); -pcap_t *pcap_open_dead(int, int); -pcap_t *pcap_open_dead_with_tstamp_precision(int, int, u_int); -pcap_t *pcap_open_offline_with_tstamp_precision(const char *, u_int, char *); -pcap_t *pcap_open_offline(const char *, char *); -#if defined(_WIN32) -pcap_t *pcap_hopen_offline_with_tstamp_precision(intptr_t, u_int, char *); -pcap_t *pcap_hopen_offline(intptr_t, char *); -#if !defined(LIBPCAP_EXPORTS) -#define pcap_fopen_offline_with_tstamp_precision(f,p,b) \ - pcap_hopen_offline_with_tstamp_precision(_get_osfhandle(_fileno(f)), p, b) -#define pcap_fopen_offline(f,b) \ - pcap_hopen_offline(_get_osfhandle(_fileno(f)), b) -#else /*LIBPCAP_EXPORTS*/ -static pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *, u_int, char *); -static pcap_t *pcap_fopen_offline(FILE *, char *); -#endif -#else /*_WIN32*/ -pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *, u_int, char *); -pcap_t *pcap_fopen_offline(FILE *, char *); -#endif /*_WIN32*/ - -void pcap_close(pcap_t *); -int pcap_loop(pcap_t *, int, pcap_handler, u_char *); -int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); -const u_char* - pcap_next(pcap_t *, struct pcap_pkthdr *); -int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **); -void pcap_breakloop(pcap_t *); -int pcap_stats(pcap_t *, struct pcap_stat *); -int pcap_setfilter(pcap_t *, struct bpf_program *); -int pcap_setdirection(pcap_t *, pcap_direction_t); -int pcap_getnonblock(pcap_t *, char *); -int pcap_setnonblock(pcap_t *, int, char *); -int pcap_inject(pcap_t *, const void *, size_t); -int pcap_sendpacket(pcap_t *, const u_char *, int); -const char *pcap_statustostr(int); -const char *pcap_strerror(int); -char *pcap_geterr(pcap_t *); -void pcap_perror(pcap_t *, char *); -int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, - bpf_u_int32); -int pcap_compile_nopcap(int, int, struct bpf_program *, - const char *, int, bpf_u_int32); -void pcap_freecode(struct bpf_program *); -int pcap_offline_filter(const struct bpf_program *, - const struct pcap_pkthdr *, const u_char *); -int pcap_datalink(pcap_t *); -int pcap_datalink_ext(pcap_t *); -int pcap_list_datalinks(pcap_t *, int **); -int pcap_set_datalink(pcap_t *, int); -void pcap_free_datalinks(int *); -int pcap_datalink_name_to_val(const char *); -const char *pcap_datalink_val_to_name(int); -const char *pcap_datalink_val_to_description(int); -int pcap_snapshot(pcap_t *); -int pcap_is_swapped(pcap_t *); -int pcap_major_version(pcap_t *); -int pcap_minor_version(pcap_t *); - -/* XXX */ -FILE *pcap_file(pcap_t *); -int pcap_fileno(pcap_t *); - -pcap_dumper_t *pcap_dump_open(pcap_t *, const char *); -pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp); -pcap_dumper_t *pcap_dump_open_append(pcap_t *, const char *); -FILE *pcap_dump_file(pcap_dumper_t *); -long pcap_dump_ftell(pcap_dumper_t *); -int pcap_dump_flush(pcap_dumper_t *); -void pcap_dump_close(pcap_dumper_t *); -void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); - -int pcap_findalldevs(pcap_if_t **, char *); -void pcap_freealldevs(pcap_if_t *); - -const char *pcap_lib_version(void); - -/* - * On at least some versions of NetBSD and QNX, we don't want to declare - * bpf_filter() here, as it's also be declared in , with a - * different signature, but, on other BSD-flavored UN*Xes, it's not - * declared in , so we *do* want to declare it here, so it's - * declared when we build pcap-bpf.c. - */ -#if !defined(__NetBSD__) && !defined(__QNX__) -u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -#endif -int bpf_validate(const struct bpf_insn *f, int len); -char *bpf_image(const struct bpf_insn *, int); -void bpf_dump(const struct bpf_program *, int); - -#if defined(_WIN32) - -/* - * Win32 definitions - */ - -int pcap_setbuff(pcap_t *p, int dim); -int pcap_setmode(pcap_t *p, int mode); -int pcap_setmintocopy(pcap_t *p, int size); -struct _ADAPTER* pcap_get_adapter(pcap_t *p); - -#ifdef WPCAP -/* Include file with the wpcap-specific extensions */ -#include -#endif /* WPCAP */ - -#define MODE_CAPT 0 -#define MODE_STAT 1 -#define MODE_MON 2 - -#elif defined(MSDOS) - -/* - * MS-DOS definitions - */ - -int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *); -void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait); -u_long pcap_mac_packets (void); - -#else /* UN*X */ - -/* - * UN*X definitions - */ - -int pcap_get_selectable_fd(pcap_t *); - -#endif /* _WIN32/MSDOS/UN*X */ - -#ifdef __cplusplus -} -#endif - -#endif /* lib_pcap_pcap_h */ diff --git a/libs/WinPcap-413-173-b4/Lib/Packet.lib b/libs/WinPcap-413-173-b4/Lib/Packet.lib deleted file mode 100644 index 34bb7b32..00000000 Binary files a/libs/WinPcap-413-173-b4/Lib/Packet.lib and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/Lib/wpcap.lib b/libs/WinPcap-413-173-b4/Lib/wpcap.lib deleted file mode 100644 index 59152faf..00000000 Binary files a/libs/WinPcap-413-173-b4/Lib/wpcap.lib and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/Lib/x64/Packet.lib b/libs/WinPcap-413-173-b4/Lib/x64/Packet.lib deleted file mode 100644 index e1dd6a30..00000000 Binary files a/libs/WinPcap-413-173-b4/Lib/x64/Packet.lib and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/Lib/x64/wpcap.lib b/libs/WinPcap-413-173-b4/Lib/x64/wpcap.lib deleted file mode 100644 index e81d3340..00000000 Binary files a/libs/WinPcap-413-173-b4/Lib/x64/wpcap.lib and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/Packet_8h.html b/libs/WinPcap-413-173-b4/docs/html/Packet_8h.html deleted file mode 100644 index 26909883..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/Packet_8h.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - -WinPcap: Packet.h File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
- -
-
Packet.h File Reference
-
-
-
#include "win_bpf.h"
-
-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  packet_file_header
 Header of a libpcap dump file. More...
 
struct  sf_pkthdr
 Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler. More...
 
struct  _PACKET_OID_DATA
 Structure containing an OID request. More...
 
struct  _INTERNAL_REQUEST
 Stores an OID request. More...
 
struct  _PACKET_RESERVED
 Contains a NDIS packet. More...
 
struct  _DEVICE_EXTENSION
 Port device extension. More...
 
struct  __CPU_Private_Data
 Kernel buffer of each CPU. More...
 
struct  _OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver. More...
 
struct  PacketHeader
 Structure prepended to each packet in the kernel buffer pool. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define MAX_REQUESTS   32
 Maximum number of simultaneous IOCTL requests. More...
 
#define Packet_ALIGNMENT   sizeof(int)
 Alignment macro. Defines the alignment size. More...
 
#define Packet_WORDALIGN(x)   (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
 even multiple of Packet_ALIGNMENT. More...
 
#define KERNEL_EVENT_NAMESPACE   L"\\BaseNamedObjects\\"
 
#define MODE_CAPT   0x0
 Capture working mode. More...
 
#define MODE_STAT   0x1
 Statistical working mode. More...
 
#define MODE_MON   0x2
 Kernel monitoring mode. More...
 
#define MODE_DUMP   0x10
 Kernel dump working mode. More...
 
#define IMMEDIATE   1
 Immediate timeout. Forces a read call to return immediately. More...
 
#define NDIS_FLAGS_SKIP_LOOPBACK_W2K   0x400
 This is an undocumented flag for NdisSetPacketFlags() that allows to disable loopback reception. More...
 
#define TCPDUMP_MAGIC   0xa1b2c3d4
 Libpcap magic number. Used by programs like tcpdump to recognize a driver's generated dump file. More...
 
#define PCAP_VERSION_MAJOR   2
 Major libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file. More...
 
#define PCAP_VERSION_MINOR   4
 Minor libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file. More...
 
#define NPF_DISABLE_LOOPBACK   1
 Tells the driver to drop the packets sent by itself. This is usefult when building applications like bridges. More...
 
#define NPF_ENABLE_LOOPBACK   2
 Tells the driver to capture the packets sent by itself. More...
 
#define C_ASSERT(a)
 
#define RESERVED(_p)   ((PPACKET_RESERVED)((_p)->ProtocolReserved))
 Macro to obtain a NDIS_PACKET from a PACKET_RESERVED. More...
 
#define TRANSMIT_PACKETS   256
 of packets that can be transmitted at the same time or with a single call to NdisSendPackets. More...
 
#define EXIT_SUCCESS(quantity)
 Macro used in the I/O routines to return the control to user-mode with a success status. More...
 
#define EXIT_FAILURE(quantity)
 Macro used in the I/O routines to return the control to user-mode with a failure status. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Typedefs

typedef struct _PACKET_OID_DATA PACKET_OID_DATA
 Structure containing an OID request. More...
 
typedef struct _PACKET_OID_DATAPPACKET_OID_DATA
 
typedef struct _INTERNAL_REQUEST INTERNAL_REQUEST
 Stores an OID request. More...
 
typedef struct _INTERNAL_REQUESTPINTERNAL_REQUEST
 
typedef struct _PACKET_RESERVED PACKET_RESERVED
 Contains a NDIS packet. More...
 
typedef struct _PACKET_RESERVEDPPACKET_RESERVED
 
typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION
 Port device extension. More...
 
typedef struct _DEVICE_EXTENSIONPDEVICE_EXTENSION
 
typedef struct __CPU_Private_Data CpuPrivateData
 Kernel buffer of each CPU. More...
 
typedef struct _OPEN_INSTANCE OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver. More...
 
typedef struct _OPEN_INSTANCEPOPEN_INSTANCE
 
- - - -

-Enumerations

enum  ADAPTER_BINDING_STATUS { ADAPTER_UNBOUND, -ADAPTER_BOUND, -ADAPTER_UNBINDING - }
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

 C_ASSERT (sizeof(PACKET_OID_DATA)==12)
 
NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 The initialization routine of the driver. More...
 
PWCHAR getAdaptersList (VOID)
 Returns the list of the MACs available on the system. More...
 
PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings (VOID)
 Returns the MACs that bind to TCP/IP. More...
 
BOOLEAN NPF_CreateDevice (IN OUT PDRIVER_OBJECT adriverObjectP, IN PUNICODE_STRING amacNameP)
 Creates a device for a given MAC. More...
 
NTSTATUS NPF_Open (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Opens a new instance of the driver. More...
 
VOID NPF_OpenAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus)
 Ends the opening of an adapter. More...
 
NTSTATUS NPF_Cleanup (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Closes an instance of the driver. More...
 
NTSTATUS NPF_Close (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
VOID NPF_CloseAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends the closing of an adapter. More...
 
NDIS_STATUS NPF_tap (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE MacReceiveContext, IN PVOID HeaderBuffer, IN UINT HeaderBufferSize, IN PVOID LookAheadBuffer, IN UINT LookaheadBufferSize, IN UINT PacketSize)
 Callback invoked by NDIS when a packet arrives from the network. More...
 
VOID NPF_TransferDataComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET Packet, IN NDIS_STATUS Status, IN UINT BytesTransferred)
 Ends the transfer of a packet. More...
 
VOID NPF_ReceiveComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback function that signals the end of a packet reception. More...
 
NTSTATUS NPF_IoControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Handles the IOCTL calls. More...
 
VOID NPF_RequestComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_REQUEST pRequest, IN NDIS_STATUS Status)
 Ends an OID request. More...
 
NTSTATUS NPF_Write (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Writes a raw packet to the network. More...
 
INT NPF_BufferedWrite (IN PIRP Irp, IN PCHAR UserBuff, IN ULONG UserBuffSize, BOOLEAN sync)
 Writes a buffer of raw packets to the network. More...
 
VOID NPF_WaitEndOfBufferedWrite (POPEN_INSTANCE Open)
 Waits the completion of all the sends performed by NPF_BufferedWrite. More...
 
VOID NPF_SendComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET pPacket, IN NDIS_STATUS Status)
 Ends a send operation. More...
 
VOID NPF_ResetComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends a reset of the adapter. More...
 
VOID NPF_Status (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN PVOID StatusBuffer, IN UINT StatusBufferSize)
 Callback for NDIS StatusHandler. Not used by NPF. More...
 
VOID NPF_StatusComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback for NDIS StatusCompleteHandler. Not used by NPF. More...
 
VOID NPF_Unload (IN PDRIVER_OBJECT DriverObject)
 Function called by the OS when NPF is unloaded. More...
 
NTSTATUS NPF_Read (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Function that serves the user's reads. More...
 
NTSTATUS NPF_ReadRegistry (IN PWSTR *MacDriverName, IN PWSTR *PacketDriverName, IN PUNICODE_STRING RegistryPath)
 Reads the registry keys associated woth NPF if the driver is manually installed via the control panel. More...
 
NTSTATUS NPF_QueryRegistryRoutine (IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
 Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF if the driver is manually installed via the control panel. More...
 
VOID NPF_BindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE BindContext, IN PNDIS_STRING DeviceName, IN PVOID SystemSpecific1, IN PVOID SystemSpecific2)
 Callback for NDIS BindAdapterHandler. Not used by NPF. More...
 
VOID NPF_UnbindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE UnbindContext)
 Callback for NDIS UnbindAdapterHandler. More...
 
NTSTATUS NPF_OpenDumpFile (POPEN_INSTANCE Open, PUNICODE_STRING fileName, BOOLEAN append)
 Creates the file that will receive the packets when the driver is in dump mode. More...
 
NTSTATUS NPF_StartDump (POPEN_INSTANCE Open)
 Starts dump to file. More...
 
VOID NPF_DumpThread (PVOID Open)
 The dump thread. More...
 
NTSTATUS NPF_SaveCurrentBuffer (POPEN_INSTANCE Open)
 Saves the content of the packet buffer to the file associated with current instance. More...
 
VOID NPF_WriteDumpFile (PFILE_OBJECT FileObject, PLARGE_INTEGER Offset, ULONG Length, PMDL Mdl, PIO_STATUS_BLOCK IoStatusBlock)
 Writes a block of packets on the dump file. More...
 
NTSTATUS NPF_CloseDumpFile (POPEN_INSTANCE Open)
 Closes the dump file associated with an instance of the driver. More...
 
BOOLEAN NPF_StartUsingBinding (IN POPEN_INSTANCE pOpen)
 
VOID NPF_StopUsingBinding (IN POPEN_INSTANCE pOpen)
 
VOID NPF_CloseBinding (IN POPEN_INSTANCE pOpen)
 
BOOLEAN NPF_StartUsingOpenInstance (IN POPEN_INSTANCE pOpen)
 
VOID NPF_StopUsingOpenInstance (IN POPEN_INSTANCE pOpen)
 
VOID NPF_CloseOpenInstance (IN POPEN_INSTANCE pOpen)
 
NTSTATUS NPF_GetDeviceMTU (IN POPEN_INSTANCE pOpen, IN PIRP pIrp, OUT PUINT pMtu)
 
UINT GetBuffOccupation (POPEN_INSTANCE Open)
 Returns the amount of bytes present in the packet buffer. More...
 
- - - - - - - - - -

-Variables

ULONG g_NCpu
 
NDIS_HANDLE g_NdisProtocolHandle
 
struct time_conv G_Start_Time
 
UINT g_SendPacketFlags
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/Packet_8h_source.html b/libs/WinPcap-413-173-b4/docs/html/Packet_8h_source.html deleted file mode 100644 index 76fd6c60..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/Packet_8h_source.html +++ /dev/null @@ -1,727 +0,0 @@ - - - - - - -WinPcap: Packet.h Source File - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
-
-
Packet.h
-
-
-Go to the documentation of this file.
1 /*
-
2  * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
3  * Copyright (c) 2005 - 2010 CACE Technologies, Davis (California)
-
4  * All rights reserved.
-
5  *
-
6  * Redistribution and use in source and binary forms, with or without
-
7  * modification, are permitted provided that the following conditions
-
8  * are met:
-
9  *
-
10  * 1. Redistributions of source code must retain the above copyright
-
11  * notice, this list of conditions and the following disclaimer.
-
12  * 2. Redistributions in binary form must reproduce the above copyright
-
13  * notice, this list of conditions and the following disclaimer in the
-
14  * documentation and/or other materials provided with the distribution.
-
15  * 3. Neither the name of the Politecnico di Torino, CACE Technologies
-
16  * nor the names of its contributors may be used to endorse or promote
-
17  * products derived from this software without specific prior written
-
18  * permission.
-
19  *
-
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
31  *
-
32  */
-
33 
-
42 #ifndef __PACKET_INCLUDE______
-
43 #define __PACKET_INCLUDE______
-
44 
-
45 #if !defined(NDIS30) && !defined(NDIS50)
-
46 #error NDIS30 or NDIS50 should be defined
-
47 #endif
-
48 
-
49 #ifdef _X86_
-
50 #define NTKERNEL
-
51 #include "jitter.h"
-
52 #endif
-
53 
-
54 #ifdef HAVE_BUGGY_TME_SUPPORT
-
55 #ifndef _X86_
-
56 #error TME support is available only on x86 architectures
-
57 #endif // _X86_
-
58 #endif //HAVE_BUGGY_TME_SUPPORT
-
59 
-
60 
-
61 //
-
62 // Needed to disable a warning due to the #pragma prefast directives,
-
63 // that are ignored by the normal DDK compiler
-
64 //
-
65 #ifndef _PREFAST_
-
66 #pragma warning(disable:4068)
-
67 #endif
-
68 
-
69 #include "win_bpf.h"
-
70 
-
71 #define MAX_REQUESTS 32
-
72 
-
73 #define Packet_ALIGNMENT sizeof(int)
-
74 #define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
-
75 
-
77 #define KERNEL_EVENT_NAMESPACE L"\\BaseNamedObjects\\"
-
78 
-
79 
-
80 // Working modes
-
81 #define MODE_CAPT 0x0
-
82 #define MODE_STAT 0x1
-
83 #define MODE_MON 0x2
-
84 #define MODE_DUMP 0x10
-
85 
-
86 
-
87 #define IMMEDIATE 1
-
88 
-
89 #define NDIS_FLAGS_SKIP_LOOPBACK_W2K 0x400
-
90 
-
91 // The following definitions are used to provide compatibility
-
92 // of the dump files with the ones of libpcap
-
93 #define TCPDUMP_MAGIC 0xa1b2c3d4
-
94 #define PCAP_VERSION_MAJOR 2
-
95 #define PCAP_VERSION_MINOR 4
-
96 
-
97 // Loopback behaviour definitions
-
98 #define NPF_DISABLE_LOOPBACK 1
-
99 #define NPF_ENABLE_LOOPBACK 2
-
100 
-
101 
- -
107 {
-
108  UINT magic;
-
109  USHORT version_major;
-
110  USHORT version_minor;
-
111  UINT thiszone;
-
112  UINT sigfigs;
-
113  UINT snaplen;
-
114  UINT linktype;
-
115 };
-
116 
-
121 struct sf_pkthdr {
-
122  struct timeval ts;
-
123  UINT caplen;
-
124  UINT len;
-
127 };
-
128 
-
129 //
-
130 // NT4 DDK doesn't have C_ASSERT
-
131 //
-
132 #ifndef C_ASSERT
-
133 #define C_ASSERT(a)
-
134 #endif
-
135 
-
143 typedef struct _PACKET_OID_DATA {
-
144  ULONG Oid;
-
145  ULONG Length;
-
147  UCHAR Data[1];
-
148 }
- -
151 
-
152 C_ASSERT(sizeof(PACKET_OID_DATA) == 12);
-
153 
-
163 typedef struct _INTERNAL_REQUEST {
-
164  LIST_ENTRY ListElement;
-
165 // PIRP Irp; ///< Irp that performed the request
-
166 // BOOLEAN Internal; ///< True if the request is for internal use of npf.sys. False if the request is performed by the user through an IOCTL.
- -
168  NDIS_REQUEST Request;
-
169  NDIS_STATUS RequestStatus;
-
170 
- -
172 
-
180 typedef struct _PACKET_RESERVED {
-
181  LIST_ENTRY ListElement;
-
182  PIRP Irp;
-
183  PMDL pMdl;
- -
185  ULONG Cpu;
- -
188 
-
189 #define RESERVED(_p) ((PPACKET_RESERVED)((_p)->ProtocolReserved))
-
190 
-
191 
-
196 typedef struct _DEVICE_EXTENSION {
-
197  NDIS_STRING AdapterName;
-
198  PWSTR ExportString;
- -
201 
-
207 typedef struct __CPU_Private_Data
-
208 {
-
209  ULONG P;
-
210  ULONG C;
-
211  ULONG Free;
-
212  PUCHAR Buffer;
-
213  ULONG Accepted;
-
214  ULONG Received;
-
218  ULONG Dropped;
-
222  NDIS_SPIN_LOCK BufferLock;
- - -
228  ULONG NewP;
-
229 }
- -
231 
-
232 
-
240 typedef struct _OPEN_INSTANCE
-
241 {
-
242  PDEVICE_EXTENSION DeviceExtension;
-
243  NDIS_HANDLE AdapterHandle;
-
245  UINT Medium;
-
246  NDIS_HANDLE PacketPool;
-
248  KSPIN_LOCK RequestSpinLock;
-
249  LIST_ENTRY RequestList;
-
250  LIST_ENTRY ResetIrpList;
- -
252  PMDL BufferMdl;
-
253  PKEVENT ReadEvent;
-
254  PUCHAR bpfprogram;
-
255 #ifdef _X86_
-
260  JIT_BPF_Filter *Filter;
-
261 #endif //_X86_
-
263  UINT MinToCopy;
-
264  LARGE_INTEGER TimeOut;
-
266 
-
268  int mode;
-
269  LARGE_INTEGER Nbytes;
-
270  LARGE_INTEGER Npackets;
-
271  NDIS_SPIN_LOCK CountersLock;
-
272  UINT Nwrites;
-
273  ULONG Multiple_Write_Counter;
-
275  NDIS_EVENT WriteEvent;
-
276  BOOLEAN WriteInProgress;
-
277  NDIS_SPIN_LOCK WriteLock;
-
279  NDIS_EVENT NdisRequestEvent;
-
280  BOOLEAN SkipSentPackets;
-
281  NDIS_STATUS IOStatus;
-
282  HANDLE DumpFileHandle;
-
283  PFILE_OBJECT DumpFileObject;
-
284  PKTHREAD DumpThreadObject;
- -
286  NDIS_EVENT DumpEvent;
-
287  LARGE_INTEGER DumpOffset;
-
288  UNICODE_STRING DumpFileName;
- -
290  UINT MaxDumpPacks;
-
292  BOOLEAN DumpLimitReached;
-
295 #ifdef HAVE_BUGGY_TME_SUPPORT
-
297  MEM_TYPE mem_ex;
-
298  TME_CORE tme;
-
299 #endif //HAVE_BUGGY_TME_SUPPORT
-
300 
-
301  NDIS_SPIN_LOCK MachineLock;
- -
303  //
-
305  // KAFFINITY is used as a bit mask for the affinity in the system. So on every supported OS is big enough for all the CPUs on the system (32 bits on x86, 64 on x64?).
-
306  // We use its size to compute the max number of CPUs.
-
307  //
-
308  CpuPrivateData CpuData[sizeof(KAFFINITY) * 8];
-
309  ULONG ReaderSN;
-
310  ULONG WriterSN;
-
311  ULONG Size;
- -
314  NDIS_SPIN_LOCK AdapterHandleLock;
- -
316 
- - -
319  NTSTATUS OpenCloseStatus;
- - -
322  BOOLEAN ClosePending;
-
323  NDIS_SPIN_LOCK OpenInUseLock;
-
324 }
- -
326 
- -
328 {
- - - -
332 };
-
333 
- -
342 {
-
343  ULONG SN;
-
344  struct bpf_hdr header;
-
345 };
-
346 
-
347 extern ULONG g_NCpu;
-
348 extern NDIS_HANDLE g_NdisProtocolHandle;
-
349 extern struct time_conv G_Start_Time; // from openclos.c
-
350 extern UINT g_SendPacketFlags;
-
351 
-
352 #define TRANSMIT_PACKETS 256
-
353 
-
355 
-
357 #define EXIT_SUCCESS(quantity) Irp->IoStatus.Information=quantity;\
-
358  Irp->IoStatus.Status = STATUS_SUCCESS;\
-
359  IoCompleteRequest(Irp, IO_NO_INCREMENT);\
-
360  return STATUS_SUCCESS;\
-
361 
-
362 #define EXIT_FAILURE(quantity) Irp->IoStatus.Information=quantity;\
-
364  Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;\
-
365  IoCompleteRequest(Irp, IO_NO_INCREMENT);\
-
366  return STATUS_UNSUCCESSFUL;\
-
367 
-
368 
-
373 /***************************/
-
374 /* Prototypes */
-
375 /***************************/
-
376 
-
393 NTSTATUS
- -
395  IN PDRIVER_OBJECT DriverObject,
-
396  IN PUNICODE_STRING RegistryPath
-
397  );
-
398 
-
408 PWCHAR getAdaptersList(VOID);
-
409 
-
416 PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings(VOID);
-
417 
-
428 BOOLEAN NPF_CreateDevice(
-
429  IN OUT PDRIVER_OBJECT adriverObjectP,
-
430  IN PUNICODE_STRING amacNameP
-
431  );
-
443 NTSTATUS
-
444 NPF_Open(
-
445  IN PDEVICE_OBJECT DeviceObject,
-
446  IN PIRP Irp
-
447  );
-
448 
-
458 VOID
- -
460  IN NDIS_HANDLE ProtocolBindingContext,
-
461  IN NDIS_STATUS Status,
-
462  IN NDIS_STATUS OpenErrorStatus
-
463  );
-
464 
-
475 NTSTATUS
- -
477  IN PDEVICE_OBJECT DeviceObject,
-
478  IN PIRP Irp
-
479  );
-
480 
-
481 NTSTATUS
-
482 NPF_Close(
-
483  IN PDEVICE_OBJECT DeviceObject,
-
484  IN PIRP Irp
-
485  );
-
486 
-
487 
-
488 
-
497 VOID
- -
499  IN NDIS_HANDLE ProtocolBindingContext,
-
500  IN NDIS_STATUS Status
-
501  );
-
502 
-
525 NDIS_STATUS
-
526 NPF_tap(
-
527  IN NDIS_HANDLE ProtocolBindingContext,
-
528  IN NDIS_HANDLE MacReceiveContext,
-
529  IN PVOID HeaderBuffer,
-
530  IN UINT HeaderBufferSize,
-
531  IN PVOID LookAheadBuffer,
-
532  IN UINT LookaheadBufferSize,
-
533  IN UINT PacketSize
-
534  );
-
535 
-
546 VOID
- -
548  IN NDIS_HANDLE ProtocolBindingContext,
-
549  IN PNDIS_PACKET Packet,
-
550  IN NDIS_STATUS Status,
-
551  IN UINT BytesTransferred
-
552  );
-
553 
-
560 VOID
-
561 NPF_ReceiveComplete(IN NDIS_HANDLE ProtocolBindingContext);
-
562 
-
586 NTSTATUS
- -
588  IN PDEVICE_OBJECT DeviceObject,
-
589  IN PIRP Irp
-
590  );
-
591 
-
592 VOID
-
593 
- -
604  IN NDIS_HANDLE ProtocolBindingContext,
-
605  IN PNDIS_REQUEST pRequest,
-
606  IN NDIS_STATUS Status
-
607  );
-
608 
-
621 NTSTATUS
-
622 NPF_Write(
-
623  IN PDEVICE_OBJECT DeviceObject,
-
624  IN PIRP Irp
-
625  );
-
626 
-
627 
-
647 INT NPF_BufferedWrite(IN PIRP Irp,
-
648  IN PCHAR UserBuff,
-
649  IN ULONG UserBuffSize,
-
650  BOOLEAN sync);
-
651 
-
659 VOID NPF_WaitEndOfBufferedWrite(POPEN_INSTANCE Open);
-
660 
-
670 VOID
- -
672  IN NDIS_HANDLE ProtocolBindingContext,
-
673  IN PNDIS_PACKET pPacket,
-
674  IN NDIS_STATUS Status
-
675  );
-
676 
-
686 VOID
- -
688  IN NDIS_HANDLE ProtocolBindingContext,
-
689  IN NDIS_STATUS Status
-
690  );
-
691 
-
695 VOID
-
696 NPF_Status(
-
697  IN NDIS_HANDLE ProtocolBindingContext,
-
698  IN NDIS_STATUS Status,
-
699  IN PVOID StatusBuffer,
-
700  IN UINT StatusBufferSize
-
701  );
-
702 
-
703 
-
707 VOID
-
708 NPF_StatusComplete(IN NDIS_HANDLE ProtocolBindingContext);
-
709 
-
718 VOID
-
719 NPF_Unload(IN PDRIVER_OBJECT DriverObject);
-
720 
-
721 
-
740 NTSTATUS
-
741 NPF_Read(
-
742  IN PDEVICE_OBJECT DeviceObject,
-
743  IN PIRP Irp
-
744  );
-
745 
-
751 NTSTATUS
- -
753  IN PWSTR *MacDriverName,
-
754  IN PWSTR *PacketDriverName,
-
755  IN PUNICODE_STRING RegistryPath
-
756  );
-
757 
-
764 NTSTATUS
- -
766  IN PWSTR ValueName,
-
767  IN ULONG ValueType,
-
768  IN PVOID ValueData,
-
769  IN ULONG ValueLength,
-
770  IN PVOID Context,
-
771  IN PVOID EntryContext
-
772  );
-
773 
-
779 VOID NPF_BindAdapter(
-
780  OUT PNDIS_STATUS Status,
-
781  IN NDIS_HANDLE BindContext,
-
782  IN PNDIS_STRING DeviceName,
-
783  IN PVOID SystemSpecific1,
-
784  IN PVOID SystemSpecific2
-
785  );
-
786 
-
798 VOID
- -
800  OUT PNDIS_STATUS Status,
-
801  IN NDIS_HANDLE ProtocolBindingContext,
-
802  IN NDIS_HANDLE UnbindContext
-
803  );
-
804 
-
805 
-
813 NTSTATUS NPF_OpenDumpFile(POPEN_INSTANCE Open , PUNICODE_STRING fileName, BOOLEAN append);
-
814 
-
823 NTSTATUS NPF_StartDump(POPEN_INSTANCE Open);
-
824 
-
832 VOID NPF_DumpThread(PVOID Open);
-
833 
-
840 NTSTATUS NPF_SaveCurrentBuffer(POPEN_INSTANCE Open);
-
841 
-
854 VOID NPF_WriteDumpFile(PFILE_OBJECT FileObject,
-
855  PLARGE_INTEGER Offset,
-
856  ULONG Length,
-
857  PMDL Mdl,
-
858  PIO_STATUS_BLOCK IoStatusBlock);
-
859 
-
860 
-
861 
-
867 NTSTATUS NPF_CloseDumpFile(POPEN_INSTANCE Open);
-
868 
-
869 BOOLEAN
- -
871  IN POPEN_INSTANCE pOpen);
-
872 
-
873 VOID
- -
875  IN POPEN_INSTANCE pOpen);
-
876 
-
877 VOID
- -
879  IN POPEN_INSTANCE pOpen);
-
880 
-
881 BOOLEAN
- -
883  IN POPEN_INSTANCE pOpen);
-
884 
-
885 VOID
- -
887  IN POPEN_INSTANCE pOpen);
-
888 
-
889 VOID
- -
891  IN POPEN_INSTANCE pOpen);
-
892 
-
893 NTSTATUS
- -
895  IN POPEN_INSTANCE pOpen,
-
896  IN PIRP pIrp,
-
897  OUT PUINT pMtu);
-
898 
-
903 UINT GetBuffOccupation(POPEN_INSTANCE Open);
-
904 
-
916 #ifdef NDIS50
-
917 NDIS_STATUS NPF_PowerChange(IN NDIS_HANDLE ProtocolBindingContext, IN PNET_PNP_EVENT pNetPnPEvent);
-
918 #endif
-
919 
-
920 //
-
921 // Old registry based WinPcap names
-
922 //
-
924 // \brief Helper function to query a value from the global WinPcap registry key
-
925 //*/
-
926 //VOID NPF_QueryWinpcapRegistryString(PWSTR SubKeyName,
-
927 // WCHAR *Value,
-
928 // UINT ValueLen,
-
929 // WCHAR *DefaultValue);
-
930 //
-
931 
-
932 
-
941 #endif /*main ifndef/define*/
-
BOOLEAN DumpLimitReached
Definition: Packet.h:294
-
NTSTATUS NPF_OpenDumpFile(POPEN_INSTANCE Open, PUNICODE_STRING fileName, BOOLEAN append)
Creates the file that will receive the packets when the driver is in dump mode.
-
BOOLEAN NPF_CreateDevice(IN OUT PDRIVER_OBJECT adriverObjectP, IN PUNICODE_STRING amacNameP)
Creates a device for a given MAC.
-
PMDL TransferMdl2
Second MDL used to map the portion of the buffer that will contain an incoming packet.
Definition: Packet.h:227
-
struct _PACKET_OID_DATA * PPACKET_OID_DATA
- -
LARGE_INTEGER TimeOut
Definition: Packet.h:265
-
VOID NPF_StopUsingOpenInstance(IN POPEN_INSTANCE pOpen)
-
UINT MaxDumpPacks
Definition: Packet.h:291
-
NDIS_SPIN_LOCK BufferLock
It protects the buffer associated with this CPU.
Definition: Packet.h:225
-
ULONG g_NCpu
-
ULONG NewP
Used by NdisTransferData() (when we call NdisTransferData, p index must be updated only in the Transf...
Definition: Packet.h:228
-
Structure describing a x86 filtering program created by the jitter.
Definition: jitter.h:95
-
ULONG SN
Sequence number of the packet.
Definition: Packet.h:343
-
VOID NPF_Status(IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN PVOID StatusBuffer, IN UINT StatusBufferSize)
Callback for NDIS StatusHandler. Not used by NPF.
-
ULONG TransmitPendingPackets
Specifies the number of packets that are pending to be transmitted, i.e. have been submitted to NdisS...
Definition: Packet.h:320
-
PWSTR ExportString
Definition: Packet.h:198
-
Contains a NDIS packet.
Definition: Packet.h:180
-
BOOLEAN NPF_StartUsingBinding(IN POPEN_INSTANCE pOpen)
-
ULONG Size
Size of each kernel buffer contained in the CpuData field.
Definition: Packet.h:312
-
ULONG AdapterHandleUsageCounter
Definition: Packet.h:313
-
NDIS_SPIN_LOCK OpenInUseLock
Definition: Packet.h:323
-
struct _PACKET_OID_DATA PACKET_OID_DATA
Structure containing an OID request.
-
PDEVICE_EXTENSION DeviceExtension
Definition: Packet.h:242
-
struct timeval ts
time stamp
Definition: Packet.h:122
-
NTSTATUS NPF_IoControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Handles the IOCTL calls.
-
LIST_ENTRY ListElement
Used to handle lists of packets.
Definition: Packet.h:181
-
INTERNAL_REQUEST Requests[MAX_REQUESTS]
Array of structures that wrap every single OID request.
Definition: Packet.h:251
-
BOOLEAN FreeBufAfterWrite
Definition: Packet.h:184
-
VOID NPF_SendComplete(IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET pPacket, IN NDIS_STATUS Status)
Ends a send operation.
-
VOID NPF_StopUsingBinding(IN POPEN_INSTANCE pOpen)
-
NTSTATUS NPF_Close(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
-
LIST_ENTRY ListElement
Used to handle lists of requests.
Definition: Packet.h:164
-
BOOLEAN WriteInProgress
Definition: Packet.h:276
-
NDIS_SPIN_LOCK AdapterHandleLock
Definition: Packet.h:314
- -
VOID NPF_WaitEndOfBufferedWrite(POPEN_INSTANCE Open)
Waits the completion of all the sends performed by NPF_BufferedWrite.
-
ADAPTER_BINDING_STATUS
Definition: Packet.h:327
-
struct _INTERNAL_REQUEST INTERNAL_REQUEST
Stores an OID request.
-
Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler.
Definition: Packet.h:121
-
PMDL BufferMdl
Pointer to a Memory descriptor list (MDL) that maps the circular buffer's memory. ...
Definition: Packet.h:252
-
CpuPrivateData CpuData[sizeof(KAFFINITY)*8]
Pool of kernel buffer structures, one for each CPU.
Definition: Packet.h:308
-
LIST_ENTRY RequestList
List of pending OID requests.
Definition: Packet.h:249
-
BOOLEAN NPF_StartUsingOpenInstance(IN POPEN_INSTANCE pOpen)
-
LARGE_INTEGER Npackets
Number of packets accepted by the filter when this instance is in statistical mode.
Definition: Packet.h:270
-
NTSTATUS NPF_QueryRegistryRoutine(IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF if the driver is ...
-
struct _INTERNAL_REQUEST * PINTERNAL_REQUEST
-
NDIS_EVENT NdisOpenCloseCompleteEvent
Definition: Packet.h:317
-
NDIS_HANDLE AdapterHandle
NDIS idetifier of the adapter used by this instance.
Definition: Packet.h:244
-
VOID NPF_StatusComplete(IN NDIS_HANDLE ProtocolBindingContext)
Callback for NDIS StatusCompleteHandler. Not used by NPF.
-
UINT thiszone
Gmt to local correction.
Definition: Packet.h:111
-
USHORT version_major
Libpcap major version.
Definition: Packet.h:109
-
PFILE_OBJECT DumpFileObject
Pointer to the object of the file used in dump mode.
Definition: Packet.h:283
-
PUCHAR bpfprogram
Definition: Packet.h:254
-
VOID NPF_Unload(IN PDRIVER_OBJECT DriverObject)
Function called by the OS when NPF is unloaded.
-
UINT MaxFrameSize
Definition: Packet.h:302
-
NDIS_SPIN_LOCK CountersLock
SpinLock that protects the statistical mode counters.
Definition: Packet.h:271
-
NTSTATUS NPF_CloseDumpFile(POPEN_INSTANCE Open)
Closes the dump file associated with an instance of the driver.
-
UINT Nwrites
Definition: Packet.h:272
-
NTSTATUS NPF_Write(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Writes a raw packet to the network.
-
ULONG WriterSN
Definition: Packet.h:310
-
PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings(VOID)
Returns the MACs that bind to TCP/IP.
-
Port device extension.
Definition: Packet.h:196
-
ULONG C
Zero-based index of the consumer in the buffer. It indicates the first free byte to be read...
Definition: Packet.h:210
-
NDIS_EVENT NdisRequestEvent
Event used to synchronize I/O requests with the callback structure of NDIS.
Definition: Packet.h:279
-
PMDL pMdl
MDL mapping the buffer of the packet.
Definition: Packet.h:183
-
Structure prepended to each packet in the kernel buffer pool.
Definition: Packet.h:341
-
USHORT version_minor
Libpcap minor version.
Definition: Packet.h:110
-
Structure containing an OID request.
Definition: Packet.h:143
-
PKEVENT ReadEvent
Pointer to the event on which the read calls on this instance must wait.
Definition: Packet.h:253
-
VOID NPF_TransferDataComplete(IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET Packet, IN NDIS_STATUS Status, IN UINT BytesTransferred)
Ends the transfer of a packet.
-
VOID NPF_DumpThread(PVOID Open)
The dump thread.
-
VOID NPF_RequestComplete(IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_REQUEST pRequest, IN NDIS_STATUS Status)
Ends an OID request.
-
NDIS_HANDLE PacketPool
Pool of NDIS_PACKET structures used to transfer the packets from and to the NIC driver.
Definition: Packet.h:247
-
NTSTATUS NPF_SaveCurrentBuffer(POPEN_INSTANCE Open)
Saves the content of the packet buffer to the file associated with current instance.
-
ULONG Length
Length of the data field.
Definition: Packet.h:146
-
BOOLEAN ClosePending
Definition: Packet.h:322
-
ULONG Multiple_Write_Counter
Counts the number of times a single write has already physically repeated.
Definition: Packet.h:274
-
UINT g_SendPacketFlags
-
UINT GetBuffOccupation(POPEN_INSTANCE Open)
Returns the amount of bytes present in the packet buffer.
-
INT NPF_BufferedWrite(IN PIRP Irp, IN PCHAR UserBuff, IN ULONG UserBuffSize, BOOLEAN sync)
Writes a buffer of raw packets to the network.
-
HANDLE DumpThreadHandle
Handle of the thread created by dump mode to asynchronously move the buffer to disk.
Definition: Packet.h:285
-
ULONG NumPendingIrps
Definition: Packet.h:321
-
NDIS_SPIN_LOCK WriteLock
SpinLock that protects the WriteInProgress variable.
Definition: Packet.h:278
-
UINT caplen
Definition: Packet.h:123
-
NDIS_EVENT DumpEvent
Event used to synchronize the dump thread with the tap when the instance is in dump mode...
Definition: Packet.h:286
-
VOID NPF_CloseBinding(IN POPEN_INSTANCE pOpen)
-
LARGE_INTEGER DumpOffset
Current offset in the dump file.
Definition: Packet.h:287
- -
KSPIN_LOCK RequestSpinLock
SpinLock used to synchronize the OID requests.
Definition: Packet.h:248
-
PKTHREAD DumpThreadObject
Pointer to the object of the thread used in dump mode.
Definition: Packet.h:284
-
NTSTATUS NPF_StartDump(POPEN_INSTANCE Open)
Starts dump to file.
-
UNICODE_STRING DumpFileName
String containing the name of the dump file.
Definition: Packet.h:288
-
VOID NPF_UnbindAdapter(OUT PNDIS_STATUS Status, IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE UnbindContext)
Callback for NDIS UnbindAdapterHandler.
-
NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
The initialization routine of the driver.
-
VOID NPF_ReceiveComplete(IN NDIS_HANDLE ProtocolBindingContext)
Callback function that signals the end of a packet reception.
-
struct _OPEN_INSTANCE * POPEN_INSTANCE
-
UINT Medium
Definition: Packet.h:245
-
VOID NPF_BindAdapter(OUT PNDIS_STATUS Status, IN NDIS_HANDLE BindContext, IN PNDIS_STRING DeviceName, IN PVOID SystemSpecific1, IN PVOID SystemSpecific2)
Callback for NDIS BindAdapterHandler. Not used by NPF.
-
BOOLEAN SkipSentPackets
True if this instance should not capture back the packets that it transmits.
Definition: Packet.h:280
-
ULONG ReaderSN
Sequence number of the next packet to be read from the pool of kernel buffers.
Definition: Packet.h:309
-
struct _DEVICE_EXTENSION DEVICE_EXTENSION
Port device extension.
-
NDIS_STRING AdapterName
Name of the adapter.
Definition: Packet.h:197
- -
struct bpf_hdr header
bpf header, created by the tap, and copied unmodified to user level programs.
Definition: Packet.h:344
-
VOID NPF_ResetComplete(IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
Ends a reset of the adapter.
-
PUCHAR Buffer
Pointer to the kernel buffer used to capture packets.
Definition: Packet.h:212
-
Kernel buffer of each CPU.
Definition: Packet.h:207
-
UINT len
Length of the original packet (off wire).
Definition: Packet.h:126
-
#define C_ASSERT(a)
Definition: Packet.h:133
-
NDIS_EVENT WriteEvent
Event used to synchronize the multiple write process.
Definition: Packet.h:275
-
VOID NPF_CloseAdapterComplete(IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
Ends the closing of an adapter.
-
PIRP Irp
Irp that performed the request.
Definition: Packet.h:182
-
NDIS_HANDLE g_NdisProtocolHandle
-
UINT linktype
Data link type (DLT_*). See win_bpf.h for details.
Definition: Packet.h:114
-
struct __CPU_Private_Data CpuPrivateData
Kernel buffer of each CPU.
-
HANDLE DumpFileHandle
Handle of the file used in dump mode.
Definition: Packet.h:282
-
NDIS_EVENT NdisWriteCompleteEvent
Event that is signalled when all the packets have been successfully sent by NdisSend (and corresponfi...
Definition: Packet.h:318
- -
NDIS_STATUS IOStatus
Maintains the status of and OID request call, that will be passed to the application.
Definition: Packet.h:281
-
UINT magic
Libpcap magic number.
Definition: Packet.h:108
- -
LIST_ENTRY ResetIrpList
List of pending adapter reset requests.
Definition: Packet.h:250
-
NDIS_REQUEST Request
The structure with the actual request, that will be passed to NdisRequest().
Definition: Packet.h:168
-
ULONG Free
Number of the free bytes in the buffer.
Definition: Packet.h:211
-
NDIS_EVENT InternalRequestCompletedEvent
Definition: Packet.h:167
-
NDIS_SPIN_LOCK MachineLock
SpinLock that protects the BPF filter and the TME engine, if in use.
Definition: Packet.h:301
-
UINT sigfigs
Accuracy of timestamps.
Definition: Packet.h:112
-
Contains the state of a running instance of the NPF driver.
Definition: Packet.h:240
-
LARGE_INTEGER Nbytes
Amount of bytes accepted by the filter when this instance is in statistical mode. ...
Definition: Packet.h:269
-
int mode
Working mode of the driver. See PacketSetMode() for details.
Definition: Packet.h:268
-
NTSTATUS NPF_Open(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Opens a new instance of the driver.
-
ULONG AdapterBindingStatus
Specifies if NPF is still bound to the adapter used by this instance, it's unbinding or it's not boun...
Definition: Packet.h:315
-
NTSTATUS NPF_Cleanup(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Closes an instance of the driver.
-
struct time_conv G_Start_Time
-
VOID NPF_CloseOpenInstance(IN POPEN_INSTANCE pOpen)
-
struct _PACKET_RESERVED * PPACKET_RESERVED
-
NDIS_STATUS RequestStatus
Definition: Packet.h:169
-
Header of a libpcap dump file.
Definition: Packet.h:106
-
VOID NPF_OpenAdapterComplete(IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus)
Ends the opening of an adapter.
-
ULONG Cpu
The CPU on which the packet was pulled out of the linked list of free packets.
Definition: Packet.h:186
-
NTSTATUS NPF_GetDeviceMTU(IN POPEN_INSTANCE pOpen, IN PIRP pIrp, OUT PUINT pMtu)
-
ULONG P
Zero-based index of the producer in the buffer. It indicates the first free byte to be written...
Definition: Packet.h:209
-
struct _OPEN_INSTANCE OPEN_INSTANCE
Contains the state of a running instance of the NPF driver.
-
PMDL TransferMdl1
MDL used to map the portion of the buffer that will contain an incoming packet.
Definition: Packet.h:226
-
UINT MinToCopy
Definition: Packet.h:263
-
NTSTATUS OpenCloseStatus
Definition: Packet.h:319
- -
NTSTATUS NPF_Read(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Function that serves the user's reads.
-
UINT MaxDumpBytes
Definition: Packet.h:289
-
#define MAX_REQUESTS
Maximum number of simultaneous IOCTL requests.
Definition: Packet.h:71
-
Stores an OID request.
Definition: Packet.h:163
-
UINT snaplen
Length of the max saved portion of each packet.
Definition: Packet.h:113
-
struct _DEVICE_EXTENSION * PDEVICE_EXTENSION
-
VOID NPF_WriteDumpFile(PFILE_OBJECT FileObject, PLARGE_INTEGER Offset, ULONG Length, PMDL Mdl, PIO_STATUS_BLOCK IoStatusBlock)
Writes a block of packets on the dump file.
-
NDIS_STATUS NPF_tap(IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE MacReceiveContext, IN PVOID HeaderBuffer, IN UINT HeaderBufferSize, IN PVOID LookAheadBuffer, IN UINT LookaheadBufferSize, IN UINT PacketSize)
Callback invoked by NDIS when a packet arrives from the network.
-
NTSTATUS NPF_ReadRegistry(IN PWSTR *MacDriverName, IN PWSTR *PacketDriverName, IN PUNICODE_STRING RegistryPath)
Reads the registry keys associated woth NPF if the driver is manually installed via the control panel...
-
struct _PACKET_RESERVED PACKET_RESERVED
Contains a NDIS packet.
-
UCHAR Data[1]
Definition: Packet.h:147
-
PWCHAR getAdaptersList(VOID)
Returns the list of the MACs available on the system.
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/Win32-Extensions_8h.html b/libs/WinPcap-413-173-b4/docs/html/Win32-Extensions_8h.html deleted file mode 100644 index b976efbf..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/Win32-Extensions_8h.html +++ /dev/null @@ -1,736 +0,0 @@ - - - - - - -WinPcap: Win32-Extensions.h File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
- -
-
Win32-Extensions.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - -

-Data Structures

struct  pcap_send_queue
 A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
 This typedef is a support for the pcap_get_airpcap_handle() function. More...
 
#define BPF_MEM_EX_IMM   0xc0
 
#define BPF_MEM_EX_IND   0xe0
 
#define BPF_MEM_EX   0xc0
 
#define BPF_TME   0x08
 
#define BPF_LOOKUP   0x90
 
#define BPF_EXECUTE   0xa0
 
#define BPF_INIT   0xb0
 
#define BPF_VALIDATE   0xc0
 
#define BPF_SET_ACTIVE   0xd0
 
#define BPF_RESET   0xe0
 
#define BPF_SET_MEMORY   0x80
 
#define BPF_GET_REGISTER_VALUE   0x70
 
#define BPF_SET_REGISTER_VALUE   0x60
 
#define BPF_SET_WORKING   0x50
 
#define BPF_SET_ACTIVE_READ   0x40
 
#define BPF_SET_AUTODELETION   0x30
 
#define BPF_SEPARATION   0xff
 
- - - - - -

-Typedefs

typedef struct pcap_send_queue pcap_send_queue
 
typedef struct _AirpcapHandle * PAirpcapHandle
 
- - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

pcap_send_queuepcap_sendqueue_alloc (u_int memsize)
 
void pcap_sendqueue_destroy (pcap_send_queue *queue)
 
int pcap_sendqueue_queue (pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 
u_int pcap_sendqueue_transmit (pcap_t *p, pcap_send_queue *queue, int sync)
 
HANDLE pcap_getevent (pcap_t *p)
 
struct pcap_statpcap_stats_ex (pcap_t *p, int *pcap_stat_size)
 
int pcap_setuserbuffer (pcap_t *p, int size)
 
int pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
 
int pcap_live_dump_ended (pcap_t *p, int sync)
 
int pcap_offline_filter (const struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
 
int pcap_start_oem (char *err_str, int flags)
 
PAirpcapHandle pcap_get_airpcap_handle (pcap_t *p)
 
-

Macro Definition Documentation

- -
-
- - - - -
#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
-
- -

This typedef is a support for the pcap_get_airpcap_handle() function.

- -

Definition at line 59 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_EXECUTE   0xa0
-
- -

Definition at line 71 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_GET_REGISTER_VALUE   0x70
-
- -

Definition at line 77 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_INIT   0xb0
-
- -

Definition at line 72 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_LOOKUP   0x90
-
- -

Definition at line 70 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_MEM_EX   0xc0
-
- -

Definition at line 67 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_MEM_EX_IMM   0xc0
-
- -

Definition at line 63 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_MEM_EX_IND   0xe0
-
- -

Definition at line 64 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_RESET   0xe0
-
- -

Definition at line 75 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SEPARATION   0xff
-
- -

Definition at line 82 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_ACTIVE   0xd0
-
- -

Definition at line 74 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_ACTIVE_READ   0x40
-
- -

Definition at line 80 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_AUTODELETION   0x30
-
- -

Definition at line 81 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_MEMORY   0x80
-
- -

Definition at line 76 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_REGISTER_VALUE   0x60
-
- -

Definition at line 78 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_SET_WORKING   0x50
-
- -

Definition at line 79 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_TME   0x08
-
- -

Definition at line 68 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
#define BPF_VALIDATE   0xc0
-
- -

Definition at line 73 of file Win32-Extensions.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef struct _AirpcapHandle* PAirpcapHandle
-
- -

Definition at line 60 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
typedef struct pcap_send_queue pcap_send_queue
-
- -

Definition at line 53 of file Win32-Extensions.h.

- -
-
-

Function Documentation

- -
-
- - - - - - - - -
PAirpcapHandle pcap_get_airpcap_handle (pcap_tp)
-
- -
-
- -
-
- - - - - - - - -
HANDLE pcap_getevent (pcap_tp)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_live_dump (pcap_tp,
char * filename,
int maxsize,
int maxpacks 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_live_dump_ended (pcap_tp,
int sync 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_offline_filter (const struct bpf_program * prog,
const struct pcap_pkthdrheader,
const u_char * pkt_data 
)
-
- -
-
- -
-
- - - - - - - - -
pcap_send_queue* pcap_sendqueue_alloc (u_int memsize)
-
- -
-
- -
-
- - - - - - - - -
void pcap_sendqueue_destroy (pcap_send_queuequeue)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_sendqueue_queue (pcap_send_queuequeue,
const struct pcap_pkthdrpkt_header,
const u_char * pkt_data 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
u_int pcap_sendqueue_transmit (pcap_tp,
pcap_send_queuequeue,
int sync 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setuserbuffer (pcap_tp,
int size 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_start_oem (char * err_str,
int flags 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct pcap_stat* pcap_stats_ex (pcap_tp,
int * pcap_stat_size 
)
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/Win32-Extensions_8h_source.html b/libs/WinPcap-413-173-b4/docs/html/Win32-Extensions_8h_source.html deleted file mode 100644 index 7927e5d3..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/Win32-Extensions_8h_source.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - -WinPcap: Win32-Extensions.h Source File - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
-
-
Win32-Extensions.h
-
-
-Go to the documentation of this file.
1 /*
-
2  * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
3  * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
-
4  * All rights reserved.
-
5  *
-
6  * Redistribution and use in source and binary forms, with or without
-
7  * modification, are permitted provided that the following conditions
-
8  * are met:
-
9  *
-
10  * 1. Redistributions of source code must retain the above copyright
-
11  * notice, this list of conditions and the following disclaimer.
-
12  * 2. Redistributions in binary form must reproduce the above copyright
-
13  * notice, this list of conditions and the following disclaimer in the
-
14  * documentation and/or other materials provided with the distribution.
-
15  * 3. Neither the name of the Politecnico di Torino, CACE Technologies
-
16  * nor the names of its contributors may be used to endorse or promote
-
17  * products derived from this software without specific prior written
-
18  * permission.
-
19  *
-
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
31  *
-
32  */
-
33 
-
34 #ifndef __WIN32_EXTENSIONS_H__
-
35 #define __WIN32_EXTENSIONS_H__
-
36 
-
37 #ifdef __cplusplus
-
38 extern "C" {
-
39 #endif
-
40 
-
41 /* Definitions */
-
42 
- -
47 {
-
48  u_int maxlen;
-
49  u_int len;
-
50  char *buffer;
-
51 };
-
52 
- -
54 
-
58 #if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
-
59 #define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
-
60 typedef struct _AirpcapHandle *PAirpcapHandle;
-
61 #endif
-
62 
-
63 #define BPF_MEM_EX_IMM 0xc0
-
64 #define BPF_MEM_EX_IND 0xe0
-
65 
-
66 /*used for ST*/
-
67 #define BPF_MEM_EX 0xc0
-
68 #define BPF_TME 0x08
-
69 
-
70 #define BPF_LOOKUP 0x90
-
71 #define BPF_EXECUTE 0xa0
-
72 #define BPF_INIT 0xb0
-
73 #define BPF_VALIDATE 0xc0
-
74 #define BPF_SET_ACTIVE 0xd0
-
75 #define BPF_RESET 0xe0
-
76 #define BPF_SET_MEMORY 0x80
-
77 #define BPF_GET_REGISTER_VALUE 0x70
-
78 #define BPF_SET_REGISTER_VALUE 0x60
-
79 #define BPF_SET_WORKING 0x50
-
80 #define BPF_SET_ACTIVE_READ 0x40
-
81 #define BPF_SET_AUTODELETION 0x30
-
82 #define BPF_SEPARATION 0xff
-
83 
-
84 /* Prototypes */
- -
86 
- -
88 
-
89 int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data);
-
90 
-
91 u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync);
-
92 
-
93 HANDLE pcap_getevent(pcap_t *p);
-
94 
-
95 struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size);
-
96 
-
97 int pcap_setuserbuffer(pcap_t *p, int size);
-
98 
-
99 int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks);
-
100 
-
101 int pcap_live_dump_ended(pcap_t *p, int sync);
-
102 
-
103 int pcap_offline_filter(const struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data);
-
104 
-
105 int pcap_start_oem(char* err_str, int flags);
-
106 
-
107 PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p);
-
108 
-
109 #ifdef __cplusplus
-
110 }
-
111 #endif
-
112 
-
113 #endif //__WIN32_EXTENSIONS_H__
-
Header of a packet in the dump file.
Definition: incs/pcap.h:126
-
int pcap_setuserbuffer(pcap_t *p, int size)
-
int pcap_live_dump_ended(pcap_t *p, int sync)
-
int pcap_start_oem(char *err_str, int flags)
-
u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue *queue, int sync)
-
A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().
-
struct pcap pcap_t
Descriptor of an open capture instance. This structure is opaque to the user, that handles its conten...
Definition: incs/pcap.h:70
-
char * buffer
Buffer containing the packets to be sent.
-
Structure that keeps statistical values on an interface.
Definition: incs/pcap.h:136
-
pcap_send_queue * pcap_sendqueue_alloc(u_int memsize)
-
int pcap_sendqueue_queue(pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
-
PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p)
-
int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks)
-
void pcap_sendqueue_destroy(pcap_send_queue *queue)
-
struct _AirpcapHandle * PAirpcapHandle
-
struct pcap_stat * pcap_stats_ex(pcap_t *p, int *pcap_stat_size)
-
int pcap_offline_filter(const struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
-
u_int len
Current size of the queue, in bytes.
-
HANDLE pcap_getevent(pcap_t *p)
-
u_int maxlen
Maximum size of the the queue, in bytes. This variable contains the size of the buffer field...
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/annotated.html b/libs/WinPcap-413-173-b4/docs/html/annotated.html deleted file mode 100644 index 79493ece..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/annotated.html +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - -WinPcap: Data Structures - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
Data Structures
-
-
-
Here are the data structures with brief descriptions:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 C__CPU_Private_DataKernel buffer of each CPU
 C_DEVICE_EXTENSIONPort device extension
 C_INTERNAL_REQUESTStores an OID request
 C_OPEN_INSTANCEContains the state of a running instance of the NPF driver
 C_PACKET_OID_DATAStructure containing an OID request
 C_PACKET_RESERVEDContains a NDIS packet
 CactivehostsKeeps a list of all the opened connections in the active mode
 Cbinary_streamA stream of X86 binary code
 CJIT_BPF_FilterStructure describing a x86 filtering program created by the jitter
 Cpacket_file_headerHeader of a libpcap dump file
 CPacketHeaderStructure prepended to each packet in the kernel buffer pool
 Cpcap_addrRepresentation of an interface address, used by pcap_findalldevs()
 Cpcap_file_headerHeader of a libpcap dump file
 Cpcap_ifItem in a list of interfaces, used by pcap_findalldevs()
 Cpcap_pkthdrHeader of a packet in the dump file
 Cpcap_send_queueA queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()
 Cpcap_statStructure that keeps statistical values on an interface
 Crpcap_authStructure that keeps the data required for the authentication on the remote host
 Crpcap_filterGeneral header used for the pcap_setfilter() command; keeps just the number of BPF instructions
 Crpcap_filterbpf_insnStructure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header
 Crpcap_findalldevs_ifFormat of the message for the interface description (findalldevs command)
 Crpcap_findalldevs_ifaddrFormat of the message for the address listing (findalldevs command)
 Crpcap_headerCommon header for all the RPCAP messages
 Crpcap_openreplyFormat of the message of the connection opening reply (open command)
 Crpcap_pkthdrFormat of the header which encapsulates captured packets when transmitted on the network
 Crpcap_samplingStructure that is needed to set sampling parameters
 Crpcap_startcapreplyFormat of the reply message that devoted to start a remote capture (startcap reply command)
 Crpcap_startcapreqFormat of the message that starts a remote capture (startcap command)
 Crpcap_statsStructure that keeps the statistics about the number of packets captured, dropped, etc
 Csf_pkthdrHeader associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/bc_s.png b/libs/WinPcap-413-173-b4/docs/html/bc_s.png deleted file mode 100644 index 224b29aa..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/bc_s.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/bdwn.png b/libs/WinPcap-413-173-b4/docs/html/bdwn.png deleted file mode 100644 index 940a0b95..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/bdwn.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/classes.html b/libs/WinPcap-413-173-b4/docs/html/classes.html deleted file mode 100644 index c9706731..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/classes.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - -WinPcap: Data Structure Index - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
Data Structure Index
-
-
-
A | B | J | P | R | S | _
- - - - - - - - - - - - - -
  J  
-
_DEVICE_EXTENSION   
  p  
-
  r  
-
rpcap_pkthdr   
_INTERNAL_REQUEST   rpcap_sampling   
JIT_BPF_Filter   _OPEN_INSTANCE   packet_file_header   rpcap_auth   rpcap_startcapreply   
  P  
-
_PACKET_OID_DATA   pcap_addr   rpcap_filter   rpcap_startcapreq   
_PACKET_RESERVED   pcap_file_header   rpcap_filterbpf_insn   rpcap_stats   
PacketHeader   
  a  
-
pcap_if   rpcap_findalldevs_if   
  s  
-
  _  
-
pcap_pkthdr   rpcap_findalldevs_ifaddr   
activehosts   pcap_send_queue   rpcap_header   sf_pkthdr   
__CPU_Private_Data   
  b  
-
pcap_stat   rpcap_openreply   
binary_stream   
-
A | B | J | P | R | S | _
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/closed.png b/libs/WinPcap-413-173-b4/docs/html/closed.png deleted file mode 100644 index 98cc2c90..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/closed.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/deprecated.html b/libs/WinPcap-413-173-b4/docs/html/deprecated.html deleted file mode 100644 index 6490980d..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/deprecated.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - -WinPcap: Deprecated List - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Deprecated List
-
-
-
-
Global pcap_file (pcap_t *p)
-
Due to incompatibilities between the C Runtime (CRT) used to compile WinPcap and the one used by WinPcap-based applications, this function may return an invalid FILE pointer, i.e. a descriptor that causes all the standard I/O stream functions (ftell, fseek, fclose...) to fail. The function is still available for backwards binary compatibility, only.
-
Global pcap_lookupdev (char *errbuf)
-
Use pcap_findalldevs() or pcap_findalldevs_ex() instead.
-
Global pcap_lookupnet (const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf)
-
Use pcap_findalldevs() or pcap_findalldevs_ex() instead.
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_1d0b26b30525be7735e8363d5b4dcb01.html b/libs/WinPcap-413-173-b4/docs/html/dir_1d0b26b30525be7735e8363d5b4dcb01.html deleted file mode 100644 index e6223611..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_1d0b26b30525be7735e8363d5b4dcb01.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - -WinPcap: wpcap Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap Directory Reference
-
-
- - - - - - -

-Directories

directory  libpcap
 
directory  Win32-Extensions
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_4ee79fd2d246ba2ad1fa267b628a7962.html b/libs/WinPcap-413-173-b4/docs/html/dir_4ee79fd2d246ba2ad1fa267b628a7962.html deleted file mode 100644 index 97c380b7..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_4ee79fd2d246ba2ad1fa267b628a7962.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - -WinPcap: libpcap Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
libpcap Directory Reference
-
-
- - - - - - -

-Directories

directory  funcs
 
directory  incs
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_727ab9403fd1ff980053b79c3716665a.html b/libs/WinPcap-413-173-b4/docs/html/dir_727ab9403fd1ff980053b79c3716665a.html deleted file mode 100644 index 637bc1f6..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_727ab9403fd1ff980053b79c3716665a.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -WinPcap: incs Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
incs Directory Reference
-
-
- - - - -

-Files

file  incs/pcap.h [code]
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_9a2aa2d3a350e553d14931ec4e0c1514.html b/libs/WinPcap-413-173-b4/docs/html/dir_9a2aa2d3a350e553d14931ec4e0c1514.html deleted file mode 100644 index 4540a4e0..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_9a2aa2d3a350e553d14931ec4e0c1514.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -WinPcap: libpcap Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
libpcap Directory Reference
-
-
- - - - -

-Files

file  pcap-remote.h [code]
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_9a623c46ccb35c88e86317a093d60fd6.html b/libs/WinPcap-413-173-b4/docs/html/dir_9a623c46ccb35c88e86317a093d60fd6.html deleted file mode 100644 index b9e3455f..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_9a623c46ccb35c88e86317a093d60fd6.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -WinPcap: Win32-Extensions Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
Win32-Extensions Directory Reference
-
-
- - - - -

-Files

file  Win32-Extensions.h [code]
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_a1b0b199cde94c7dd9a3a0ee49bcda2f.html b/libs/WinPcap-413-173-b4/docs/html/dir_a1b0b199cde94c7dd9a3a0ee49bcda2f.html deleted file mode 100644 index 9fd9f2a1..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_a1b0b199cde94c7dd9a3a0ee49bcda2f.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - -WinPcap: driver Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
driver Directory Reference
-
-
- - - - - - -

-Files

file  jitter.h [code]
 
file  Packet.h [code]
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_bfdf43d97a736b6e7ff8b75a9a91328c.html b/libs/WinPcap-413-173-b4/docs/html/dir_bfdf43d97a736b6e7ff8b75a9a91328c.html deleted file mode 100644 index cfb3d5b8..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_bfdf43d97a736b6e7ff8b75a9a91328c.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -WinPcap: packetntx Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
packetntx Directory Reference
-
-
- - - - -

-Directories

directory  driver
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_c57c37b343d3a4fff0db7d2b1fca2561.html b/libs/WinPcap-413-173-b4/docs/html/dir_c57c37b343d3a4fff0db7d2b1fca2561.html deleted file mode 100644 index bbd65d4f..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_c57c37b343d3a4fff0db7d2b1fca2561.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -WinPcap: packetNtx Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
packetNtx Directory Reference
-
-
- - - - -

-Directories

directory  driver
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_dea2d635c47186b23668f72adc643e04.html b/libs/WinPcap-413-173-b4/docs/html/dir_dea2d635c47186b23668f72adc643e04.html deleted file mode 100644 index 31c58873..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_dea2d635c47186b23668f72adc643e04.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -WinPcap: funcs Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
funcs Directory Reference
-
-
- - - - -

-Files

file  funcs/pcap.h [code]
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dir_ec5e29f73a75356204c75c00d090044c.html b/libs/WinPcap-413-173-b4/docs/html/dir_ec5e29f73a75356204c75c00d090044c.html deleted file mode 100644 index 042b431a..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dir_ec5e29f73a75356204c75c00d090044c.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - -WinPcap: driver Directory Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
driver Directory Reference
-
-
- - - - -

-Files

file  ioctls.h [code]
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/doxygen.png b/libs/WinPcap-413-173-b4/docs/html/doxygen.png deleted file mode 100644 index 3ff17d80..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/doxygen.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/doxygen__groups_8txt.html b/libs/WinPcap-413-173-b4/docs/html/doxygen__groups_8txt.html deleted file mode 100644 index e9ff6d2d..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/doxygen__groups_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: doxygen_groups.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
doxygen_groups.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dynsections.js b/libs/WinPcap-413-173-b4/docs/html/dynsections.js deleted file mode 100644 index 1e6bf07f..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/dynsections.js +++ /dev/null @@ -1,104 +0,0 @@ -function toggleVisibility(linkObj) -{ - var base = $(linkObj).attr('id'); - var summary = $('#'+base+'-summary'); - var content = $('#'+base+'-content'); - var trigger = $('#'+base+'-trigger'); - var src=$(trigger).attr('src'); - if (content.is(':visible')===true) { - content.hide(); - summary.show(); - $(linkObj).addClass('closed').removeClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); - } else { - content.show(); - summary.hide(); - $(linkObj).removeClass('closed').addClass('opened'); - $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); - } - return false; -} - -function updateStripes() -{ - $('table.directory tr'). - removeClass('even').filter(':visible:even').addClass('even'); -} - -function toggleLevel(level) -{ - $('table.directory tr').each(function() { - var l = this.id.split('_').length-1; - var i = $('#img'+this.id.substring(3)); - var a = $('#arr'+this.id.substring(3)); - if (l - - - - - -WinPcap: File List - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
File List
-
-
-
Here is a list of all files with brief descriptions:
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2blank.png b/libs/WinPcap-413-173-b4/docs/html/ftv2blank.png deleted file mode 100644 index 63c605bb..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2blank.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2doc.png b/libs/WinPcap-413-173-b4/docs/html/ftv2doc.png deleted file mode 100644 index 17edabff..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2doc.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2folderclosed.png b/libs/WinPcap-413-173-b4/docs/html/ftv2folderclosed.png deleted file mode 100644 index bb8ab35e..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2folderclosed.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2folderopen.png b/libs/WinPcap-413-173-b4/docs/html/ftv2folderopen.png deleted file mode 100644 index d6c7f676..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2folderopen.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2lastnode.png b/libs/WinPcap-413-173-b4/docs/html/ftv2lastnode.png deleted file mode 100644 index 63c605bb..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2lastnode.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2link.png b/libs/WinPcap-413-173-b4/docs/html/ftv2link.png deleted file mode 100644 index 17edabff..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2link.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2mlastnode.png b/libs/WinPcap-413-173-b4/docs/html/ftv2mlastnode.png deleted file mode 100644 index 0b63f6d3..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2mlastnode.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2mnode.png b/libs/WinPcap-413-173-b4/docs/html/ftv2mnode.png deleted file mode 100644 index 0b63f6d3..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2mnode.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2node.png b/libs/WinPcap-413-173-b4/docs/html/ftv2node.png deleted file mode 100644 index 63c605bb..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2node.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2plastnode.png b/libs/WinPcap-413-173-b4/docs/html/ftv2plastnode.png deleted file mode 100644 index c6ee22f9..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2plastnode.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2pnode.png b/libs/WinPcap-413-173-b4/docs/html/ftv2pnode.png deleted file mode 100644 index c6ee22f9..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2pnode.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2splitbar.png b/libs/WinPcap-413-173-b4/docs/html/ftv2splitbar.png deleted file mode 100644 index fe895f2c..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2splitbar.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/ftv2vertline.png b/libs/WinPcap-413-173-b4/docs/html/ftv2vertline.png deleted file mode 100644 index 63c605bb..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/ftv2vertline.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/funcs_2pcap_8h.html b/libs/WinPcap-413-173-b4/docs/html/funcs_2pcap_8h.html deleted file mode 100644 index d47607ab..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/funcs_2pcap_8h.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - -WinPcap: pcap.h File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
-
-
funcs/pcap.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

Windows-specific Extensions

The functions in this section extend libpcap to offer advanced functionalities (like remote packet capture, packet buffer size variation or high-precision packet injection). Howerver, at the moment they can be used only in Windows.

-
PAirpcapHandle pcap_get_airpcap_handle (pcap_t *p)
 Returns the AirPcap handler associated with an adapter. This handler can be used to change the wireless-related settings of the CACE Technologies AirPcap wireless capture adapters. More...
 
int pcap_offline_filter (struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
 Returns if a given filter applies to an offline packet. More...
 
int pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
 Save a capture to file. More...
 
int pcap_live_dump_ended (pcap_t *p, int sync)
 Return the status of the kernel dump process, i.e. tells if one of the limits defined with pcap_live_dump() has been reached. More...
 
struct pcap_statpcap_stats_ex (pcap_t *p, int *pcap_stat_size)
 Return statistics on current capture. More...
 
int pcap_setbuff (pcap_t *p, int dim)
 Set the size of the kernel buffer associated with an adapter. More...
 
int pcap_setmode (pcap_t *p, int mode)
 Set the working mode of the interface p to mode. More...
 
int pcap_setmintocopy (pcap_t *p, int size)
 Set the minumum amount of data received by the kernel in a single call. More...
 
HANDLE pcap_getevent (pcap_t *p)
 Return the handle of the event associated with the interface p. More...
 
pcap_send_queuepcap_sendqueue_alloc (u_int memsize)
 Allocate a send queue. More...
 
void pcap_sendqueue_destroy (pcap_send_queue *queue)
 Destroy a send queue. More...
 
int pcap_sendqueue_queue (pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Add a packet to a send queue. More...
 
u_int pcap_sendqueue_transmit (pcap_t *p, pcap_send_queue *queue, int sync)
 Send a queue of raw packets to the network. More...
 
int pcap_findalldevs_ex (char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
 Create a list of network devices that can be opened with pcap_open(). More...
 
int pcap_createsrcstr (char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
 Accept a set of strings (host name, port, ...), and it returns the complete source string according to the new format (e.g. 'rpcap://1.2.3.4/eth0'). More...
 
int pcap_parsesrcstr (const char *source, int *type, char *host, char *port, char *name, char *errbuf)
 Parse the source string and returns the pieces in which the source can be split. More...
 
pcap_tpcap_open (const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
 Open a generic source in order to capture / send (WinPcap only) traffic. More...
 
struct pcap_samp * pcap_setsampling (pcap_t *p)
 Define a sampling method for packet capture. More...
 
SOCKET pcap_remoteact_accept (const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
 Block until a network connection is accepted (active mode only). More...
 
int pcap_remoteact_close (const char *host, char *errbuf)
 Drop an active connection (active mode only). More...
 
void pcap_remoteact_cleanup ()
 Clean the socket that is currently used in waiting active connections. More...
 
int pcap_remoteact_list (char *hostlist, char sep, int size, char *errbuf)
 Return the hostname of the host that have an active connection with us (active mode only). More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Unix-compatible Functions

These functions are part of the libpcap library, and therefore work both on Windows and on Linux.

Note
errbuf in pcap_open_live(), pcap_open_dead(), pcap_open_offline(), pcap_setnonblock(), pcap_getnonblock(), pcap_findalldevs(), pcap_lookupdev(), and pcap_lookupnet() is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.
-
typedef void(* pcap_handler )(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Prototype of the callback function that receives the packets. More...
 
pcap_tpcap_open_live (const char *device, int snaplen, int promisc, int to_ms, char *ebuf)
 Open a live capture from the network. More...
 
pcap_tpcap_open_dead (int linktype, int snaplen)
 Create a pcap_t structure without starting a capture. More...
 
pcap_tpcap_open_offline (const char *fname, char *errbuf)
 Open a savefile in the tcpdump/libpcap format to read packets. More...
 
pcap_dumper_tpcap_dump_open (pcap_t *p, const char *fname)
 Open a file to write packets. More...
 
int pcap_setnonblock (pcap_t *p, int nonblock, char *errbuf)
 Switch between blocking and nonblocking mode. More...
 
int pcap_getnonblock (pcap_t *p, char *errbuf)
 Get the "non-blocking" state of an interface. More...
 
int pcap_findalldevs (pcap_if_t **alldevsp, char *errbuf)
 Construct a list of network devices that can be opened with pcap_open_live(). More...
 
void pcap_freealldevs (pcap_if_t *alldevsp)
 Free an interface list returned by pcap_findalldevs(). More...
 
char * pcap_lookupdev (char *errbuf)
 Return the first valid device in the system. More...
 
int pcap_lookupnet (const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf)
 Return the subnet and netmask of an interface. More...
 
int pcap_dispatch (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets. More...
 
int pcap_loop (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets. More...
 
u_char * pcap_next (pcap_t *p, struct pcap_pkthdr *h)
 Return the next available packet. More...
 
int pcap_next_ex (pcap_t *p, struct pcap_pkthdr **pkt_header, const u_char **pkt_data)
 Read a packet from an interface or from an offline capture. More...
 
void pcap_breakloop (pcap_t *)
 set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping. More...
 
int pcap_sendpacket (pcap_t *p, u_char *buf, int size)
 Send a raw packet. More...
 
void pcap_dump (u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
 Save a packet to disk. More...
 
long pcap_dump_ftell (pcap_dumper_t *)
 Return the file position for a "savefile". More...
 
int pcap_compile (pcap_t *p, struct bpf_program *fp, char *str, int optimize, bpf_u_int32 netmask)
 Compile a packet filter, converting an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine. More...
 
int pcap_compile_nopcap (int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask)
 Compile a packet filter without the need of opening an adapter. This function converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine. More...
 
int pcap_setfilter (pcap_t *p, struct bpf_program *fp)
 Associate a filter to a capture. More...
 
void pcap_freecode (struct bpf_program *fp)
 Free a filter. More...
 
int pcap_datalink (pcap_t *p)
 Return the link layer of an adapter. More...
 
int pcap_list_datalinks (pcap_t *p, int **dlt_buf)
 list datalinks More...
 
int pcap_set_datalink (pcap_t *p, int dlt)
 Set the current data link type of the pcap descriptor to the type specified by dlt. -1 is returned on failure. More...
 
int pcap_datalink_name_to_val (const char *name)
 Translates a data link type name, which is a DLT_ name with the DLT_ removed, to the corresponding data link type value. The translation is case-insensitive. -1 is returned on failure. More...
 
const char * pcap_datalink_val_to_name (int dlt)
 Translates a data link type value to the corresponding data link type name. NULL is returned on failure. More...
 
const char * pcap_datalink_val_to_description (int dlt)
 Translates a data link type value to a short description of that data link type. NULL is returned on failure. More...
 
int pcap_snapshot (pcap_t *p)
 Return the dimension of the packet portion (in bytes) that is delivered to the application. More...
 
int pcap_is_swapped (pcap_t *p)
 returns true if the current savefile uses a different byte order than the current system. More...
 
int pcap_major_version (pcap_t *p)
 return the major version number of the pcap library used to write the savefile. More...
 
int pcap_minor_version (pcap_t *p)
 return the minor version number of the pcap library used to write the savefile. More...
 
FILE * pcap_file (pcap_t *p)
 Return the standard stream of an offline capture. More...
 
int pcap_stats (pcap_t *p, struct pcap_stat *ps)
 Return statistics on current capture. More...
 
void pcap_perror (pcap_t *p, char *prefix)
 print the text of the last pcap library error on stderr, prefixed by prefix. More...
 
char * pcap_geterr (pcap_t *p)
 return the error text pertaining to the last pcap library error. More...
 
char * pcap_strerror (int error)
 Provided in case strerror() isn't available. More...
 
const char * pcap_lib_version (void)
 Returns a pointer to a string giving information about the version of the libpcap library being used; note that it contains more information than just a version number. More...
 
void pcap_close (pcap_t *p)
 close the files associated with p and deallocates resources. More...
 
FILE * pcap_dump_file (pcap_dumper_t *p)
 return the standard I/O stream of the 'savefile' opened by pcap_dump_open(). More...
 
int pcap_dump_flush (pcap_dumper_t *p)
 Flushes the output buffer to the savefile,'' so that any packets written with pcap_dump() but not yet written to thesavefile'' will be written. -1 is returned on error, 0 on success. More...
 
void pcap_dump_close (pcap_dumper_t *p)
 Closes a savefile. More...
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/funcs_2pcap_8h_source.html b/libs/WinPcap-413-173-b4/docs/html/funcs_2pcap_8h_source.html deleted file mode 100644 index 36a6cdcb..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/funcs_2pcap_8h_source.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - -WinPcap: pcap.h Source File - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
-
-
funcs/pcap.h
-
-
-Go to the documentation of this file.
1 
-
17 //\{
-
18 
-
27 typedef void (*pcap_handler)(u_char *user, const struct pcap_pkthdr *pkt_header,
-
28  const u_char *pkt_data);
-
29 
-
63 pcap_t *pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, char *ebuf);
-
64 
-
65 
-
75 pcap_t *pcap_open_dead(int linktype, int snaplen);
-
76 
-
77 
-
91 pcap_t *pcap_open_offline(const char *fname, char *errbuf);
-
92 
-
105 pcap_dumper_t *pcap_dump_open(pcap_t *p, const char *fname);
-
106 
-
124 int pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf);
-
125 
-
126 
-
136 int pcap_getnonblock(pcap_t *p, char *errbuf);
-
137 
-
153 int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf);
-
154 
-
161 void pcap_freealldevs(pcap_if_t *alldevsp);
-
162 
-
173 char *pcap_lookupdev(char *errbuf);
-
174 
-
175 
-
187 int pcap_lookupnet(const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf);
-
188 
-
227 int pcap_dispatch(pcap_t *p, int cnt, pcap_handler callback, u_char *user);
-
228 
-
229 
-
244 int pcap_loop(pcap_t *p, int cnt, pcap_handler callback, u_char *user);
-
245 
-
246 
-
261 u_char *pcap_next(pcap_t *p, struct pcap_pkthdr *h);
-
262 
-
279 int pcap_next_ex(pcap_t *p, struct pcap_pkthdr **pkt_header, const u_char **pkt_data);
-
280 
-
302 void pcap_breakloop(pcap_t *);
-
303 
-
315 int pcap_sendpacket(pcap_t *p, u_char *buf, int size);
-
316 
-
327 void pcap_dump(u_char *user, const struct pcap_pkthdr *h, const u_char *sp);
-
328 
- -
338 
-
357 int pcap_compile(pcap_t *p, struct bpf_program *fp, char *str, int optimize, bpf_u_int32 netmask);
-
358 
-
378 int pcap_compile_nopcap(int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask);
-
379 
-
380 
-
391 int pcap_setfilter(pcap_t *p, struct bpf_program *fp);
-
392 
-
393 
-
404 void pcap_freecode(struct bpf_program *fp);
-
405 
-
485 int pcap_datalink(pcap_t *p);
-
486 
-
496 int pcap_list_datalinks(pcap_t *p, int **dlt_buf);
-
497 
-
500 int pcap_set_datalink(pcap_t *p, int dlt);
-
501 
-
506 int pcap_datalink_name_to_val(const char *name);
-
507 
-
511 const char *pcap_datalink_val_to_name(int dlt);
-
512 
-
516 const char *pcap_datalink_val_to_description(int dlt);
-
517 
-
518 
-
526 int pcap_snapshot(pcap_t *p);
-
527 
-
528 
-
532 int pcap_is_swapped(pcap_t *p);
-
533 
-
534 
-
539 int pcap_major_version(pcap_t *p);
-
540 
-
541 
-
546 int pcap_minor_version(pcap_t *p);
-
547 
-
562 FILE *pcap_file(pcap_t *p);
-
563 
-
578 int pcap_stats(pcap_t *p, struct pcap_stat *ps);
-
579 
-
584 void pcap_perror(pcap_t *p, char *prefix);
-
585 
-
586 
-
596 char *pcap_geterr(pcap_t *p);
-
597 
-
598 
-
604 char *pcap_strerror(int error);
-
605 
-
610 const char *pcap_lib_version(void);
-
611 
-
617 void pcap_close(pcap_t *p);
-
618 
-
620 FILE *pcap_dump_file(pcap_dumper_t *p);
-
621 
- -
627 
- -
633 
-
634 //\}
-
635 // End of Unix-compatible functions
-
636 
-
637 
-
638 
-
639 
-
640 
-
641 
-
642 
-
649 //\{
-
650 
- -
668 
-
686 int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data);
-
687 
-
712 int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks);
-
713 
-
714 
-
731 int pcap_live_dump_ended(pcap_t *p, int sync);
-
732 
-
733 
-
757 struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size);
-
758 
-
768 int pcap_setbuff(pcap_t *p, int dim);
-
769 
-
770 
-
777 int pcap_setmode(pcap_t *p, int mode);
-
778 
-
779 
-
793 int pcap_setmintocopy(pcap_t *p, int size);
-
794 
-
795 
-
796 
-
806 HANDLE pcap_getevent(pcap_t *p);
-
807 
-
820 pcap_send_queue* pcap_sendqueue_alloc(u_int memsize);
-
821 
- -
829 
-
844 int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data);
-
845 
-
846 
-
870 u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync);
-
871 
-
872 
-
935 int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf);
-
936 
-
937 
-
981 int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf);
-
982 
-
983 
-
1039 int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf);
-
1040 
-
1106 pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf);
-
1107 
-
1123 struct pcap_samp *pcap_setsampling(pcap_t *p);
-
1124 
-
1184 SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf);
-
1185 
-
1202 int pcap_remoteact_close(const char *host, char *errbuf);
-
1203 
-
1222 void pcap_remoteact_cleanup();
-
1223 
-
1244 int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf);
-
1245 
-
1246 //\}
-
1247 // End of Windows-specific extensions
-
1248 
-
1249 
-
1250 
-
int pcap_sendqueue_queue(pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
Add a packet to a send queue.
-
char * pcap_lookupdev(char *errbuf)
Return the first valid device in the system.
-
Header of a packet in the dump file.
Definition: incs/pcap.h:126
-
int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
Create a list of network devices that can be opened with pcap_open().
-
int pcap_list_datalinks(pcap_t *p, int **dlt_buf)
list datalinks
-
pcap_t * pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
Open a generic source in order to capture / send (WinPcap only) traffic.
-
pcap_send_queue * pcap_sendqueue_alloc(u_int memsize)
Allocate a send queue.
-
A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().
-
struct pcap pcap_t
Descriptor of an open capture instance. This structure is opaque to the user, that handles its conten...
Definition: incs/pcap.h:70
-
pcap_t * pcap_open_dead(int linktype, int snaplen)
Create a pcap_t structure without starting a capture.
-
int pcap_is_swapped(pcap_t *p)
returns true if the current savefile uses a different byte order than the current system...
-
void(* pcap_handler)(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
Prototype of the callback function that receives the packets.
Definition: funcs/pcap.h:27
-
void pcap_dump(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
Save a packet to disk.
-
int pcap_datalink(pcap_t *p)
Return the link layer of an adapter.
-
const char * pcap_datalink_val_to_description(int dlt)
Translates a data link type value to a short description of that data link type. NULL is returned on ...
-
long pcap_dump_ftell(pcap_dumper_t *)
Return the file position for a "savefile".
-
void pcap_freealldevs(pcap_if_t *alldevsp)
Free an interface list returned by pcap_findalldevs().
-
Structure that keeps statistical values on an interface.
Definition: incs/pcap.h:136
-
char * pcap_strerror(int error)
Provided in case strerror() isn't available.
-
int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks)
Save a capture to file.
-
char * pcap_geterr(pcap_t *p)
return the error text pertaining to the last pcap library error.
-
int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
Accept a set of strings (host name, port, ...), and it returns the complete source string according t...
-
int pcap_getnonblock(pcap_t *p, char *errbuf)
Get the "non-blocking" state of an interface.
-
HANDLE pcap_getevent(pcap_t *p)
Return the handle of the event associated with the interface p.
-
pcap_t * pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, char *ebuf)
Open a live capture from the network.
-
int pcap_lookupnet(const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf)
Return the subnet and netmask of an interface.
-
int pcap_compile(pcap_t *p, struct bpf_program *fp, char *str, int optimize, bpf_u_int32 netmask)
Compile a packet filter, converting an high level filtering expression (see Filtering expression synt...
-
int pcap_snapshot(pcap_t *p)
Return the dimension of the packet portion (in bytes) that is delivered to the application.
-
struct pcap_stat * pcap_stats_ex(pcap_t *p, int *pcap_stat_size)
Return statistics on current capture.
-
int pcap_setnonblock(pcap_t *p, int nonblock, char *errbuf)
Switch between blocking and nonblocking mode.
-
PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p)
Returns the AirPcap handler associated with an adapter. This handler can be used to change the wirele...
-
int pcap_next_ex(pcap_t *p, struct pcap_pkthdr **pkt_header, const u_char **pkt_data)
Read a packet from an interface or from an offline capture.
-
void pcap_remoteact_cleanup()
Clean the socket that is currently used in waiting active connections.
-
u_char * pcap_next(pcap_t *p, struct pcap_pkthdr *h)
Return the next available packet.
-
void pcap_breakloop(pcap_t *)
set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping.
-
const char * pcap_datalink_val_to_name(int dlt)
Translates a data link type value to the corresponding data link type name. NULL is returned on failu...
-
int pcap_dump_flush(pcap_dumper_t *p)
Flushes the output buffer to the savefile,'' so that any packets written with pcap_dump() but not yet...
-
struct pcap_samp * pcap_setsampling(pcap_t *p)
Define a sampling method for packet capture.
-
int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf)
Parse the source string and returns the pieces in which the source can be split.
-
int pcap_loop(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
Collect a group of packets.
-
int pcap_sendpacket(pcap_t *p, u_char *buf, int size)
Send a raw packet.
-
int pcap_setbuff(pcap_t *p, int dim)
Set the size of the kernel buffer associated with an adapter.
-
int pcap_setmode(pcap_t *p, int mode)
Set the working mode of the interface p to mode.
-
int pcap_dispatch(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
Collect a group of packets.
-
u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue *queue, int sync)
Send a queue of raw packets to the network.
-
void pcap_dump_close(pcap_dumper_t *p)
Closes a savefile.
-
int pcap_minor_version(pcap_t *p)
return the minor version number of the pcap library used to write the savefile.
-
FILE * pcap_file(pcap_t *p)
Return the standard stream of an offline capture.
-
int pcap_remoteact_close(const char *host, char *errbuf)
Drop an active connection (active mode only).
-
struct pcap_dumper pcap_dumper_t
libpcap savefile descriptor.
Definition: incs/pcap.h:71
-
int pcap_compile_nopcap(int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask)
Compile a packet filter without the need of opening an adapter. This function converts an high level ...
-
int pcap_setfilter(pcap_t *p, struct bpf_program *fp)
Associate a filter to a capture.
-
int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf)
Return the hostname of the host that have an active connection with us (active mode only)...
-
struct _AirpcapHandle * PAirpcapHandle
-
const char * pcap_lib_version(void)
Returns a pointer to a string giving information about the version of the libpcap library being used;...
-
int pcap_datalink_name_to_val(const char *name)
Translates a data link type name, which is a DLT_ name with the DLT_ removed, to the corresponding da...
-
void pcap_perror(pcap_t *p, char *prefix)
print the text of the last pcap library error on stderr, prefixed by prefix.
-
pcap_dumper_t * pcap_dump_open(pcap_t *p, const char *fname)
Open a file to write packets.
-
FILE * pcap_dump_file(pcap_dumper_t *p)
return the standard I/O stream of the 'savefile' opened by pcap_dump_open().
-
SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
Block until a network connection is accepted (active mode only).
-
Item in a list of interfaces, used by pcap_findalldevs().
Definition: incs/pcap.h:148
-
int pcap_setmintocopy(pcap_t *p, int size)
Set the minumum amount of data received by the kernel in a single call.
-
int pcap_live_dump_ended(pcap_t *p, int sync)
Return the status of the kernel dump process, i.e. tells if one of the limits defined with pcap_live_...
-
pcap_t * pcap_open_offline(const char *fname, char *errbuf)
Open a savefile in the tcpdump/libpcap format to read packets.
-
int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
Returns if a given filter applies to an offline packet.
-
u_int bpf_u_int32
32-bit unsigned integer
Definition: incs/pcap.h:67
-
int pcap_set_datalink(pcap_t *p, int dlt)
Set the current data link type of the pcap descriptor to the type specified by dlt. -1 is returned on failure.
-
int pcap_findalldevs(pcap_if_t **alldevsp, char *errbuf)
Construct a list of network devices that can be opened with pcap_open_live().
-
void pcap_sendqueue_destroy(pcap_send_queue *queue)
Destroy a send queue.
-
void pcap_close(pcap_t *p)
close the files associated with p and deallocates resources.
-
void pcap_freecode(struct bpf_program *fp)
Free a filter.
-
int pcap_major_version(pcap_t *p)
return the major version number of the pcap library used to write the savefile.
-
int pcap_stats(pcap_t *p, struct pcap_stat *ps)
Return statistics on current capture.
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_c.html b/libs/WinPcap-413-173-b4/docs/html/globals_c.html deleted file mode 100644 index 45acb3bb..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_c.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- c -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_d.html b/libs/WinPcap-413-173-b4/docs/html/globals_d.html deleted file mode 100644 index 67bae097..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_d.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- d -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_e.html b/libs/WinPcap-413-173-b4/docs/html/globals_e.html deleted file mode 100644 index dd377988..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_e.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- e -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_g.html b/libs/WinPcap-413-173-b4/docs/html/globals_g.html deleted file mode 100644 index 6bcf8181..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_g.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- g -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_i.html b/libs/WinPcap-413-173-b4/docs/html/globals_i.html deleted file mode 100644 index 291e36b6..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_i.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- i -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_j.html b/libs/WinPcap-413-173-b4/docs/html/globals_j.html deleted file mode 100644 index 536f24de..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_j.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- j -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_k.html b/libs/WinPcap-413-173-b4/docs/html/globals_k.html deleted file mode 100644 index 6b8cc893..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_k.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- k -

    -
  • KERNEL_EVENT_NAMESPACE -: Packet.h -
  • -
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_m.html b/libs/WinPcap-413-173-b4/docs/html/globals_m.html deleted file mode 100644 index 230dbb3d..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_m.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- m -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_o.html b/libs/WinPcap-413-173-b4/docs/html/globals_o.html deleted file mode 100644 index 83422338..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_o.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- o -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_s.html b/libs/WinPcap-413-173-b4/docs/html/globals_s.html deleted file mode 100644 index dec93b87..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_s.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- s -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_t.html b/libs/WinPcap-413-173-b4/docs/html/globals_t.html deleted file mode 100644 index 36b15d30..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_t.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- t -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/globals_u.html b/libs/WinPcap-413-173-b4/docs/html/globals_u.html deleted file mode 100644 index 240aa154..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/globals_u.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - -WinPcap: Globals - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - - -
-
-
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:
- -

- u -

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__NPF__code.html b/libs/WinPcap-413-173-b4/docs/html/group__NPF__code.html deleted file mode 100644 index 20d501e5..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__NPF__code.html +++ /dev/null @@ -1,1671 +0,0 @@ - - - - - - -WinPcap: NPF functions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 The initialization routine of the driver. More...
 
PWCHAR getAdaptersList (VOID)
 Returns the list of the MACs available on the system. More...
 
PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings (VOID)
 Returns the MACs that bind to TCP/IP. More...
 
BOOLEAN NPF_CreateDevice (IN OUT PDRIVER_OBJECT adriverObjectP, IN PUNICODE_STRING amacNameP)
 Creates a device for a given MAC. More...
 
NTSTATUS NPF_Open (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Opens a new instance of the driver. More...
 
VOID NPF_OpenAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus)
 Ends the opening of an adapter. More...
 
NTSTATUS NPF_Cleanup (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Closes an instance of the driver. More...
 
NTSTATUS NPF_Close (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
VOID NPF_CloseAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends the closing of an adapter. More...
 
NDIS_STATUS NPF_tap (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE MacReceiveContext, IN PVOID HeaderBuffer, IN UINT HeaderBufferSize, IN PVOID LookAheadBuffer, IN UINT LookaheadBufferSize, IN UINT PacketSize)
 Callback invoked by NDIS when a packet arrives from the network. More...
 
VOID NPF_TransferDataComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET Packet, IN NDIS_STATUS Status, IN UINT BytesTransferred)
 Ends the transfer of a packet. More...
 
VOID NPF_ReceiveComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback function that signals the end of a packet reception. More...
 
NTSTATUS NPF_IoControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Handles the IOCTL calls. More...
 
VOID NPF_RequestComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_REQUEST pRequest, IN NDIS_STATUS Status)
 Ends an OID request. More...
 
NTSTATUS NPF_Write (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Writes a raw packet to the network. More...
 
INT NPF_BufferedWrite (IN PIRP Irp, IN PCHAR UserBuff, IN ULONG UserBuffSize, BOOLEAN sync)
 Writes a buffer of raw packets to the network. More...
 
VOID NPF_WaitEndOfBufferedWrite (POPEN_INSTANCE Open)
 Waits the completion of all the sends performed by NPF_BufferedWrite. More...
 
VOID NPF_SendComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET pPacket, IN NDIS_STATUS Status)
 Ends a send operation. More...
 
VOID NPF_ResetComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends a reset of the adapter. More...
 
VOID NPF_Status (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN PVOID StatusBuffer, IN UINT StatusBufferSize)
 Callback for NDIS StatusHandler. Not used by NPF. More...
 
VOID NPF_StatusComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback for NDIS StatusCompleteHandler. Not used by NPF. More...
 
VOID NPF_Unload (IN PDRIVER_OBJECT DriverObject)
 Function called by the OS when NPF is unloaded. More...
 
NTSTATUS NPF_Read (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Function that serves the user's reads. More...
 
NTSTATUS NPF_ReadRegistry (IN PWSTR *MacDriverName, IN PWSTR *PacketDriverName, IN PUNICODE_STRING RegistryPath)
 Reads the registry keys associated woth NPF if the driver is manually installed via the control panel. More...
 
NTSTATUS NPF_QueryRegistryRoutine (IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
 Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF if the driver is manually installed via the control panel. More...
 
VOID NPF_BindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE BindContext, IN PNDIS_STRING DeviceName, IN PVOID SystemSpecific1, IN PVOID SystemSpecific2)
 Callback for NDIS BindAdapterHandler. Not used by NPF. More...
 
VOID NPF_UnbindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE UnbindContext)
 Callback for NDIS UnbindAdapterHandler. More...
 
NTSTATUS NPF_OpenDumpFile (POPEN_INSTANCE Open, PUNICODE_STRING fileName, BOOLEAN append)
 Creates the file that will receive the packets when the driver is in dump mode. More...
 
NTSTATUS NPF_StartDump (POPEN_INSTANCE Open)
 Starts dump to file. More...
 
VOID NPF_DumpThread (PVOID Open)
 The dump thread. More...
 
NTSTATUS NPF_SaveCurrentBuffer (POPEN_INSTANCE Open)
 Saves the content of the packet buffer to the file associated with current instance. More...
 
VOID NPF_WriteDumpFile (PFILE_OBJECT FileObject, PLARGE_INTEGER Offset, ULONG Length, PMDL Mdl, PIO_STATUS_BLOCK IoStatusBlock)
 Writes a block of packets on the dump file. More...
 
NTSTATUS NPF_CloseDumpFile (POPEN_INSTANCE Open)
 Closes the dump file associated with an instance of the driver. More...
 
BOOLEAN NPF_StartUsingBinding (IN POPEN_INSTANCE pOpen)
 
VOID NPF_StopUsingBinding (IN POPEN_INSTANCE pOpen)
 
VOID NPF_CloseBinding (IN POPEN_INSTANCE pOpen)
 
BOOLEAN NPF_StartUsingOpenInstance (IN POPEN_INSTANCE pOpen)
 
VOID NPF_StopUsingOpenInstance (IN POPEN_INSTANCE pOpen)
 
VOID NPF_CloseOpenInstance (IN POPEN_INSTANCE pOpen)
 
NTSTATUS NPF_GetDeviceMTU (IN POPEN_INSTANCE pOpen, IN PIRP pIrp, OUT PUINT pMtu)
 
UINT GetBuffOccupation (POPEN_INSTANCE Open)
 Returns the amount of bytes present in the packet buffer. More...
 
JIT_BPF_FilterBPF_jitter (struct bpf_insn *fp, INT nins)
 BPF jitter, builds an x86 function from a BPF program. More...
 
BPF_filter_function BPFtoX86 (struct bpf_insn *ins, UINT nins, INT *mem)
 Translates a set of BPF instructions in a set of x86 ones. More...
 
void BPF_Destroy_JIT_Filter (JIT_BPF_Filter *Filter)
 Deletes a filtering function that was previously created by BPF_jitter(). More...
 
-

Detailed Description

-

Function Documentation

- -
-
- - - - - - - - -
void BPF_Destroy_JIT_Filter (JIT_BPF_FilterFilter)
-
- -

Deletes a filtering function that was previously created by BPF_jitter().

-
Parameters
- - -
FilterThe filter to destroy.
-
-
-

This function frees the variuos buffers (code, memory, etc.) associated with a filtering function.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
JIT_BPF_Filter* BPF_jitter (struct bpf_insn * fp,
INT nins 
)
-
- -

BPF jitter, builds an x86 function from a BPF program.

-
Parameters
- - - -
fpThe BPF pseudo-assembly filter that will be translated into x86 code.
ninsNumber of instructions of the input filter.
-
-
-
Returns
The JIT_BPF_Filter structure containing the x86 filtering binary.
-

BPF_jitter allocates the buffers for the new native filter and then translates the program pointed by fp calling BPFtoX86().

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
BPF_filter_function BPFtoX86 (struct bpf_insn * ins,
UINT nins,
INT * mem 
)
-
- -

Translates a set of BPF instructions in a set of x86 ones.

-
Parameters
- - - - -
insPointer to the BPF instructions that will be translated into x86 code.
ninsNumber of instructions to translate.
memMemory used by the x86 function to emulate the RAM of the BPF pseudo processor.
-
-
-
Returns
The x86 filtering function.
-

This function does the hard work for the JIT compilation. It takes a group of BPF pseudo instructions and through the instruction macros defined in jitter.h it is able to create an function directly executable by NPF.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath 
)
-
- -

The initialization routine of the driver.

-
Parameters
- - - -
DriverObjectThe driver object of NPF created by the system.
RegistryPathThe registry path containing the keys related to the driver.
-
-
-
Returns
A string containing a list of network adapters.
-

DriverEntry is a mandatory function in a device driver. Like the main() of a user level program, it is called by the system when the driver is loaded in memory and started. Its purpose is to initialize the driver, performing all the allocations and the setup. In particular, DriverEntry registers all the driver's I/O callbacks, creates the devices, defines NPF as a protocol inside NDIS.

- -
-
- -
-
- - - - - - - - -
PWCHAR getAdaptersList (VOID )
-
- -

Returns the list of the MACs available on the system.

-
Returns
A string containing a list of network adapters.
-

The list of adapters is retrieved from the SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318} registry key. NPF tries to create its bindings from this list. In this way it is possible to be loaded and unloaded dynamically without passing from the control panel.

- -
-
- -
-
- - - - - - - - -
UINT GetBuffOccupation (POPEN_INSTANCE Open)
-
- -

Returns the amount of bytes present in the packet buffer.

-
Parameters
- - -
OpenThe NPF instance that closes the file.
-
-
- -
-
- -
-
- - - - - - - - -
PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings (VOID )
-
- -

Returns the MACs that bind to TCP/IP.

-
Returns
Pointer to the registry key containing the list of adapters on which TCP/IP is bound.
-

If getAdaptersList() fails, NPF tries to obtain the TCP/IP bindings through this function.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_BindAdapter (OUT PNDIS_STATUS Status,
IN NDIS_HANDLE BindContext,
IN PNDIS_STRING DeviceName,
IN PVOID SystemSpecific1,
IN PVOID SystemSpecific2 
)
-
- -

Callback for NDIS BindAdapterHandler. Not used by NPF.

-

Function called by NDIS when a new adapter is installed on the machine With Plug and Play.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
INT NPF_BufferedWrite (IN PIRP Irp,
IN PCHAR UserBuff,
IN ULONG UserBuffSize,
BOOLEAN sync 
)
-
- -

Writes a buffer of raw packets to the network.

-
Parameters
- - - - - -
IrpPointer to the IRP containing the user request.
UserBuffPointer to the buffer containing the packets to send.
UserBuffSizeSize of the buffer with the packets.
syncIf set to TRUE, the packets are transmitted respecting their timestamps.
-
-
-
Returns
The amount of bytes actually sent. If the return value is smaller than the Size parameter, an error occurred during the send. The error can be caused by an adapter problem or by an inconsistent/bogus user buffer.
-

This function is called by the OS in consequence of a BIOCSENDPACKETSNOSYNC or a BIOCSENDPACKETSSYNC IOCTL. The buffer received as input parameter contains an arbitrary number of packets, each of which preceded by a sf_pkthdr structure. NPF_BufferedWrite() scans the buffer and sends every packet via the NdisSend() function. When Sync is set to TRUE, the packets are synchronized with the KeQueryPerformanceCounter() function. This requires a remarkable amount of CPU, but allows to respect the timestamps associated with packets with a precision of some microseconds (depending on the precision of the performance counter of the machine). If Sync is false, the timestamps are ignored and the packets are sent as fat as possible.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Cleanup (IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp 
)
-
- -

Closes an instance of the driver.

-
Parameters
- - - -
DeviceObjectPointer to the device object utilized by the user.
IrpPointer to the IRP containing the user request.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
-

This function is called when a running instance of the driver is closed by the user with a CloseHandle(). It stops the capture/monitoring/dump process, deallocates the memory and the objects associated with the instance and closing the files. The network adapter is then closed with a call to NdisCloseAdapter.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Close (IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
VOID NPF_CloseAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext,
IN NDIS_STATUS Status 
)
-
- -

Ends the closing of an adapter.

-
Parameters
- - - -
ProtocolBindingContextContext of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
StatusStatus of the close operation performed by NDIS.
-
-
-

Callback function associated with the NdisCloseAdapter() NDIS function. It is invoked by NDIS when the NIC driver has finished a close operation that was previously started by NPF_Close().

- -
-
- -
-
- - - - - - - - -
VOID NPF_CloseBinding (IN POPEN_INSTANCE pOpen)
-
- -
-
- -
-
- - - - - - - - -
NTSTATUS NPF_CloseDumpFile (POPEN_INSTANCE Open)
-
- -

Closes the dump file associated with an instance of the driver.

-
Parameters
- - -
OpenThe NPF instance that closes the file.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
- -
-
- -
-
- - - - - - - - -
VOID NPF_CloseOpenInstance (IN POPEN_INSTANCE pOpen)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
BOOLEAN NPF_CreateDevice (IN OUT PDRIVER_OBJECT adriverObjectP,
IN PUNICODE_STRING amacNameP 
)
-
- -

Creates a device for a given MAC.

-
Parameters
- - - -
adriverObjectPThe driver object that will be associated with the device, i.e. the one of NPF.
amacNamePThe name of the network interface that the device will point.
-
-
-
Returns
If the function succeeds, the return value is nonzero.
-

NPF creates a device for every valid network adapter. The new device points to the NPF driver, but contains information about the original device. In this way, when the user opens the new device, NPF will be able to determine the correct adapter to use.

- -
-
- -
-
- - - - - - - - -
VOID NPF_DumpThread (PVOID Open)
-
- -

The dump thread.

-
Parameters
- - -
OpenThe NPF instance that creates the thread.
-
-
-

This function moves the content of the NPF kernel buffer to file. It runs in the user context, so at lower priority than the TAP.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_GetDeviceMTU (IN POPEN_INSTANCE pOpen,
IN PIRP pIrp,
OUT PUINT pMtu 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_IoControl (IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp 
)
-
- -

Handles the IOCTL calls.

-
Parameters
- - - -
DeviceObjectPointer to the device object utilized by the user.
IrpPointer to the IRP containing the user request.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
-

Once the packet capture driver is opened it can be configured from user-level applications with IOCTL commands using the DeviceIoControl() system call. NPF_IoControl receives and serves all the IOCTL calls directed to NPF. The following commands are recognized:

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Open (IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp 
)
-
- -

Opens a new instance of the driver.

-
Parameters
- - - -
DeviceObjectPointer to the device object utilized by the user.
IrpPointer to the IRP containing the user request.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
-

This function is called by the OS when a new instance of the driver is opened, i.e. when a user application performs a CreateFile on a device created by NPF. NPF_Open allocates and initializes variables, objects and buffers needed by the new instance, fills the OPEN_INSTANCE structure associated with it and opens the adapter with a call to NdisOpenAdapter.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_OpenAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext,
IN NDIS_STATUS Status,
IN NDIS_STATUS OpenErrorStatus 
)
-
- -

Ends the opening of an adapter.

-
Parameters
- - - - -
ProtocolBindingContextContext of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
StatusStatus of the opening operation performed by NDIS.
OpenErrorStatusnot used by NPF.
-
-
-

Callback function associated with the NdisOpenAdapter() NDIS function. It is invoked by NDIS when the NIC driver has finished an open operation that was previously started by NPF_Open().

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_OpenDumpFile (POPEN_INSTANCE Open,
PUNICODE_STRING fileName,
BOOLEAN append 
)
-
- -

Creates the file that will receive the packets when the driver is in dump mode.

-
Parameters
- - - - -
OpenThe NPF instance that opens the file.
fileNamePointer to a UNICODE string containing the name of the file.
appendBoolean value that specifies if the data must be appended to the file.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_QueryRegistryRoutine (IN PWSTR ValueName,
IN ULONG ValueType,
IN PVOID ValueData,
IN ULONG ValueLength,
IN PVOID Context,
IN PVOID EntryContext 
)
-
- -

Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF if the driver is manually installed via the control panel.

-

Normally not used in recent versions of NPF.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Read (IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp 
)
-
- -

Function that serves the user's reads.

-
Parameters
- - - -
DeviceObjectPointer to the device used by the user.
IrpPointer to the IRP containing the user request.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
-

This function is called by the OS in consequence of user ReadFile() call. It moves the data present in the kernel buffer to the user buffer associated with Irp. First of all, NPF_Read checks the amount of data in kernel buffer associated with current NPF instance.

    -
  • If the instance is in capture mode and the buffer contains more than OPEN_INSTANCE::MinToCopy bytes, NPF_Read moves the data in the user buffer and returns immediatly. In this way, the read performed by the user is not blocking.
  • -
  • If the buffer contains less than MinToCopy bytes, the application's request isn't satisfied immediately, but it's blocked until at least MinToCopy bytes arrive from the net or the timeout on this read expires. The timeout is kept in the OPEN_INSTANCE::TimeOut field.
  • -
  • If the instance is in statistical mode or in dump mode, the application's request is blocked until the timeout kept in OPEN_INSTANCE::TimeOut expires.
  • -
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_ReadRegistry (IN PWSTR * MacDriverName,
IN PWSTR * PacketDriverName,
IN PUNICODE_STRING RegistryPath 
)
-
- -

Reads the registry keys associated woth NPF if the driver is manually installed via the control panel.

-

Normally not used in recent versions of NPF.

- -
-
- -
-
- - - - - - - - -
VOID NPF_ReceiveComplete (IN NDIS_HANDLE ProtocolBindingContext)
-
- -

Callback function that signals the end of a packet reception.

-
Parameters
- - -
ProtocolBindingContextContext of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
-
-
-

does nothing in NPF

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_RequestComplete (IN NDIS_HANDLE ProtocolBindingContext,
IN PNDIS_REQUEST pRequest,
IN NDIS_STATUS Status 
)
-
- -

Ends an OID request.

-
Parameters
- - - - -
ProtocolBindingContextContext of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
pRequestPointer to the completed OID request.
StatusStatus of the operation.
-
-
-

Callback function associated with the NdisRequest() NDIS function. It is invoked by NDIS when the NIC driver has finished an OID request operation that was previously started by NPF_IoControl().

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
VOID NPF_ResetComplete (IN NDIS_HANDLE ProtocolBindingContext,
IN NDIS_STATUS Status 
)
-
- -

Ends a reset of the adapter.

-
Parameters
- - - -
ProtocolBindingContextContext of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
StatusStatus of the operation.
-
-
-

Callback function associated with the NdisReset() NDIS function. It is invoked by NDIS when the NIC driver has finished an OID request operation that was previously started by NPF_IoControl(), in an IOCTL_PROTOCOL_RESET command.

- -
-
- -
-
- - - - - - - - -
NTSTATUS NPF_SaveCurrentBuffer (POPEN_INSTANCE Open)
-
- -

Saves the content of the packet buffer to the file associated with current instance.

-
Parameters
- - -
OpenThe NPF instance that creates the thread.
-
-
-

Used by NPF_DumpThread() and NPF_CloseDumpFile().

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_SendComplete (IN NDIS_HANDLE ProtocolBindingContext,
IN PNDIS_PACKET pPacket,
IN NDIS_STATUS Status 
)
-
- -

Ends a send operation.

-
Parameters
- - - - -
ProtocolBindingContextContext of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
pPacketPointer to the NDIS PACKET structure used by NPF_Write() to send the packet.
StatusStatus of the operation.
-
-
-

Callback function associated with the NdisSend() NDIS function. It is invoked by NDIS when the NIC driver has finished an OID request operation that was previously started by NPF_Write().

- -
-
- -
-
- - - - - - - - -
NTSTATUS NPF_StartDump (POPEN_INSTANCE Open)
-
- -

Starts dump to file.

-
Parameters
- - -
OpenThe NPF instance that opens the file.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
-

This function performs two operations. First, it writes the libpcap header at the beginning of the file. Second, it starts the thread that asynchronously dumps the network data to the file.

- -
-
- -
-
- - - - - - - - -
BOOLEAN NPF_StartUsingBinding (IN POPEN_INSTANCE pOpen)
-
- -
-
- -
-
- - - - - - - - -
BOOLEAN NPF_StartUsingOpenInstance (IN POPEN_INSTANCE pOpen)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_Status (IN NDIS_HANDLE ProtocolBindingContext,
IN NDIS_STATUS Status,
IN PVOID StatusBuffer,
IN UINT StatusBufferSize 
)
-
- -

Callback for NDIS StatusHandler. Not used by NPF.

- -
-
- -
-
- - - - - - - - -
VOID NPF_StatusComplete (IN NDIS_HANDLE ProtocolBindingContext)
-
- -

Callback for NDIS StatusCompleteHandler. Not used by NPF.

- -
-
- -
-
- - - - - - - - -
VOID NPF_StopUsingBinding (IN POPEN_INSTANCE pOpen)
-
- -
-
- -
-
- - - - - - - - -
VOID NPF_StopUsingOpenInstance (IN POPEN_INSTANCE pOpen)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NDIS_STATUS NPF_tap (IN NDIS_HANDLE ProtocolBindingContext,
IN NDIS_HANDLE MacReceiveContext,
IN PVOID HeaderBuffer,
IN UINT HeaderBufferSize,
IN PVOID LookAheadBuffer,
IN UINT LookaheadBufferSize,
IN UINT PacketSize 
)
-
- -

Callback invoked by NDIS when a packet arrives from the network.

-
Parameters
- - - - - - - - -
ProtocolBindingContextContext of the function. Points to a OPEN_INSTANCE structure that identifies the NPF instance to which the packets are destined.
MacReceiveContextHandle that identifies the underlying NIC driver that generated the request. This value must be used when the packet is transferred from the NIC driver with NdisTransferData().
HeaderBufferPointer to the buffer in the NIC driver memory that contains the header of the packet.
HeaderBufferSizeSize in bytes of the header.
LookAheadBufferPointer to the buffer in the NIC driver's memory that contains the incoming packet's data available to NPF. This value does not necessarily coincide with the actual size of the packet, since only a portion can be available at this time. The remaining portion can be obtained with the NdisTransferData() NDIS function.
LookaheadBufferSizeSize in bytes of the lookahead buffer.
PacketSizeTotal size of the incoming packet, excluded the header.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
-

NPF_tap() is called by the underlying NIC for every incoming packet. It is the most important and one of the most complex functions of NPF: it executes the filter, runs the statistical engine (if the instance is in statistical mode), gathers the timestamp, moves the packet in the buffer. NPF_tap() is the only function, along with the filtering ones, that is executed for every incoming packet, therefore it is carefully optimized.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_TransferDataComplete (IN NDIS_HANDLE ProtocolBindingContext,
IN PNDIS_PACKET Packet,
IN NDIS_STATUS Status,
IN UINT BytesTransferred 
)
-
- -

Ends the transfer of a packet.

-
Parameters
- - - - - -
ProtocolBindingContextContext of the function. Contains a pointer to the OPEN_INSTANCE structure associated with the current instance.
PacketPointer to the NDIS_PACKET structure that received the packet data.
StatusStatus of the transfer operation.
BytesTransferredAmount of bytes transferred.
-
-
-

Callback function associated with the NdisTransferData() NDIS function. It is invoked by NDIS when the NIC driver has finished the transfer of a packet from the NIC driver memory to the NPF circular buffer.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_UnbindAdapter (OUT PNDIS_STATUS Status,
IN NDIS_HANDLE ProtocolBindingContext,
IN NDIS_HANDLE UnbindContext 
)
-
- -

Callback for NDIS UnbindAdapterHandler.

-
Parameters
- - - - -
Statusout variable filled by NPF_UnbindAdapter with the status of the unbind operation.
ProtocolBindingContextContext of the function. Contains a pointer to the OPEN_INSTANCE structure associated with current instance.
UnbindContextSpecifies a handle, supplied by NDIS, that NPF can use to complete the opration.
-
-
-

Function called by NDIS when a new adapter is removed from the machine without shutting it down. NPF_UnbindAdapter closes the adapter calling NdisCloseAdapter() and frees the memory and the structures associated with it. It also releases the waiting user-level app and closes the dump thread if the instance is in dump mode.

- -
-
- -
-
- - - - - - - - -
VOID NPF_Unload (IN PDRIVER_OBJECT DriverObject)
-
- -

Function called by the OS when NPF is unloaded.

-
Parameters
- - -
DriverObjectThe driver object of NPF created by the system.
-
-
-

This is the last function executed when the driver is unloaded from the system. It frees global resources, delete the devices and deregisters the protocol. The driver can be unloaded by the user stopping the NPF service (from control panel or with a console 'net stop npf').

- -
-
- -
-
- - - - - - - - -
VOID NPF_WaitEndOfBufferedWrite (POPEN_INSTANCE Open)
-
- -

Waits the completion of all the sends performed by NPF_BufferedWrite.

-
Parameters
- - -
OpenPointer to open context structure
-
-
-

Used by NPF_BufferedWrite to wait the completion of all the sends before returning the control to the user.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
NTSTATUS NPF_Write (IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp 
)
-
- -

Writes a raw packet to the network.

-
Parameters
- - - -
DeviceObjectPointer to the device object on which the user wrote the packet.
IrpPointer to the IRP containing the user request.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
-

This function is called by the OS in consequence of user WriteFile() call, with the data of the packet that must be sent on the net. The data is contained in the buffer associated with Irp, NPF_Write takes it and delivers it to the NIC driver via the NdisSend() function. The Nwrites field of the OPEN_INSTANCE structure associated with Irp indicates the number of copies of the packet that will be sent: more than one copy of the packet can be sent for performance reasons.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VOID NPF_WriteDumpFile (PFILE_OBJECT FileObject,
PLARGE_INTEGER Offset,
ULONG Length,
PMDL Mdl,
PIO_STATUS_BLOCK IoStatusBlock 
)
-
- -

Writes a block of packets on the dump file.

-
Parameters
- - - - - - -
FileObjectThe file object that will receive the packets.
OffsetThe offset in the file where the packets will be put.
LengthThe amount of bytes to write.
MdlMDL mapping the memory buffer that will be written to disk.
IoStatusBlockUsed by the function to return the status of the operation.
-
-
-
Returns
The status of the operation. See ntstatus.h in the DDK.
-

NPF_WriteDumpFile addresses directly the file system, creating a custom IRP and using it to send a portion of the NPF circular buffer to disk. This function is used by NPF_DumpThread().

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__NPF__include.html b/libs/WinPcap-413-173-b4/docs/html/group__NPF__include.html deleted file mode 100644 index 2dc61634..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__NPF__include.html +++ /dev/null @@ -1,796 +0,0 @@ - - - - - - -WinPcap: NPF structures and definitions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  packet_file_header
 Header of a libpcap dump file. More...
 
struct  sf_pkthdr
 Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler. More...
 
struct  _PACKET_OID_DATA
 Structure containing an OID request. More...
 
struct  _INTERNAL_REQUEST
 Stores an OID request. More...
 
struct  _PACKET_RESERVED
 Contains a NDIS packet. More...
 
struct  _DEVICE_EXTENSION
 Port device extension. More...
 
struct  __CPU_Private_Data
 Kernel buffer of each CPU. More...
 
struct  _OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver. More...
 
struct  PacketHeader
 Structure prepended to each packet in the kernel buffer pool. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define MAX_REQUESTS   32
 Maximum number of simultaneous IOCTL requests. More...
 
#define Packet_ALIGNMENT   sizeof(int)
 Alignment macro. Defines the alignment size. More...
 
#define Packet_WORDALIGN(x)   (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
 even multiple of Packet_ALIGNMENT. More...
 
#define KERNEL_EVENT_NAMESPACE   L"\\BaseNamedObjects\\"
 
#define MODE_CAPT   0x0
 Capture working mode. More...
 
#define MODE_STAT   0x1
 Statistical working mode. More...
 
#define MODE_MON   0x2
 Kernel monitoring mode. More...
 
#define MODE_DUMP   0x10
 Kernel dump working mode. More...
 
#define IMMEDIATE   1
 Immediate timeout. Forces a read call to return immediately. More...
 
#define NDIS_FLAGS_SKIP_LOOPBACK_W2K   0x400
 This is an undocumented flag for NdisSetPacketFlags() that allows to disable loopback reception. More...
 
#define TCPDUMP_MAGIC   0xa1b2c3d4
 Libpcap magic number. Used by programs like tcpdump to recognize a driver's generated dump file. More...
 
#define PCAP_VERSION_MAJOR   2
 Major libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file. More...
 
#define PCAP_VERSION_MINOR   4
 Minor libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file. More...
 
#define NPF_DISABLE_LOOPBACK   1
 Tells the driver to drop the packets sent by itself. This is usefult when building applications like bridges. More...
 
#define NPF_ENABLE_LOOPBACK   2
 Tells the driver to capture the packets sent by itself. More...
 
#define C_ASSERT(a)
 
#define RESERVED(_p)   ((PPACKET_RESERVED)((_p)->ProtocolReserved))
 Macro to obtain a NDIS_PACKET from a PACKET_RESERVED. More...
 
#define TRANSMIT_PACKETS   256
 of packets that can be transmitted at the same time or with a single call to NdisSendPackets. More...
 
#define EXIT_SUCCESS(quantity)
 Macro used in the I/O routines to return the control to user-mode with a success status. More...
 
#define EXIT_FAILURE(quantity)
 Macro used in the I/O routines to return the control to user-mode with a failure status. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Typedefs

typedef struct _PACKET_OID_DATA PACKET_OID_DATA
 Structure containing an OID request. More...
 
typedef struct _PACKET_OID_DATAPPACKET_OID_DATA
 
typedef struct _INTERNAL_REQUEST INTERNAL_REQUEST
 Stores an OID request. More...
 
typedef struct _INTERNAL_REQUESTPINTERNAL_REQUEST
 
typedef struct _PACKET_RESERVED PACKET_RESERVED
 Contains a NDIS packet. More...
 
typedef struct _PACKET_RESERVEDPPACKET_RESERVED
 
typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION
 Port device extension. More...
 
typedef struct _DEVICE_EXTENSIONPDEVICE_EXTENSION
 
typedef struct __CPU_Private_Data CpuPrivateData
 Kernel buffer of each CPU. More...
 
typedef struct _OPEN_INSTANCE OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver. More...
 
typedef struct _OPEN_INSTANCEPOPEN_INSTANCE
 
- - - -

-Enumerations

enum  ADAPTER_BINDING_STATUS { ADAPTER_UNBOUND, -ADAPTER_BOUND, -ADAPTER_UNBINDING - }
 
- - - -

-Functions

 C_ASSERT (sizeof(PACKET_OID_DATA)==12)
 
- - - - - - - - - -

-Variables

ULONG g_NCpu
 
NDIS_HANDLE g_NdisProtocolHandle
 
struct time_conv G_Start_Time
 
UINT g_SendPacketFlags
 
-

Detailed Description

-

Macro Definition Documentation

- -
-
- - - - - - - - -
#define C_ASSERT( a)
-
- -

Definition at line 133 of file Packet.h.

- -
-
- -
-
- - - - - - - - -
#define EXIT_FAILURE( quantity)
-
-Value:
Irp->IoStatus.Information=quantity;\
-
Irp->IoStatus.Status = STATUS_UNSUCCESSFUL;\
-
IoCompleteRequest(Irp, IO_NO_INCREMENT);\
-
return STATUS_UNSUCCESSFUL;\
-
-

Macro used in the I/O routines to return the control to user-mode with a failure status.

- -

Definition at line 363 of file Packet.h.

- -
-
- -
-
- - - - - - - - -
#define EXIT_SUCCESS( quantity)
-
-Value:
Irp->IoStatus.Information=quantity;\
-
Irp->IoStatus.Status = STATUS_SUCCESS;\
-
IoCompleteRequest(Irp, IO_NO_INCREMENT);\
-
return STATUS_SUCCESS;\
-
-

Macro used in the I/O routines to return the control to user-mode with a success status.

- -

Definition at line 357 of file Packet.h.

- -
-
- -
-
- - - - -
#define IMMEDIATE   1
-
- -

Immediate timeout. Forces a read call to return immediately.

- -

Definition at line 87 of file Packet.h.

- -
-
- -
-
- - - - -
#define KERNEL_EVENT_NAMESPACE   L"\\BaseNamedObjects\\"
-
- -

Definition at line 77 of file Packet.h.

- -
-
- -
-
- - - - -
#define MAX_REQUESTS   32
-
- -

Maximum number of simultaneous IOCTL requests.

- -

Definition at line 71 of file Packet.h.

- -
-
- -
-
- - - - -
#define MODE_CAPT   0x0
-
- -

Capture working mode.

- -

Definition at line 81 of file Packet.h.

- -
-
- -
-
- - - - -
#define MODE_DUMP   0x10
-
- -

Kernel dump working mode.

- -

Definition at line 84 of file Packet.h.

- -
-
- -
-
- - - - -
#define MODE_MON   0x2
-
- -

Kernel monitoring mode.

- -

Definition at line 83 of file Packet.h.

- -
-
- -
-
- - - - -
#define MODE_STAT   0x1
-
- -

Statistical working mode.

- -

Definition at line 82 of file Packet.h.

- -
-
- -
-
- - - - -
#define NDIS_FLAGS_SKIP_LOOPBACK_W2K   0x400
-
- -

This is an undocumented flag for NdisSetPacketFlags() that allows to disable loopback reception.

- -

Definition at line 89 of file Packet.h.

- -
-
- -
-
- - - - -
#define NPF_DISABLE_LOOPBACK   1
-
- -

Tells the driver to drop the packets sent by itself. This is usefult when building applications like bridges.

- -

Definition at line 98 of file Packet.h.

- -
-
- -
-
- - - - -
#define NPF_ENABLE_LOOPBACK   2
-
- -

Tells the driver to capture the packets sent by itself.

- -

Definition at line 99 of file Packet.h.

- -
-
- -
-
- - - - -
#define Packet_ALIGNMENT   sizeof(int)
-
- -

Alignment macro. Defines the alignment size.

- -

Definition at line 73 of file Packet.h.

- -
-
- -
-
- - - - - - - - -
#define Packet_WORDALIGN( x)   (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
-
- -

even multiple of Packet_ALIGNMENT.

-

Alignment macro. Rounds up to the next

- -

Definition at line 74 of file Packet.h.

- -
-
- -
-
- - - - -
#define PCAP_VERSION_MAJOR   2
-
- -

Major libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.

- -

Definition at line 94 of file Packet.h.

- -
-
- -
-
- - - - -
#define PCAP_VERSION_MINOR   4
-
- -

Minor libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.

- -

Definition at line 95 of file Packet.h.

- -
-
- -
-
- - - - - - - - -
#define RESERVED( _p)   ((PPACKET_RESERVED)((_p)->ProtocolReserved))
-
- -

Macro to obtain a NDIS_PACKET from a PACKET_RESERVED.

- -

Definition at line 189 of file Packet.h.

- -
-
- -
-
- - - - -
#define TCPDUMP_MAGIC   0xa1b2c3d4
-
- -

Libpcap magic number. Used by programs like tcpdump to recognize a driver's generated dump file.

- -

Definition at line 93 of file Packet.h.

- -
-
- -
-
- - - - -
#define TRANSMIT_PACKETS   256
-
- -

of packets that can be transmitted at the same time or with a single call to NdisSendPackets.

-

Maximum number of packets in the transmit packet pool. This value is an upper bound to the number

- -

Definition at line 352 of file Packet.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef struct __CPU_Private_Data - CpuPrivateData
-
- -

Kernel buffer of each CPU.

-

Structure containing the kernel buffer (and other CPU related fields) used to capture packets.

- -
-
- -
-
- - - - -
typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION
-
- -

Port device extension.

-

Structure containing some data relative to every adapter on which NPF is bound.

- -
-
- -
-
- - - - -
typedef struct _INTERNAL_REQUEST INTERNAL_REQUEST
-
- -

Stores an OID request.

-

This structure is used by the driver to perform OID query or set operations on the underlying NIC driver. The OID operations be performed usually only by network drivers, but NPF exports this mechanism to user-level applications through an IOCTL interface. The driver uses this structure to wrap a NDIS_REQUEST structure. This allows to handle correctly the callback structure of NdisRequest(), handling multiple requests and maintaining information about the IRPs to complete.

- -
-
- -
-
- - - - -
typedef struct _OPEN_INSTANCE - OPEN_INSTANCE
-
- -

Contains the state of a running instance of the NPF driver.

-

This is the most important structure of NPF: it is used by almost all the functions of the driver. An _OPEN_INSTANCE structure is associated with every user-level session, allowing concurrent access to the driver.

- -
-
- -
-
- - - - -
typedef struct _PACKET_OID_DATA - PACKET_OID_DATA
-
- -

Structure containing an OID request.

-

It is used by the PacketRequest() function to send an OID to the interface card driver. It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, the list of the multicast groups defined on it, and so on.

- -
-
- -
-
- - - - -
typedef struct _PACKET_RESERVED PACKET_RESERVED
-
- -

Contains a NDIS packet.

-

The driver uses this structure to wrap a NDIS_PACKET structure. This allows to handle correctly the callback structure of NdisTransferData(), handling multiple requests and maintaining information about the IRPs to complete.

- -
-
- -
-
- - - - -
typedef struct _DEVICE_EXTENSION * PDEVICE_EXTENSION
-
- -
-
- -
-
- - - - -
typedef struct _INTERNAL_REQUEST * PINTERNAL_REQUEST
-
- -
-
- -
-
- - - - -
typedef struct _OPEN_INSTANCE * POPEN_INSTANCE
-
- -
-
- -
-
- - - - -
typedef struct _PACKET_OID_DATA * PPACKET_OID_DATA
-
- -
-
- -
-
- - - - -
typedef struct _PACKET_RESERVED * PPACKET_RESERVED
-
- -
-
-

Enumeration Type Documentation

- -
-
- - - - -
enum ADAPTER_BINDING_STATUS
-
- - - - -
Enumerator
ADAPTER_UNBOUND  -
ADAPTER_BOUND  -
ADAPTER_UNBINDING  -
- -

Definition at line 327 of file Packet.h.

- -
-
-

Function Documentation

- -
-
- - - - - - - - -
C_ASSERT (sizeof(PACKET_OID_DATA = =12)
-
- -
-
-

Variable Documentation

- -
-
- - - - -
ULONG g_NCpu
-
- -
-
- -
-
- - - - -
NDIS_HANDLE g_NdisProtocolHandle
-
- -
-
- -
-
- - - - -
UINT g_SendPacketFlags
-
- -
-
- -
-
- - - - -
struct time_conv G_Start_Time
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__NPF__ioctl.html b/libs/WinPcap-413-173-b4/docs/html/group__NPF__ioctl.html deleted file mode 100644 index 29d4c00e..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__NPF__ioctl.html +++ /dev/null @@ -1,400 +0,0 @@ - - - - - - -WinPcap: NPF I/O control codes - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define BIOCSETBUFFERSIZE   9592
 IOCTL code: set kernel buffer size. More...
 
#define BIOCSETF   9030
 IOCTL code: set packet filtering program. More...
 
#define BIOCGSTATS   9031
 IOCTL code: get the capture stats. More...
 
#define BIOCSRTIMEOUT   7416
 IOCTL code: set the read timeout. More...
 
#define BIOCSMODE   7412
 IOCTL code: set working mode. More...
 
#define BIOCSWRITEREP   7413
 IOCTL code: set number of physical repetions of every packet written by the app. More...
 
#define BIOCSMINTOCOPY   7414
 IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call. More...
 
#define BIOCSETOID   0x80000000
 IOCTL code: set an OID value. More...
 
#define BIOCQUERYOID   0x80000004
 IOCTL code: get an OID value. More...
 
#define BIOCSETDUMPFILENAME   9029
 IOCTL code: set the name of a the file used by kernel dump mode. More...
 
#define BIOCGEVNAME   7415
 IOCTL code: get the name of the event that the driver signals when some data is present in the buffer. More...
 
#define BIOCSENDPACKETSNOSYNC   9032
 IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps. More...
 
#define BIOCSENDPACKETSSYNC   9033
 IOCTL code: Send a buffer containing multiple packets to the network, considering the timestamps. More...
 
#define BIOCSETDUMPLIMITS   9034
 IOCTL code: Set the dump file limits. More...
 
#define BIOCISDUMPENDED   7411
 IOCTL code: Get the status of the kernel dump process. More...
 
#define BIOCISETLOBBEH   7410
 IOCTL code: set the loopback behavior. More...
 
#define BIOCSETEVENTHANDLE   7920
 This IOCTL passes the read event HANDLE allocated by the user (packet.dll) to kernel level. More...
 
-

Detailed Description

-

Macro Definition Documentation

- -
-
- - - - -
#define BIOCGEVNAME   7415
-
- -

IOCTL code: get the name of the event that the driver signals when some data is present in the buffer.

-

Command used by the application to retrieve the name of the global event associated with a NPF instance. The event is signaled by the driver when the kernel buffer contains enough data for a transfer.

- -

Definition at line 137 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCGSTATS   9031
-
- -

IOCTL code: get the capture stats.

-

This command returns to the application the number of packets received and the number of packets dropped by an instance of the driver.

- -

Definition at line 75 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCISDUMPENDED   7411
-
- -

IOCTL code: Get the status of the kernel dump process.

-

This command returns TRUE if the kernel dump is ended, i.e if one of the limits set with BIOCSETDUMPLIMITS (amount of bytes or number of packets) has been reached.

- -

Definition at line 172 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCISETLOBBEH   7410
-
- -

IOCTL code: set the loopback behavior.

-

This IOCTL sets the loopback behavior of the driver with packets sent by itself: capture or drop.

- -

Definition at line 179 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCQUERYOID   0x80000004
-
- -

IOCTL code: get an OID value.

-

This IOCTL is used to perform an OID get operation on the NIC driver.

- -

Definition at line 120 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSENDPACKETSNOSYNC   9032
-
- -

IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps.

-

Command used to send a buffer of packets in a single system call. Every packet in the buffer is preceded by a sf_pkthdr structure. The timestamps of the packets are ignored, i.e. the packets are sent as fast as possible. The NPF_BufferedWrite() function is invoked to send the packets.

- -

Definition at line 146 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSENDPACKETSSYNC   9033
-
- -

IOCTL code: Send a buffer containing multiple packets to the network, considering the timestamps.

-

Command used to send a buffer of packets in a single system call. Every packet in the buffer is preceded by a sf_pkthdr structure. The timestamps of the packets are used to synchronize the write, i.e. the packets are sent to the network respecting the intervals specified in the sf_pkthdr structure assiciated with each packet. NPF_BufferedWrite() function is invoked to send the packets.

- -

Definition at line 156 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETBUFFERSIZE   9592
-
- -

IOCTL code: set kernel buffer size.

-

This IOCTL is used to set a new size of the circular buffer associated with an instance of NPF. When a BIOCSETBUFFERSIZE command is received, the driver frees the old buffer, allocates the new one and resets all the parameters associated with the buffer in the OPEN_INSTANCE structure. The currently buffered packets are lost.

- -

Definition at line 55 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETDUMPFILENAME   9029
-
- -

IOCTL code: set the name of a the file used by kernel dump mode.

-

This command opens a file whose name is contained in the IOCTL buffer and associates it with current NPf instance. The dump thread uses it to copy the content of the circular buffer to file. If a file was already opened, the driver closes it before opening the new one.

- -

Definition at line 129 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETDUMPLIMITS   9034
-
- -

IOCTL code: Set the dump file limits.

-

This IOCTL sets the limits (maximum size and maximum number of packets) of the dump file created when the driver works in dump mode.

- -

Definition at line 164 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETEVENTHANDLE   7920
-
- -

This IOCTL passes the read event HANDLE allocated by the user (packet.dll) to kernel level.

-

Parameter: HANDLE Parameter size: sizeof(HANDLE). If the caller is 32 bit, the parameter size is 4 bytes, even if sizeof(HANDLE) at kernel level is 8 bytes. That's why in this IOCTL code handler we detect a 32bit calling process and do the necessary thunking.

-

TODO GV:I will go to hell for this ugly IOCTL definition. We should use CTL_CODE!!

- -

Definition at line 190 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETF   9030
-
- -

IOCTL code: set packet filtering program.

-

This IOCTL sets a new packet filter in the driver. Before allocating any memory for the new filter, the bpf_validate() function is called to check the correctness of the filter. If this function returns TRUE, the filter is copied to the driver's memory, its address is stored in the bpfprogram field of the OPEN_INSTANCE structure associated with current instance of the driver, and the filter will be applied to every incoming packet. This command also empties the circular buffer used by current instance to store packets. This is done to avoid the presence in the buffer of packets that do not match the filter.

- -

Definition at line 67 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSETOID   0x80000000
-
- -

IOCTL code: set an OID value.

-

This IOCTL is used to perform an OID set operation on the NIC driver.

- -

Definition at line 113 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSMINTOCOPY   7414
-
- -

IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call.

-

This command sets the OPEN_INSTANCE::MinToCopy member.

- -

Definition at line 106 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSMODE   7412
-
- -

IOCTL code: set working mode.

-

This IOCTL can be used to set the working mode of a NPF instance. The new mode, received by the driver in the buffer associated with the IOCTL command, can be MODE_CAPT for capture mode (the default), MODE_STAT for statistical mode or MODE_DUMP for dump mode.

- -

Definition at line 91 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSRTIMEOUT   7416
-
- -

IOCTL code: set the read timeout.

-

This command sets the maximum timeout after which a read is released, also if no data packets were received.

- -

Definition at line 82 of file ioctls.h.

- -
-
- -
-
- - - - -
#define BIOCSWRITEREP   7413
-
- -

IOCTL code: set number of physical repetions of every packet written by the app.

-

Sets the number of times a single write call must be repeated. This command sets the OPEN_INSTANCE::Nwrites member, and is used to implement the 'multiple write' feature of the driver.

- -

Definition at line 99 of file ioctls.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__NPF__jitter.html b/libs/WinPcap-413-173-b4/docs/html/group__NPF__jitter.html deleted file mode 100644 index 7b0f66c4..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__NPF__jitter.html +++ /dev/null @@ -1,1864 +0,0 @@ - - - - - - -WinPcap: NPF Just-in-time compiler definitions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
- -
-
NPF Just-in-time compiler definitions
-
-
- - - - - - - - -

-Data Structures

struct  binary_stream
 A stream of X86 binary code. More...
 
struct  JIT_BPF_Filter
 Structure describing a x86 filtering program created by the jitter. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define EAX   0
 
#define ECX   1
 
#define EDX   2
 
#define EBX   3
 
#define ESP   4
 
#define EBP   5
 
#define ESI   6
 
#define EDI   7
 
#define AX   0
 
#define CX   1
 
#define DX   2
 
#define BX   3
 
#define SP   4
 
#define BP   5
 
#define SI   6
 
#define DI   7
 
#define AL   0
 
#define CL   1
 
#define DL   2
 
#define BL   3
 
#define MOVid(r32, i32)   emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);
 mov r32,i32 More...
 
#define MOVrd(dr32, sr32)   emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
 mov dr32,sr32 More...
 
#define MOVodd(dr32, sr32, off)
 mov dr32,sr32[off] More...
 
#define MOVobd(dr32, sr32, or32)
 mov dr32,sr32[or32] More...
 
#define MOVobw(dr32, sr32, or32)
 mov dr16,sr32[or32] More...
 
#define MOVobb(dr8, sr32, or32)
 mov dr8,sr32[or32] More...
 
#define MOVomd(dr32, or32, sr32)
 mov [dr32][or32],sr32 More...
 
#define BSWAP(dr32)
 bswap dr32 More...
 
#define SWAP_AX()
 xchg al,ah More...
 
#define PUSH(r32)   emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);
 push r32 More...
 
#define POP(r32)   emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);
 pop r32 More...
 
#define RET()   emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);
 ret More...
 
#define ADDrd(dr32, sr32)
 add dr32,sr32 More...
 
#define ADD_EAXi(i32)
 add eax,i32 More...
 
#define ADDid(r32, i32)
 add r32,i32 More...
 
#define ADDib(r32, i8)
 add r32,i8 More...
 
#define SUBrd(dr32, sr32)
 sub dr32,sr32 More...
 
#define SUB_EAXi(i32)
 sub eax,i32 More...
 
#define MULrd(r32)
 mul r32 More...
 
#define DIVrd(r32)
 div r32 More...
 
#define ANDib(r8, i8)
 and r8,i8 More...
 
#define ANDid(r32, i32)
 and r32,i32 More...
 
#define ANDrd(dr32, sr32)
 and dr32,sr32 More...
 
#define ORrd(dr32, sr32)
 or dr32,sr32 More...
 
#define ORid(r32, i32)
 or r32,i32 More...
 
#define SHLib(r32, i8)
 shl r32,i8 More...
 
#define SHL_CLrb(dr32)
 shl dr32,cl More...
 
#define SHRib(r32, i8)
 shr r32,i8 More...
 
#define SHR_CLrb(dr32)
 shr dr32,cl More...
 
#define NEGd(r32)
 neg r32 More...
 
#define CMPodd(dr32, sr32, off)
 cmp dr32,sr32[off] More...
 
#define CMPrd(dr32, sr32)
 cmp dr32,sr32 More...
 
#define CMPid(dr32, i32)
 cmp dr32,i32 More...
 
#define JNEb(off8)
 jne off32 More...
 
#define JAb(off8)
 ja off32 More...
 
#define JE(off32)
 je off32 More...
 
#define JLE(off32)
 jle off32 More...
 
#define JLEb(off8)
 jle off8 More...
 
#define JBEb(off8)
 jbe off8 More...
 
#define JBb(off8)
 jb off8 More...
 
#define JA(off32)
 ja off32 More...
 
#define JAE(off32)
 jae off32 More...
 
#define JG(off32)
 jg off32 More...
 
#define JGE(off32)
 jge off32 More...
 
#define JMP(off32)
 jmp off32 More...
 
- - - - - - - - - - - - - -

-Typedefs

typedef struct binary_stream binary_stream
 A stream of X86 binary code. More...
 
typedef UINT(__cdecl * BPF_filter_function )(PVOID *, ULONG, UINT)
 Prototype of a filtering function created by the jitter. More...
 
typedef void(* emit_func )(binary_stream *stream, ULONG value, UINT n)
 Prototype of the emit functions. More...
 
typedef struct JIT_BPF_Filter JIT_BPF_Filter
 Structure describing a x86 filtering program created by the jitter. More...
 
-

Detailed Description

-

Macro Definition Documentation

- -
-
- - - - - - - - -
#define ADD_EAXi( i32)
-
-Value:
emitm(&stream, 0x05, 1);\
-
emitm(&stream, i32, 4);
-
-

add eax,i32

- -

Definition at line 175 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define ADDib( r32,
 i8 
)
-
-Value:
emitm(&stream, 0x83, 1);\
-
emitm(&stream, 24 << 3 | r32, 1);\
-
emitm(&stream, i8, 1);
-
-

add r32,i8

- -

Definition at line 186 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define ADDid( r32,
 i32 
)
-
-Value:
emitm(&stream, 0x81, 1);\
-
emitm(&stream, 24 << 3 | r32, 1);\
-
emitm(&stream, i32, 4);
-
-

add r32,i32

- -

Definition at line 180 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define ADDrd( dr32,
 sr32 
)
-
-Value:
emitm(&stream, 0x03, 1);\
-
emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | (sr32 & 0x7), 1);
-
-

add dr32,sr32

- -

Definition at line 170 of file jitter.h.

- -
-
- -
-
- - - - -
#define AL   0
-
- -

Definition at line 63 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define ANDib( r8,
 i8 
)
-
-Value:
emitm(&stream, 0x80, 1);\
-
emitm(&stream, 7 << 5 | r8, 1);\
-
emitm(&stream, i8, 1);
-
-

and r8,i8

- -

Definition at line 212 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define ANDid( r32,
 i32 
)
-
-Value:
if (r32 == EAX){ \
-
emitm(&stream, 0x25, 1);\
-
emitm(&stream, i32, 4);}\
-
else{ \
-
emitm(&stream, 0x81, 1);\
-
emitm(&stream, 7 << 5 | r32, 1);\
-
emitm(&stream, i32, 4);}
-
#define EAX
Definition: jitter.h:45
-
-

and r32,i32

- -

Definition at line 218 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define ANDrd( dr32,
 sr32 
)
-
-Value:
emitm(&stream, 0x23, 1);\
-
emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
-

and dr32,sr32

- -

Definition at line 228 of file jitter.h.

- -
-
- -
-
- - - - -
#define AX   0
-
- -

Definition at line 54 of file jitter.h.

- -
-
- -
-
- - - - -
#define BL   3
-
- -

Definition at line 66 of file jitter.h.

- -
-
- -
-
- - - - -
#define BP   5
-
- -

Definition at line 59 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define BSWAP( dr32)
-
-Value:
emitm(&stream, 0xf, 1); \
-
emitm(&stream, 0x19 << 3 | dr32 , 1);
-
-

bswap dr32

- -

Definition at line 148 of file jitter.h.

- -
-
- -
-
- - - - -
#define BX   3
-
- -

Definition at line 57 of file jitter.h.

- -
-
- -
-
- - - - -
#define CL   1
-
- -

Definition at line 64 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define CMPid( dr32,
 i32 
)
-
-Value:
if (dr32 == EAX){ \
-
emitm(&stream, 0x3d, 1); \
-
emitm(&stream, i32, 4);} \
-
else{ \
-
emitm(&stream, 0x81, 1); \
-
emitm(&stream, 0x1f << 3 | (dr32 & 0x7), 1);\
-
emitm(&stream, i32, 4);}
-
#define EAX
Definition: jitter.h:45
-
-

cmp dr32,i32

- -

Definition at line 286 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
#define CMPodd( dr32,
 sr32,
 off 
)
-
-Value:
emitm(&stream, 3 << 4 | 3 | 1 << 3, 1); \
-
emitm(&stream, 1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
-
emitm(&stream, off, 1);
-
-

cmp dr32,sr32[off]

- -

Definition at line 275 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define CMPrd( dr32,
 sr32 
)
-
-Value:
emitm(&stream, 0x3b, 1); \
-
emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
-

cmp dr32,sr32

- -

Definition at line 281 of file jitter.h.

- -
-
- -
-
- - - - -
#define CX   1
-
- -

Definition at line 55 of file jitter.h.

- -
-
- -
-
- - - - -
#define DI   7
-
- -

Definition at line 61 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define DIVrd( r32)
-
-Value:
emitm(&stream, 0xf7, 1);\
-
emitm(&stream, 15 << 4 | (r32 & 0x7), 1);
-
-

div r32

- -

Definition at line 207 of file jitter.h.

- -
-
- -
-
- - - - -
#define DL   2
-
- -

Definition at line 65 of file jitter.h.

- -
-
- -
-
- - - - -
#define DX   2
-
- -

Definition at line 56 of file jitter.h.

- -
-
- -
-
- - - - -
#define EAX   0
-
- -

Definition at line 45 of file jitter.h.

- -
-
- -
-
- - - - -
#define EBP   5
-
- -

Definition at line 50 of file jitter.h.

- -
-
- -
-
- - - - -
#define EBX   3
-
- -

Definition at line 48 of file jitter.h.

- -
-
- -
-
- - - - -
#define ECX   1
-
- -

Definition at line 46 of file jitter.h.

- -
-
- -
-
- - - - -
#define EDI   7
-
- -

Definition at line 52 of file jitter.h.

- -
-
- -
-
- - - - -
#define EDX   2
-
- -

Definition at line 47 of file jitter.h.

- -
-
- -
-
- - - - -
#define ESI   6
-
- -

Definition at line 51 of file jitter.h.

- -
-
- -
-
- - - - -
#define ESP   4
-
- -

Definition at line 49 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JA( off32)
-
-Value:
emitm(&stream, 0x0f, 1);\
-
emitm(&stream, 0x87, 1);\
-
emitm(&stream, off32, 4);
-
-

ja off32

- -

Definition at line 333 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JAb( off8)
-
-Value:
emitm(&stream, 0x77, 1);\
-
emitm(&stream, off8, 1);
-
-

ja off32

- -

Definition at line 301 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JAE( off32)
-
-Value:
emitm(&stream, 0x0f, 1);\
-
emitm(&stream, 0x83, 1);\
-
emitm(&stream, off32, 4);
-
-

jae off32

- -

Definition at line 339 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JBb( off8)
-
-Value:
emitm(&stream, 0x72, 1);\
-
emitm(&stream, off8, 1);
-
-

jb off8

- -

Definition at line 328 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JBEb( off8)
-
-Value:
emitm(&stream, 0x76, 1);\
-
emitm(&stream, off8, 1);
-
-

jbe off8

- -

Definition at line 323 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JE( off32)
-
-Value:
emitm(&stream, 0x0f, 1);\
-
emitm(&stream, 0x84, 1);\
-
emitm(&stream, off32, 4);
-
-

je off32

- -

Definition at line 306 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JG( off32)
-
-Value:
emitm(&stream, 0x0f, 1);\
-
emitm(&stream, 0x8f, 1);\
-
emitm(&stream, off32, 4);
-
-

jg off32

- -

Definition at line 345 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JGE( off32)
-
-Value:
emitm(&stream, 0x0f, 1);\
-
emitm(&stream, 0x8d, 1);\
-
emitm(&stream, off32, 4);
-
-

jge off32

- -

Definition at line 351 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JLE( off32)
-
-Value:
emitm(&stream, 0x0f, 1);\
-
emitm(&stream, 0x8e, 1);\
-
emitm(&stream, off32, 4);
-
-

jle off32

- -

Definition at line 312 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JLEb( off8)
-
-Value:
emitm(&stream, 0x7e, 1);\
-
emitm(&stream, off8, 1);
-
-

jle off8

- -

Definition at line 318 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JMP( off32)
-
-Value:
emitm(&stream, 0xe9, 1);\
-
emitm(&stream, off32, 4);
-
-

jmp off32

- -

Definition at line 357 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define JNEb( off8)
-
-Value:
emitm(&stream, 0x75, 1);\
-
emitm(&stream, off8, 1);
-
-

jne off32

- -

Definition at line 296 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define MOVid( r32,
 i32 
)   emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);
-
- -

mov r32,i32

- -

Definition at line 109 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
#define MOVobb( dr8,
 sr32,
 or32 
)
-
-Value:
emitm(&stream, 0x8a, 1); \
-
emitm(&stream, (dr8 & 0x7) << 3 | 4 , 1);\
-
emitm(&stream, (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
-

mov dr8,sr32[or32]

- -

Definition at line 136 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
#define MOVobd( dr32,
 sr32,
 or32 
)
-
-Value:
emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-
emitm(&stream, (dr32 & 0x7) << 3 | 4 , 1);\
-
emitm(&stream, (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
-

mov dr32,sr32[or32]

- -

Definition at line 123 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
#define MOVobw( dr32,
 sr32,
 or32 
)
-
-Value:
emitm(&stream, 0x66, 1); \
-
emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-
emitm(&stream, (dr32 & 0x7) << 3 | 4 , 1);\
-
emitm(&stream, (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
-

mov dr16,sr32[or32]

- -

Definition at line 129 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
#define MOVodd( dr32,
 sr32,
 off 
)
-
-Value:
emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-
emitm(&stream, 1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
-
emitm(&stream, off, 1);
-
-

mov dr32,sr32[off]

- -

Definition at line 117 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
#define MOVomd( dr32,
 or32,
 sr32 
)
-
-Value:
emitm(&stream, 0x89, 1); \
-
emitm(&stream, (sr32 & 0x7) << 3 | 4 , 1);\
-
emitm(&stream, (or32 & 0x7) << 3 | (dr32 & 0x7) , 1);
-
-

mov [dr32][or32],sr32

- -

Definition at line 142 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define MOVrd( dr32,
 sr32 
)   emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
- -

mov dr32,sr32

- -

Definition at line 113 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define MULrd( r32)
-
-Value:
emitm(&stream, 0xf7, 1);\
-
emitm(&stream, 7 << 5 | (r32 & 0x7), 1);
-
-

mul r32

- -

Definition at line 202 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define NEGd( r32)
-
-Value:
emitm(&stream, 0xf7, 1);\
-
emitm(&stream, 27 << 3 | r32 & 0x7, 1);
-
-

neg r32

- -

Definition at line 270 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define ORid( r32,
 i32 
)
-
-Value:
if (r32 == EAX){ \
-
emitm(&stream, 0x0d, 1);\
-
emitm(&stream, i32, 4);}\
-
else{ \
-
emitm(&stream, 0x81, 1);\
-
emitm(&stream, 25 << 3 | r32, 1);\
-
emitm(&stream, i32, 4);}
-
#define EAX
Definition: jitter.h:45
-
-

or r32,i32

- -

Definition at line 238 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define ORrd( dr32,
 sr32 
)
-
-Value:
emitm(&stream, 0x0b, 1);\
-
emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
-

or dr32,sr32

- -

Definition at line 233 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define POP( r32)   emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);
-
- -

pop r32

- -

Definition at line 162 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define PUSH( r32)   emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);
-
- -

push r32

- -

Definition at line 158 of file jitter.h.

- -
-
- -
-
- - - - - - - -
#define RET()   emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);
-
- -

ret

- -

Definition at line 166 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define SHL_CLrb( dr32)
-
-Value:
emitm(&stream, 0xd3, 1);\
-
emitm(&stream, 7 << 5 | dr32 & 0x7, 1);
-
-

shl dr32,cl

- -

Definition at line 254 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define SHLib( r32,
 i8 
)
-
-Value:
emitm(&stream, 0xc1, 1);\
-
emitm(&stream, 7 << 5 | r32 & 0x7, 1);\
-
emitm(&stream, i8, 1);
-
-

shl r32,i8

- -

Definition at line 248 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define SHR_CLrb( dr32)
-
-Value:
emitm(&stream, 0xd3, 1);\
-
emitm(&stream, 29 << 3 | dr32 & 0x7, 1);
-
-

shr dr32,cl

- -

Definition at line 265 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define SHRib( r32,
 i8 
)
-
-Value:
emitm(&stream, 0xc1, 1);\
-
emitm(&stream, 29 << 3 | r32 & 0x7, 1);\
-
emitm(&stream, i8, 1);
-
-

shr r32,i8

- -

Definition at line 259 of file jitter.h.

- -
-
- -
-
- - - - -
#define SI   6
-
- -

Definition at line 60 of file jitter.h.

- -
-
- -
-
- - - - -
#define SP   4
-
- -

Definition at line 58 of file jitter.h.

- -
-
- -
-
- - - - - - - - -
#define SUB_EAXi( i32)
-
-Value:
emitm(&stream, 0x2d, 1);\
-
emitm(&stream, i32, 4);
-
-

sub eax,i32

- -

Definition at line 197 of file jitter.h.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
#define SUBrd( dr32,
 sr32 
)
-
-Value:
emitm(&stream, 0x2b, 1);\
-
emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | (sr32 & 0x7), 1);
-
-

sub dr32,sr32

- -

Definition at line 192 of file jitter.h.

- -
-
- -
-
- - - - - - - -
#define SWAP_AX()
-
-Value:
emitm(&stream, 0x86, 1); \
-
emitm(&stream, 0xc4 , 1);
-
-

xchg al,ah

- -

Definition at line 153 of file jitter.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef struct binary_stream binary_stream
-
- -

A stream of X86 binary code.

- -
-
- -
-
- - - - -
typedef UINT(__cdecl * BPF_filter_function)(PVOID *, ULONG, UINT)
-
- -

Prototype of a filtering function created by the jitter.

-

The syntax and the meaning of the parameters is analogous to the one of bpf_filter(). Notice that the filter is not among the parameters, because it is hardwired in the function.

- -

Definition at line 82 of file jitter.h.

- -
-
- -
-
- - - - -
typedef void(* emit_func)(binary_stream *stream, ULONG value, UINT n)
-
- -

Prototype of the emit functions.

-

Different emit functions are used to create the reference table and to generate the actual filtering code. This allows to have simpler instruction macros. The first parameter is the stream that will receive the data. The secon one is a variable containing the data, the third one is the length, that can be 1,2 or 4 since it is possible to emit a byte, a short or a work at a time.

- -

Definition at line 92 of file jitter.h.

- -
-
- -
-
- - - - -
typedef struct JIT_BPF_Filter - JIT_BPF_Filter
-
- -

Structure describing a x86 filtering program created by the jitter.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remote__auth__methods.html b/libs/WinPcap-413-173-b4/docs/html/group__remote__auth__methods.html deleted file mode 100644 index 71627e02..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remote__auth__methods.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -WinPcap: Authentication methods supported by the RPCAP protocol - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Authentication methods supported by the RPCAP protocol
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remote__open__flags.html b/libs/WinPcap-413-173-b4/docs/html/group__remote__open__flags.html deleted file mode 100644 index c5403b66..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remote__open__flags.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -WinPcap: Flags defined in the pcap_open() function - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Flags defined in the pcap_open() function
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remote__pri__func.html b/libs/WinPcap-413-173-b4/docs/html/group__remote__pri__func.html deleted file mode 100644 index 7aca8658..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remote__pri__func.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -WinPcap: Internal Functions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Internal Functions
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remote__pri__struct.html b/libs/WinPcap-413-173-b4/docs/html/group__remote__pri__struct.html deleted file mode 100644 index 12195a56..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remote__pri__struct.html +++ /dev/null @@ -1,1075 +0,0 @@ - - - - - - -WinPcap: Internal Structures and Definitions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
- -
-
Internal Structures and Definitions
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  activehosts
 Keeps a list of all the opened connections in the active mode. More...
 
struct  rpcap_header
 Common header for all the RPCAP messages. More...
 
struct  rpcap_findalldevs_if
 Format of the message for the interface description (findalldevs command) More...
 
struct  rpcap_findalldevs_ifaddr
 Format of the message for the address listing (findalldevs command) More...
 
struct  rpcap_openreply
 Format of the message of the connection opening reply (open command). More...
 
struct  rpcap_startcapreq
 Format of the message that starts a remote capture (startcap command) More...
 
struct  rpcap_startcapreply
 Format of the reply message that devoted to start a remote capture (startcap reply command) More...
 
struct  rpcap_pkthdr
 Format of the header which encapsulates captured packets when transmitted on the network. More...
 
struct  rpcap_filter
 General header used for the pcap_setfilter() command; keeps just the number of BPF instructions. More...
 
struct  rpcap_filterbpf_insn
 Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header. More...
 
struct  rpcap_auth
 Structure that keeps the data required for the authentication on the remote host. More...
 
struct  rpcap_stats
 Structure that keeps the statistics about the number of packets captured, dropped, etc. More...
 
struct  rpcap_sampling
 Structure that is needed to set sampling parameters. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define RPCAP_DEFAULT_NETPORT   "2002"
 
#define RPCAP_DEFAULT_NETPORT_ACTIVE   "2003"
 
#define RPCAP_DEFAULT_NETADDR   ""
 
#define RPCAP_VERSION   0
 
#define RPCAP_TIMEOUT_INIT   90
 
#define RPCAP_TIMEOUT_RUNTIME   180
 
#define RPCAP_ACTIVE_WAIT   30
 
#define RPCAP_SUSPEND_WRONGAUTH   1
 
#define RPCAP_NETBUF_SIZE   64000
 Buffer used by socket functions to send-receive packets. In case you plan to have messages larger than this value, you have to increase it. More...
 
#define RPCAP_HOSTLIST_SEP   " ,;\n\r"
 Separators used for the host list. More...
 
#define RPCAP_MSG_ERROR   1
 
#define RPCAP_MSG_FINDALLIF_REQ   2
 
#define RPCAP_MSG_OPEN_REQ   3
 
#define RPCAP_MSG_STARTCAP_REQ   4
 
#define RPCAP_MSG_UPDATEFILTER_REQ   5
 
#define RPCAP_MSG_CLOSE   6
 
#define RPCAP_MSG_PACKET   7
 
#define RPCAP_MSG_AUTH_REQ   8
 
#define RPCAP_MSG_STATS_REQ   9
 
#define RPCAP_MSG_ENDCAP_REQ   10
 
#define RPCAP_MSG_SETSAMPLING_REQ   11
 
#define RPCAP_MSG_FINDALLIF_REPLY   (128+RPCAP_MSG_FINDALLIF_REQ)
 
#define RPCAP_MSG_OPEN_REPLY   (128+RPCAP_MSG_OPEN_REQ)
 
#define RPCAP_MSG_STARTCAP_REPLY   (128+RPCAP_MSG_STARTCAP_REQ)
 
#define RPCAP_MSG_UPDATEFILTER_REPLY   (128+RPCAP_MSG_UPDATEFILTER_REQ)
 
#define RPCAP_MSG_AUTH_REPLY   (128+RPCAP_MSG_AUTH_REQ)
 
#define RPCAP_MSG_STATS_REPLY   (128+RPCAP_MSG_STATS_REQ)
 
#define RPCAP_MSG_ENDCAP_REPLY   (128+RPCAP_MSG_ENDCAP_REQ)
 
#define RPCAP_MSG_SETSAMPLING_REPLY   (128+RPCAP_MSG_SETSAMPLING_REQ)
 
#define RPCAP_STARTCAPREQ_FLAG_PROMISC   1
 
#define RPCAP_STARTCAPREQ_FLAG_DGRAM   2
 
#define RPCAP_STARTCAPREQ_FLAG_SERVEROPEN   4
 
#define RPCAP_STARTCAPREQ_FLAG_INBOUND   8
 
#define RPCAP_STARTCAPREQ_FLAG_OUTBOUND   16
 
#define RPCAP_UPDATEFILTER_BPF   1
 
#define PCAP_ERR_NETW   1
 
#define PCAP_ERR_INITTIMEOUT   2
 
#define PCAP_ERR_AUTH   3
 
#define PCAP_ERR_FINDALLIF   4
 
#define PCAP_ERR_NOREMOTEIF   5
 
#define PCAP_ERR_OPEN   6
 
#define PCAP_ERR_UPDATEFILTER   7
 
#define PCAP_ERR_GETSTATS   8
 
#define PCAP_ERR_READEX   9
 
#define PCAP_ERR_HOSTNOAUTH   10
 
#define PCAP_ERR_REMOTEACCEPT   11
 
#define PCAP_ERR_STARTCAPTURE   12
 
#define PCAP_ERR_ENDCAPTURE   13
 
#define PCAP_ERR_RUNTIMETIMEOUT   14
 
#define PCAP_ERR_SETSAMPLING   15
 
#define PCAP_ERR_WRONGMSG   16
 
#define PCAP_ERR_WRONGVER   17
 
- - - - - - - - - - - - - -

-Typedefs

typedef unsigned char uint8
 Provides an 8-bits unsigned integer. More...
 
typedef unsigned short uint16
 Provides a 16-bits unsigned integer. More...
 
typedef unsigned int uint32
 Provides a 32-bits unsigned integer. More...
 
typedef int int32
 Provides a 32-bits integer. More...
 
-

Detailed Description

-

Macro Definition Documentation

- -
-
- - - - -
#define PCAP_ERR_AUTH   3
-
-

Generic authentication error

- -

Definition at line 313 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_ENDCAPTURE   13
-
-

Generic pcap_endcapture error

- -

Definition at line 323 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_FINDALLIF   4
-
-

Generic findalldevs error

- -

Definition at line 314 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_GETSTATS   8
-
-

Generic pcap_stats error

- -

Definition at line 318 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_HOSTNOAUTH   10
-
-

The host is not authorized to connect to this server

- -

Definition at line 320 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_INITTIMEOUT   2
-
-

The RPCAP initial timeout has expired

- -

Definition at line 312 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_NETW   1
-
-

Network error

- -

Definition at line 311 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_NOREMOTEIF   5
-
-

The findalldevs was ok, but the remote end had no interfaces to list

- -

Definition at line 315 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_OPEN   6
-
-

Generic pcap_open error

- -

Definition at line 316 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_READEX   9
-
-

Generic pcap_next_ex error

- -

Definition at line 319 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_REMOTEACCEPT   11
-
-

Generic pcap_remoteaccept error

- -

Definition at line 321 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_RUNTIMETIMEOUT   14
-
-

The RPCAP run-time timeout has expired

- -

Definition at line 324 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_SETSAMPLING   15
-
-

Error diring the settings of sampling parameters

- -

Definition at line 325 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_STARTCAPTURE   12
-
-

Generic pcap_startcapture error

- -

Definition at line 322 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_UPDATEFILTER   7
-
-

Generic updatefilter error

- -

Definition at line 317 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_WRONGMSG   16
-
-

The other end endpoint sent a message which has not been recognized

- -

Definition at line 326 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define PCAP_ERR_WRONGVER   17
-
-

The other end endpoint ahs a version number that is not compatible with our

- -

Definition at line 327 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_ACTIVE_WAIT   30
-
-

Waiting time betweek two attempts to open a connection, in active mode (default: 30 sec)

- -

Definition at line 92 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_DEFAULT_NETADDR   ""
-
-

Default network address on which the RPCAP daemon binds to.

- -

Definition at line 88 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_DEFAULT_NETPORT   "2002"
-
-

Default port on which the RPCAP daemon is waiting for connections.

- -

Definition at line 85 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_DEFAULT_NETPORT_ACTIVE   "2003"
-
-

Default port on which the client workstation is waiting for connections in case of active mode.

- -

Definition at line 87 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_HOSTLIST_SEP   " ,;\n\r"
-
- -

Separators used for the host list.

-

It is used:

    -
  • by the rpcapd daemon, when you types a list of allowed connecting hosts
  • -
  • by the rpcap in active mode, when the client waits for incoming connections from other hosts
  • -
- -

Definition at line 109 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_AUTH_REPLY   (128+RPCAP_MSG_AUTH_REQ)
-
-

Sends a message that says 'ok, authorization successful'

- -

Definition at line 296 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_AUTH_REQ   8
-
-

Message that keeps the authentication parameters

- -

Definition at line 287 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_CLOSE   6
-
-

Close the connection with the remote peer

- -

Definition at line 285 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_ENDCAP_REPLY   (128+RPCAP_MSG_ENDCAP_REQ)
-
-

Confirms that the capture stopped succesfully

- -

Definition at line 298 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_ENDCAP_REQ   10
-
-

Stops the current capture, keeping the device open

- -

Definition at line 289 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_ERROR   1
-
-

Message that keeps an error notification

- -

Definition at line 280 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_FINDALLIF_REPLY   (128+RPCAP_MSG_FINDALLIF_REQ)
-
-

Keeps the list of all the remote interfaces

- -

Definition at line 292 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_FINDALLIF_REQ   2
-
-

Request to list all the remote interfaces

- -

Definition at line 281 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_OPEN_REPLY   (128+RPCAP_MSG_OPEN_REQ)
-
-

The remote device has been opened correctly

- -

Definition at line 293 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_OPEN_REQ   3
-
-

Request to open a remote device

- -

Definition at line 282 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_PACKET   7
-
-

This is a 'data' message, which carries a network packet

- -

Definition at line 286 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_SETSAMPLING_REPLY   (128+RPCAP_MSG_SETSAMPLING_REQ)
-
-

Confirms that the capture stopped succesfully

- -

Definition at line 299 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_SETSAMPLING_REQ   11
-
-

Sset sampling parameters

- -

Definition at line 290 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_STARTCAP_REPLY   (128+RPCAP_MSG_STARTCAP_REQ)
-
-

The capture is staarting correctly

- -

Definition at line 294 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_STARTCAP_REQ   4
-
-

Request to start a capture on a remote device

- -

Definition at line 283 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_STATS_REPLY   (128+RPCAP_MSG_STATS_REQ)
-
-

Message that keeps the network statistics

- -

Definition at line 297 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_STATS_REQ   9
-
-

It requires to have network statistics

- -

Definition at line 288 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_UPDATEFILTER_REPLY   (128+RPCAP_MSG_UPDATEFILTER_REQ)
-
-

The filter has been applied correctly on the remote device

- -

Definition at line 295 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_MSG_UPDATEFILTER_REQ   5
-
-

Send a compiled filter into the remote device

- -

Definition at line 284 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_NETBUF_SIZE   64000
-
- -

Buffer used by socket functions to send-receive packets. In case you plan to have messages larger than this value, you have to increase it.

- -

Definition at line 99 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_DGRAM   2
-
-

Use a datagram (i.e. UDP) connection for the data stream (default: use TCP)

- -

Definition at line 302 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_INBOUND   8
-
-

Capture only inbound packets (take care: the flag has no effects with promiscuous enabled)

- -

Definition at line 304 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_OUTBOUND   16
-
-

Capture only outbound packets (take care: the flag has no effects with promiscuous enabled)

- -

Definition at line 305 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_PROMISC   1
-
-

Enables promiscuous mode (default: disabled)

- -

Definition at line 301 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_STARTCAPREQ_FLAG_SERVEROPEN   4
-
-

The server has to open the data connection toward the client

- -

Definition at line 303 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_SUSPEND_WRONGAUTH   1
-
-

If the authentication is wrong, stops 1 sec before accepting a new auth message

- -

Definition at line 93 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_TIMEOUT_INIT   90
-
-

Initial timeout for RPCAP connections (default: 90 sec)

- -

Definition at line 90 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_TIMEOUT_RUNTIME   180
-
-

Run-time timeout for RPCAP connections (default: 3 min)

- -

Definition at line 91 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_UPDATEFILTER_BPF   1
-
-

This code tells us that the filter is encoded with the BPF/NPF syntax

- -

Definition at line 307 of file pcap-remote.h.

- -
-
- -
-
- - - - -
#define RPCAP_VERSION   0
-
-

Present version of the RPCAP protocol (0 = Experimental).

- -

Definition at line 89 of file pcap-remote.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef int int32
-
- -

Provides a 32-bits integer.

- -

Definition at line 118 of file pcap-remote.h.

- -
-
- -
-
- - - - -
typedef unsigned short uint16
-
- -

Provides a 16-bits unsigned integer.

- -

Definition at line 116 of file pcap-remote.h.

- -
-
- -
-
- - - - -
typedef unsigned int uint32
-
- -

Provides a 32-bits unsigned integer.

- -

Definition at line 117 of file pcap-remote.h.

- -
-
- -
-
- - - - -
typedef unsigned char uint8
-
- -

Provides an 8-bits unsigned integer.

- -

Definition at line 115 of file pcap-remote.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remote__samp__methods.html b/libs/WinPcap-413-173-b4/docs/html/group__remote__samp__methods.html deleted file mode 100644 index 1631b955..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remote__samp__methods.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -WinPcap: Sampling methods defined in the pcap_setsampling() function - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Sampling methods defined in the pcap_setsampling() function
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remote__source__ID.html b/libs/WinPcap-413-173-b4/docs/html/group__remote__source__ID.html deleted file mode 100644 index a8a843b7..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remote__source__ID.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -WinPcap: Identifiers related to the new source syntax - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Identifiers related to the new source syntax
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remote__source__string.html b/libs/WinPcap-413-173-b4/docs/html/group__remote__source__string.html deleted file mode 100644 index a922f1bb..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remote__source__string.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -WinPcap: Strings related to the new source syntax - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Strings related to the new source syntax
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remote__struct.html b/libs/WinPcap-413-173-b4/docs/html/group__remote__struct.html deleted file mode 100644 index 1c469b75..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remote__struct.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - -WinPcap: Exported Structures and Definitions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
- -
-
Exported Structures and Definitions
-
- - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__remotefunc.html b/libs/WinPcap-413-173-b4/docs/html/group__remotefunc.html deleted file mode 100644 index 6d956ee8..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__remotefunc.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - -WinPcap: Exported Functions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Exported Functions
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap.html deleted file mode 100644 index 3bdd95e2..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -WinPcap: WinPcap user's manual - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
- -
-
WinPcap user's manual
-
-
- - - - - - - - - - - - -

-Modules

 Definitions
 
 Exported functions
 
 WinPcap tutorial: a step by step guide to using WinPcap
 
 Filtering expression syntax
 
 Using WinPcap in your programs
 
-

Detailed Description

- - - - - - - - - - -

This section contains the user manual of wpcap.dll, the -dynamic library that contains the public WinPcap API. -wpcap.dll exports a set of -system-independent functions for packet capture and network analysis. These -functions can be used to:

-
    -
  • obtain the list of the available network adapters -
  • retrieve various information about an adapter, like the description and the list of addresses
  • -
  • sniff the packets using one of the network interface cards of the PC
  • -
  • send packets to the network -
  • efficiently save packets to disk and load them with an interface similar to the one of - live capture
  • -
  • create packet filters using a high level language and apply them to the captured - packets
  • -
-

wpcap.dll is compatible with libpcap, the well known packet capture library -for Unix. This compatibility means that one can develop portable network tools -that will run on the Win32 OS family and on all of the major Unix flavors.

-

Several portions of the manual present in this section derive directly from the man pages of tcpdump and libpcap, maintained by the tcpdump.org developers. Therefore, if you -are looking for updated docs, you can consult the web site www.tcpdump.org.

-

Note

-

Some functions are marked deprecated -or discouraged. The meanings of these labels are:

-
    -
  • discouraged: the use of another function with similar purpose is - suggested, however this one is still valid.
  • -
  • deprecated: the function is present only for portability and - backward compatibility. It should be avoided, and it is strongly suggested - to use another equivalent function instead.
    -
  • -
-

- - - -

- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__def.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__def.html deleted file mode 100644 index d330c00f..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__def.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - -WinPcap: Definitions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
- -
- - - - - - - - - - - - - - - - - -

-Data Structures

struct  pcap_file_header
 Header of a libpcap dump file. More...
 
struct  pcap_pkthdr
 Header of a packet in the dump file. More...
 
struct  pcap_stat
 Structure that keeps statistical values on an interface. More...
 
struct  pcap_if
 Item in a list of interfaces, used by pcap_findalldevs(). More...
 
struct  pcap_addr
 Representation of an interface address, used by pcap_findalldevs(). More...
 
- - - - - - - - - - - - - -

-Macros

#define PCAP_VERSION_MAJOR   2
 Major libpcap dump file version. More...
 
#define PCAP_VERSION_MINOR   4
 Minor libpcap dump file version. More...
 
#define PCAP_ERRBUF_SIZE   256
 Size to use when allocating the buffer that contains the libpcap errors. More...
 
#define PCAP_IF_LOOPBACK   0x00000001
 interface is loopback More...
 
- - - - - - - - - - - - - - - - - - - -

-Typedefs

typedef int bpf_int32
 32-bit integer More...
 
typedef u_int bpf_u_int32
 32-bit unsigned integer More...
 
typedef struct pcap pcap_t
 Descriptor of an open capture instance. This structure is opaque to the user, that handles its content through the functions provided by wpcap.dll. More...
 
typedef struct pcap_dumper pcap_dumper_t
 libpcap savefile descriptor. More...
 
typedef struct pcap_if pcap_if_t
 Item in a list of interfaces, see pcap_if. More...
 
typedef struct pcap_addr pcap_addr_t
 Representation of an interface address, see pcap_addr. More...
 
-

Detailed Description

-

Definitions for wpcap.dll

-

Macro Definition Documentation

- -
-
- - - - -
#define PCAP_ERRBUF_SIZE   256
-
- -

Size to use when allocating the buffer that contains the libpcap errors.

- -

Definition at line 59 of file incs/pcap.h.

- -
-
- -
-
- - - - -
#define PCAP_IF_LOOPBACK   0x00000001
-
- -

interface is loopback

- -

Definition at line 156 of file incs/pcap.h.

- -
-
- -
-
- - - - -
#define PCAP_VERSION_MAJOR   2
-
- -

Major libpcap dump file version.

- -

Definition at line 56 of file incs/pcap.h.

- -
-
- -
-
- - - - -
#define PCAP_VERSION_MINOR   4
-
- -

Minor libpcap dump file version.

- -

Definition at line 57 of file incs/pcap.h.

- -
-
-

Typedef Documentation

- -
-
- - - - -
typedef int bpf_int32
-
- -

32-bit integer

-

Compatibility for systems that have a bpf.h that predates the bpf typedefs for 64-bit support.

- -

Definition at line 66 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef u_int bpf_u_int32
-
- -

32-bit unsigned integer

- -

Definition at line 67 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef struct pcap_addr pcap_addr_t
-
- -

Representation of an interface address, see pcap_addr.

- -

Definition at line 73 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef struct pcap_dumper pcap_dumper_t
-
- -

libpcap savefile descriptor.

- -

Definition at line 71 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef struct pcap_if pcap_if_t
-
- -

Item in a list of interfaces, see pcap_if.

- -

Definition at line 72 of file incs/pcap.h.

- -
-
- -
-
- - - - -
typedef struct pcap pcap_t
-
- -

Descriptor of an open capture instance. This structure is opaque to the user, that handles its content through the functions provided by wpcap.dll.

- -

Definition at line 70 of file incs/pcap.h.

- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut.html deleted file mode 100644 index cecba9b7..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - -WinPcap: WinPcap tutorial: a step by step guide to using WinPcap - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
- -
-
WinPcap tutorial: a step by step guide to using WinPcap
-
-
- - - - - - - - - - - - - - - - - - - - -

-Modules

 Obtaining the device list
 
 Obtaining advanced information about installed devices
 
 Opening an adapter and capturing the packets
 
 Capturing the packets without the callback
 
 Filtering the traffic
 
 Interpreting the packets
 
 Handling offline dump files
 
 Sending Packets
 
 Gathering Statistics on the network traffic
 
-

Detailed Description

-

This section shows how to use the features of the WinPcap API. It is organized as a tutorial, subdivided into a set of lessons that will introduce the reader, in a step-by-step fashion, to program development using WinPcap, from the basic functions (obtaining the adapter list, starting a capture, etc.) to the most advanced ones (handling send queues and gathering statistics about network traffic).

-

Several code snippets, as well as simple but complete programs are provided as a reference: all of the source code contains links to the rest of the manual, making it is possible to click on functions and data structures to jump to the corresponding documentation.

-

The samples are written in plain C, so a basic knowledge of C programming is required. Also, since this is a tutorial about a library dealing with "raw" networking packets, good knowledge of networks and network protocols is assumed.

-

Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut1.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut1.html deleted file mode 100644 index 0b27591f..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut1.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - -WinPcap: Obtaining the device list - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
- -
-

Typically, the first thing that a WinPcap-based application does is get a list of attached network adapters. Both libpcap and WinPcap provide the pcap_findalldevs_ex() function for this purpose: this function returns a linked list of pcap_if structures, each of which contains comprehensive information about an attached adapter. In particular, the fields name and description contain the name and a human readable description, respectively, of the corresponding device.

-

The following code retrieves the adapter list and shows it on the screen, printing an error if no adapters are found.

-
#include "pcap.h"
-
-
main()
-
{
-
pcap_if_t *alldevs;
- -
int i=0;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
-
/* Retrieve the device list from the local machine */
-
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL /* auth is not needed */, &alldevs, errbuf) == -1)
-
{
-
fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);
-
exit(1);
-
}
-
-
/* Print the list */
-
for(d= alldevs; d != NULL; d= d->next)
-
{
-
printf("%d. %s", ++i, d->name);
-
if (d->description)
-
printf(" (%s)\n", d->description);
-
else
-
printf(" (No description available)\n");
-
}
-
-
if (i == 0)
-
{
-
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-
return;
-
}
-
-
/* We don't need any more the device list. Free it */
-
pcap_freealldevs(alldevs);
-
}
-

Some comments about this code.

-

First of all, pcap_findalldevs_ex(), like other libpcap functions, has an errbuf parameter. This parameter points to a string filled by libpcap with a description of the error if something goes wrong.

-

Second, remember that not all the OSes supported by libpcap provide a description of the network interfaces, therefore if we want to write a portable application, we must consider the case in which description is null: we print the string "No description available" in that situation.

-

Note finally that we free the list with pcap_freealldevs() once when we have finished with it.

-

Let's try to compile and run the code of this first sample. In order to compile it under Unix or Cygwin, simply type:

-
-  gcc -o testprog testprog.c -lpcap
-

On Windows, you will need to create a project, following the instructions in the Using WinPcap in your programs section of this manual. However, we suggest that you use the WinPcap developer's pack (available at the WinPcap website, http://www.winpcap.org ), since it provides many examples already configured as projects including all the code presented in this tutorial and the includes and libraries needed to compile and run the examples.

-

Assuming we have compiled the program, let's try to run it. On a particular WinXP workstation, the result we optained is

-
-   1. \Device\NPF_{4E273621-5161-46C8-895A-48D0E52A0B83} (Realtek RTL8029(AS) Ethernet Adapter)
-   2. \Device\NPF_{5D24AE04-C486-4A96-83FB-8B5EC6C7F430} (3Com EtherLink PCI) 
-

As you can see, the name of the network adapters (that will be passed to libpcap when opening the devices) under Windows are quite unreadable, so the parenthetical descriptions can be very helpful.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut2.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut2.html deleted file mode 100644 index 0d2a477c..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut2.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - -WinPcap: Obtaining advanced information about installed devices - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Obtaining advanced information about installed devices
-
-
-

Lesson 1 (Obtaining the device list) demonstrated how to get basic information (i.e. device name and description) about available adapters. Actually, WinPcap provides also other advanced information. In particular, every pcap_if structure returned by pcap_findalldevs_ex() contains also a list of pcap_addr structures, with:

    -
  • a list of addresses for that interface.
  • -
  • a list of netmasks (each of which corresponds to an entry in the addresses list).
  • -
  • a list of broadcast addresses (each of which corresponds to an entry in the addresses list).
  • -
  • a list of destination addresses (each of which corresponds to an entry in the addresses list).
  • -
-

Additionally, pcap_findalldevs_ex() can also return remote adapters and a list of pcap files that are located in a given local folder.

-

The following sample provides an ifprint() function that prints the complete contents of a pcap_if structure. It is invoked by the program for every entry returned by pcap_findalldevs_ex().

-
/*
-
* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
-
* All rights reserved.
-
*
-
* Redistribution and use in source and binary forms, with or without
-
* modification, are permitted provided that the following conditions
-
* are met:
-
*
-
* 1. Redistributions of source code must retain the above copyright
-
* notice, this list of conditions and the following disclaimer.
-
* 2. Redistributions in binary form must reproduce the above copyright
-
* notice, this list of conditions and the following disclaimer in the
-
* documentation and/or other materials provided with the distribution.
-
* 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.
-
*
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
*
-
*/
-
-
#include <stdio.h>
-
-
#include "pcap.h"
-
-
#ifndef _WIN32
-
#include <sys/socket.h>
-
#include <netinet/in.h>
-
#else
-
#include <winsock.h>
-
#endif
-
-
-
// Function prototypes
-
void ifprint(pcap_if_t *d);
-
char *iptos(u_long in);
-
char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen);
-
-
-
int main()
-
{
-
pcap_if_t *alldevs;
- -
char errbuf[PCAP_ERRBUF_SIZE+1];
-
char source[PCAP_ERRBUF_SIZE+1];
-
-
printf("Enter the device you want to list:\n"
-
"rpcap:// ==> lists interfaces in the local machine\n"
-
"rpcap://hostname:port ==> lists interfaces in a remote machine\n"
-
" (rpcapd daemon must be up and running\n"
-
" and it must accept 'null' authentication)\n"
-
"file://foldername ==> lists all pcap files in the give folder\n\n"
-
"Enter your choice: ");
-
-
fgets(source, PCAP_ERRBUF_SIZE, stdin);
-
source[PCAP_ERRBUF_SIZE] = '\0';
-
-
/* Retrieve the interfaces list */
-
if (pcap_findalldevs_ex(source, NULL, &alldevs, errbuf) == -1)
-
{
-
fprintf(stderr,"Error in pcap_findalldevs: %s\n",errbuf);
-
exit(1);
-
}
-
-
/* Scan the list printing every entry */
-
for(d=alldevs;d;d=d->next)
-
{
-
ifprint(d);
-
}
-
-
pcap_freealldevs(alldevs);
-
-
return 1;
-
}
-
-
-
-
/* Print all the available information on the given interface */
-
void ifprint(pcap_if_t *d)
-
{
- -
char ip6str[128];
-
-
/* Name */
-
printf("%s\n",d->name);
-
-
/* Description */
-
if (d->description)
-
printf("\tDescription: %s\n",d->description);
-
-
/* Loopback Address*/
-
printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no");
-
-
/* IP addresses */
-
for(a=d->addresses;a;a=a->next) {
-
printf("\tAddress Family: #%d\n",a->addr->sa_family);
-
-
switch(a->addr->sa_family)
-
{
-
case AF_INET:
-
printf("\tAddress Family Name: AF_INET\n");
-
if (a->addr)
-
printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr));
-
if (a->netmask)
-
printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr));
-
if (a->broadaddr)
-
printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr));
-
if (a->dstaddr)
-
printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr));
-
break;
-
-
case AF_INET6:
-
printf("\tAddress Family Name: AF_INET6\n");
-
if (a->addr)
-
printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str)));
-
break;
-
-
default:
-
printf("\tAddress Family Name: Unknown\n");
-
break;
-
}
-
}
-
printf("\n");
-
}
-
-
-
-
/* From tcptraceroute, convert a numeric IP address to a string */
-
#define IPTOSBUFFERS 12
-
char *iptos(u_long in)
-
{
-
static char output[IPTOSBUFFERS][3*4+3+1];
-
static short which;
-
u_char *p;
-
-
p = (u_char *)&in;
-
which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1);
-
_snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
-
return output[which];
-
}
-
-
char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen)
-
{
-
socklen_t sockaddrlen;
-
-
#ifdef _WIN32
-
sockaddrlen = sizeof(struct sockaddr_in6);
-
#else
-
sockaddrlen = sizeof(struct sockaddr_storage);
-
#endif
-
-
-
if(getnameinfo(sockaddr,
-
sockaddrlen,
-
address,
-
addrlen,
-
NULL,
-
0,
-
NI_NUMERICHOST) != 0) address = NULL;
-
-
return address;
-
}
-
-
-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut3.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut3.html deleted file mode 100644 index 0138cd63..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut3.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -WinPcap: Opening an adapter and capturing the packets - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
-
-
-

Now that we've seen how to obtain an adapter to play with, let's start the real job, opening an adapter and capturing some traffic. In this lesson we'll write a program that prints some information about each packet flowing through the adapter.

-

The function that opens a capture device is pcap_open(). The parameters, snaplen, flags and to_ms deserve some explanation.

-

snaplen specifies the portion of the packet to capture. On some OSes (like xBSD and Win32), the packet driver can be configured to capture only the initial part of any packet: this decreases the amount of data to copy to the application and therefore improves the efficiency of the capture. In this case we use the value 65536 which is higher than the greatest MTU that we could encounter. In this manner we ensure that the application will always receive the whole packet.

-

flags: the most important flag is the one that indicates if the adapter will be put in promiscuous mode. In normal operation, an adapter only captures packets from the network that are destined to it; the packets exchanged by other hosts are therefore ignored. Instead, when the adapter is in promiscuous mode it captures all packets whether they are destined to it or not. This means that on shared media (like non-switched Ethernet), WinPcap will be able to capture the packets of other hosts. Promiscuous mode is the default for most capture applications, so we enable it in the following example.

-

to_ms specifies the read timeout, in milliseconds. A read on the adapter (for example, with pcap_dispatch() or pcap_next_ex()) will always return after to_ms milliseconds, even if no packets are available from the network. to_ms also defines the interval between statistical reports if the adapter is in statistical mode (see the lesson "\ref wpcap_tut9" for information about statistical mode). Setting to_ms to 0 means no timeout, a read on the adapter never returns if no packets arrive. A -1 timeout on the other side causes a read on the adapter to always return immediately.

-
#include "pcap.h"
-
-
/* prototype of the packet handler */
-
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
-
-
int main()
-
{
-
pcap_if_t *alldevs;
- -
int inum;
-
int i=0;
-
pcap_t *adhandle;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
-
/* Retrieve the device list on the local machine */
-
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-
{
-
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-
exit(1);
-
}
-
-
/* Print the list */
-
for(d=alldevs; d; d=d->next)
-
{
-
printf("%d. %s", ++i, d->name);
-
if (d->description)
-
printf(" (%s)\n", d->description);
-
else
-
printf(" (No description available)\n");
-
}
-
-
if(i==0)
-
{
-
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-
return -1;
-
}
-
-
printf("Enter the interface number (1-%d):",i);
-
scanf_s("%d", &inum);
-
-
if(inum < 1 || inum > i)
-
{
-
printf("\nInterface number out of range.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
/* Jump to the selected adapter */
-
for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-
-
/* Open the device */
-
if ( (adhandle= pcap_open(d->name, // name of the device
-
65536, // portion of the packet to capture
-
// 65536 guarantees that the whole packet will be captured on all the link layers
-
PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
-
1000, // read timeout
-
NULL, // authentication on the remote machine
-
errbuf // error buffer
-
) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
printf("\nlistening on %s...\n", d->description);
-
-
/* At this point, we don't need any more the device list. Free it */
-
pcap_freealldevs(alldevs);
-
-
/* start the capture */
-
pcap_loop(adhandle, 0, packet_handler, NULL);
-
-
return 0;
-
}
-
-
-
/* Callback function invoked by libpcap for every incoming packet */
-
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
-
{
-
struct tm ltime;
-
char timestr[16];
-
time_t local_tv_sec;
-
-
/*
-
* unused variables
-
*/
-
(VOID)(param);
-
(VOID)(pkt_data);
-
-
/* convert the timestamp to readable format */
-
local_tv_sec = header->ts.tv_sec;
-
localtime_s(&ltime, &local_tv_sec);
-
strftime( timestr, sizeof timestr, "%H:%M:%S", &ltime);
-
-
printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len);
-
-
}
-

Once the adapter is opened, the capture can be started with pcap_dispatch() or pcap_loop(). These two functions are very similar, the difference is that pcap_ dispatch() returns (although not guaranteed) when the timeout expires while pcap_loop() doesn't return until cnt packets have been captured, so it can block for an arbitrary period on an under-utilized network. pcap_loop() is enough for the purpose of this sample, while pcap_dispatch() is normally used in a more complex program.

-

Both of these functions have a callback parameter, packet_handler, pointing to a function that will receive the packets. This function is invoked by libpcap for every new packet coming from the network and receives a generic status (corresponding to the user parameter of pcap_loop() and pcap_dispatch()), a header with some information on the packet like the timestamp and the length and the actual data of the packet including all the protocol headers. Note that the frame CRC is normally not present, because it is removed by the network adapter after frame validation. Note also that most adapters discard packets with wrong CRCs, therefore WinPcap is normally not able to capture them.

-

The above example extracts the timestamp and the length of every packet from the pcap_pkthdr header and prints them on the screen.

-

Please note that there may be a drawback using pcap_loop() mainly related to the fact that the handler is called by the packet capture driver; therefore the user application does not have direct control over it. Another approach (and to have more readable programs) is to use the pcap_next_ex() function, which is presented in the next example (Capturing the packets without the callback).

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut4.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut4.html deleted file mode 100644 index ebf578c7..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut4.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - -WinPcap: Capturing the packets without the callback - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
- -
-
-

The example program in this lesson behaves exactly like the previous program (Opening an adapter and capturing the packets), but it uses pcap_next_ex() instead of pcap_loop().

-

The callback-based capture mechanism of pcap_loop() is elegant and it could be a good choice in some situations. However, handling a callback is sometimes not practical – it often makes the program more complex especially in situations with multithreaded applications or C++ classes.

-

In these cases, pcap_next_ex() retrievs a packet with a direct call – using pcap_next_ex() packets are received only when the programmer wants them.

-

The parameters of this function are the same as a capture callback – it takes an adapter descriptor and a couple of pointers that will be initialized and returned to the user (one to a pcap_pkthdr structure and another to a buffer with the packet data).

-

In the following program, we recycle the callback code of the previous lesson's example and move it inside main() right after the call to pcap_next_ex().

-
#include "pcap.h"
-
-
-
int main()
-
{
-
pcap_if_t *alldevs;
- -
int inum;
-
int i=0;
-
pcap_t *adhandle;
-
int res;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
struct tm ltime;
-
char timestr[16];
-
struct pcap_pkthdr *header;
-
const u_char *pkt_data;
-
time_t local_tv_sec;
-
-
-
/* Retrieve the device list on the local machine */
-
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-
{
-
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-
exit(1);
-
}
-
-
/* Print the list */
-
for(d=alldevs; d; d=d->next)
-
{
-
printf("%d. %s", ++i, d->name);
-
if (d->description)
-
printf(" (%s)\n", d->description);
-
else
-
printf(" (No description available)\n");
-
}
-
-
if(i==0)
-
{
-
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-
return -1;
-
}
-
-
printf("Enter the interface number (1-%d):",i);
-
scanf_s("%d", &inum);
-
-
if(inum < 1 || inum > i)
-
{
-
printf("\nInterface number out of range.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
/* Jump to the selected adapter */
-
for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-
-
/* Open the device */
-
if ( (adhandle= pcap_open(d->name, // name of the device
-
65536, // portion of the packet to capture.
-
// 65536 guarantees that the whole packet will be captured on all the link layers
-
PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
-
1000, // read timeout
-
NULL, // authentication on the remote machine
-
errbuf // error buffer
-
) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
printf("\nlistening on %s...\n", d->description);
-
-
/* At this point, we don't need any more the device list. Free it */
-
pcap_freealldevs(alldevs);
-
-
/* Retrieve the packets */
-
while((res = pcap_next_ex( adhandle, &header, &pkt_data)) >= 0){
-
-
if(res == 0)
-
/* Timeout elapsed */
-
continue;
-
-
/* convert the timestamp to readable format */
-
local_tv_sec = header->ts.tv_sec;
-
localtime_s(&ltime, &local_tv_sec);
-
strftime( timestr, sizeof timestr, "%H:%M:%S", &ltime);
-
-
printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len);
-
}
-
-
if(res == -1){
-
printf("Error reading the packets: %s\n", pcap_geterr(adhandle));
-
return -1;
-
}
-
-
return 0;
-
}
-

Why do we use pcap_next_ex() instead of the old pcap_next()? Because pcap_next() has some drawbacks. First of all, it is inefficient because it hides the callback method but still relies on pcap_dispatch(). Second, it is not able to detect EOF, so it's not very useful when gathering packets from a file.

-

Notice also that pcap_next_ex() returns different values for success, timeout elapsed, error and EOF conditions.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut5.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut5.html deleted file mode 100644 index b5c2832e..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut5.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - -WinPcap: Filtering the traffic - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
- -
-

One of the most powerful features offered by WinPcap (and by libpcap as well) is the filtering engine. It provides a very efficient way to receive subsets of the network traffic, and is (usually) integrated with the capture mechanism provided by WinPcap. The functions used to filter packets are pcap_compile() and pcap_setfilter().

-

pcap_compile() takes a string containing a high-level Boolean (filter) expression and produces a low-level byte code that can be interpreted by the fileter engine in the packet driver. The syntax of the boolean expression can be found in the Filtering expression syntax section of this documentation.

-

pcap_setfilter() associates a filter with a capture session in the kernel driver. Once pcap_setfilter() is called, the associated filter will be applied to all the packets coming from the network, and all the conformant packets (i.e., packets for which the Boolean expression evaluates to true) will be actually copied to the application.

-

The following code shows how to compile and set a filter. Note that we must retrieve the netmask from the pcap_if structure that describes the adapter, because some filters created by pcap_compile() require it.

-

The filter passed to pcap_compile() in this code snippet is "ip and tcp", which means to "keep only the packets that are both IPv4 and TCP and deliver them to the application".

-
if (d->addresses != NULL)
-
/* Retrieve the mask of the first address of the interface */
-
netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr;
-
else
-
/* If the interface is without an address we suppose to be in a C class network */
-
netmask=0xffffff;
-
-
-
//compile the filter
-
if (pcap_compile(adhandle, &fcode, "ip and tcp", 1, netmask) < 0)
-
{
-
fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
//set the filter
-
if (pcap_setfilter(adhandle, &fcode) < 0)
-
{
-
fprintf(stderr,"\nError setting the filter.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-

If you want to see some code that uses the filtering functions shown in this lesson, look at the example presented in the next Lesson, Interpreting the packets.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut6.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut6.html deleted file mode 100644 index b7ba7bfb..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut6.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - -WinPcap: Interpreting the packets - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
- -
-

Now that we are able to capture and filter network traffic, we want to put our knowledge to work with a simple "real world" application.

-

In this lesson we will take code from the previous lessons and use these pieces to build a more useful program. the main purpose of the current program is to show how the protocol headers of a captured packet can be parsed and interpreted. The resulting application, called UDPdump, prints a summary of the UDP traffic on our network.

-

We have chosen to parse and display the UDP protocol because it is more accessible than other protocols such as TCP and consequently is an excellent initial example. Let's look at the code:

-
/*
-
* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
-
* All rights reserved.
-
*
-
* Redistribution and use in source and binary forms, with or without
-
* modification, are permitted provided that the following conditions
-
* are met:
-
*
-
* 1. Redistributions of source code must retain the above copyright
-
* notice, this list of conditions and the following disclaimer.
-
* 2. Redistributions in binary form must reproduce the above copyright
-
* notice, this list of conditions and the following disclaimer in the
-
* documentation and/or other materials provided with the distribution.
-
* 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.
-
*
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
*
-
*/
-
-
#include "pcap.h"
-
-
/* 4 bytes IP address */
-
typedef struct ip_address{
-
u_char byte1;
-
u_char byte2;
-
u_char byte3;
-
u_char byte4;
-
}ip_address;
-
-
/* IPv4 header */
-
typedef struct ip_header{
-
u_char ver_ihl; // Version (4 bits) + Internet header length (4 bits)
-
u_char tos; // Type of service
-
u_short tlen; // Total length
-
u_short identification; // Identification
-
u_short flags_fo; // Flags (3 bits) + Fragment offset (13 bits)
-
u_char ttl; // Time to live
-
u_char proto; // Protocol
-
u_short crc; // Header checksum
-
ip_address saddr; // Source address
-
ip_address daddr; // Destination address
-
u_int op_pad; // Option + Padding
-
}ip_header;
-
-
/* UDP header*/
-
typedef struct udp_header{
-
u_short sport; // Source port
-
u_short dport; // Destination port
-
u_short len; // Datagram length
-
u_short crc; // Checksum
-
}udp_header;
-
-
/* prototype of the packet handler */
-
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
-
-
-
int main()
-
{
-
pcap_if_t *alldevs;
- -
int inum;
-
int i=0;
-
pcap_t *adhandle;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
u_int netmask;
-
char packet_filter[] = "ip and udp";
-
struct bpf_program fcode;
-
-
/* Retrieve the device list */
-
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-
{
-
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-
exit(1);
-
}
-
-
/* Print the list */
-
for(d=alldevs; d; d=d->next)
-
{
-
printf("%d. %s", ++i, d->name);
-
if (d->description)
-
printf(" (%s)\n", d->description);
-
else
-
printf(" (No description available)\n");
-
}
-
-
if(i==0)
-
{
-
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-
return -1;
-
}
-
-
printf("Enter the interface number (1-%d):",i);
-
scanf_s("%d", &inum);
-
-
if(inum < 1 || inum > i)
-
{
-
printf("\nInterface number out of range.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
/* Jump to the selected adapter */
-
for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-
-
/* Open the adapter */
-
if ( (adhandle= pcap_open(d->name, // name of the device
-
65536, // portion of the packet to capture.
-
// 65536 grants that the whole packet will be captured on all the MACs.
-
PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
-
1000, // read timeout
-
NULL, // remote authentication
-
errbuf // error buffer
-
) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
/* Check the link layer. We support only Ethernet for simplicity. */
-
if(pcap_datalink(adhandle) != DLT_EN10MB)
-
{
-
fprintf(stderr,"\nThis program works only on Ethernet networks.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
if(d->addresses != NULL)
-
/* Retrieve the mask of the first address of the interface */
-
netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr;
-
else
-
/* If the interface is without addresses we suppose to be in a C class network */
-
netmask=0xffffff;
-
-
-
//compile the filter
-
if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 )
-
{
-
fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
//set the filter
-
if (pcap_setfilter(adhandle, &fcode)<0)
-
{
-
fprintf(stderr,"\nError setting the filter.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
printf("\nlistening on %s...\n", d->description);
-
-
/* At this point, we don't need any more the device list. Free it */
-
pcap_freealldevs(alldevs);
-
-
/* start the capture */
-
pcap_loop(adhandle, 0, packet_handler, NULL);
-
-
return 0;
-
}
-
-
/* Callback function invoked by libpcap for every incoming packet */
-
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
-
{
-
struct tm ltime;
-
char timestr[16];
-
ip_header *ih;
-
udp_header *uh;
-
u_int ip_len;
-
u_short sport,dport;
-
time_t local_tv_sec;
-
-
/*
-
* Unused variable
-
*/
-
(VOID)(param);
-
-
/* convert the timestamp to readable format */
-
local_tv_sec = header->ts.tv_sec;
-
localtime_s(&ltime, &local_tv_sec);
-
strftime( timestr, sizeof timestr, "%H:%M:%S", &ltime);
-
-
/* print timestamp and length of the packet */
-
printf("%s.%.6d len:%d ", timestr, header->ts.tv_usec, header->len);
-
-
/* retireve the position of the ip header */
-
ih = (ip_header *) (pkt_data +
-
14); //length of ethernet header
-
-
/* retireve the position of the udp header */
-
ip_len = (ih->ver_ihl & 0xf) * 4;
-
uh = (udp_header *) ((u_char*)ih + ip_len);
-
-
/* convert from network byte order to host byte order */
-
sport = ntohs( uh->sport );
-
dport = ntohs( uh->dport );
-
-
/* print ip addresses and udp ports */
-
printf("%d.%d.%d.%d.%d -> %d.%d.%d.%d.%d\n",
-
ih->saddr.byte1,
-
ih->saddr.byte2,
-
ih->saddr.byte3,
-
ih->saddr.byte4,
-
sport,
-
ih->daddr.byte1,
-
ih->daddr.byte2,
-
ih->daddr.byte3,
-
ih->daddr.byte4,
-
dport);
-
}
-

First of all, we set the filter to "ip and udp". In this way we are sure that packet_handler() will receive only UDP packets over IPv4: this simplifies the parsing and increases the efficiency of the program.

-

We have also created a couple of structs that describe the IP and UDP headers. These structs are used by packet_handler() to properly locate the various header fields.

-

packet_handler(), although limited to a single protocol dissector (UDP over IPv4), shows how complex "sniffers" like tcpdump/WinDump decode the network traffic. Since we aren't interested in the MAC header, we skip it. For simplicity and before starting the capture, we check the MAC layer with pcap_datalink() to make sure that we are dealing with an Ethernet network. This way we can be sure that the MAC header is exactly 14 bytes.

-

The IP header is located just after the MAC header. We will extract the IP source and destination addresses from the IP header.

-

Reaching the UDP header is a bit more complicated, because the IP header doesn't have a fixed length. Therefore, we use the IP header's length field to know its size. Once we know the location of the UDP header, we extract the source and destination ports.

-

The extracted values are printed on the screen, and the result is something like:

-

    -
  1. \Device\Packet_{A7FD048A-5D4B-478E-B3C1-34401AC3B72F} (Xircom t 10/100 Adapter)
    -Enter the interface number (1-2):1
    - listening on Xircom CardBus Ethernet 10/100 Adapter...
    -16:13:15.312784 len:87 130.192.31.67.2682 -> 130.192.3.21.53
    -16:13:15.314796 len:137 130.192.3.21.53 -> 130.192.31.67.2682
    -16:13:15.322101 len:78 130.192.31.67.2683 -> 130.192.3.21.53
    -
  2. -
-

-

Each of the final 3 lines represents a different packet.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut7.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut7.html deleted file mode 100644 index 1d53b869..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut7.html +++ /dev/null @@ -1,458 +0,0 @@ - - - - - - -WinPcap: Handling offline dump files - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
- -
-

In this lession we are going to learn how to handle packet capture to a file (dump to file). WinPcap offers a wide range of functions to save the network traffic to a file and to read the content of dumps – this lesson will teach how to use all of these functions. We'll see also how to use the kernel dump feature of WinPcap to obtain high-performance dumps (NOTE: At the moment, due to some problems with the new kernel buffer, this feature has been disabled).

-

The format for dump files is the libpcap one. This format contains the data of the captured packets in binary form and is a standard used by many network tools including WinDump, Ethereal and Snort.

-

Saving packets to a dump file

-

First of all, let's see how to write packets in libpcap format.

-

The following example captures the packets from the selected interface and saves them on a file whose name is provided by the user.

-
#include "pcap.h"
-
-
/* prototype of the packet handler */
-
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data);
-
-
int main(int argc, char **argv)
-
{
-
pcap_if_t *alldevs;
- -
int inum;
-
int i=0;
-
pcap_t *adhandle;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
pcap_dumper_t *dumpfile;
-
-
-
-
/* Check command line */
-
if(argc != 2)
-
{
-
printf("usage: %s filename", argv[0]);
-
return -1;
-
}
-
-
/* Retrieve the device list on the local machine */
-
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-
{
-
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-
exit(1);
-
}
-
-
/* Print the list */
-
for(d=alldevs; d; d=d->next)
-
{
-
printf("%d. %s", ++i, d->name);
-
if (d->description)
-
printf(" (%s)\n", d->description);
-
else
-
printf(" (No description available)\n");
-
}
-
-
if(i==0)
-
{
-
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-
return -1;
-
}
-
-
printf("Enter the interface number (1-%d):",i);
-
scanf_s("%d", &inum);
-
-
if(inum < 1 || inum > i)
-
{
-
printf("\nInterface number out of range.\n");
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
/* Jump to the selected adapter */
-
for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-
-
-
/* Open the device */
-
if ( (adhandle= pcap_open(d->name, // name of the device
-
65536, // portion of the packet to capture
-
// 65536 guarantees that the whole packet will be captured on all the link layers
-
PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
-
1000, // read timeout
-
NULL, // authentication on the remote machine
-
errbuf // error buffer
-
) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name);
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
/* Open the dump file */
-
dumpfile = pcap_dump_open(adhandle, argv[1]);
-
-
if(dumpfile==NULL)
-
{
-
fprintf(stderr,"\nError opening output file\n");
-
return -1;
-
}
-
-
printf("\nlistening on %s... Press Ctrl+C to stop...\n", d->description);
-
-
/* At this point, we no longer need the device list. Free it */
-
pcap_freealldevs(alldevs);
-
-
/* start the capture */
-
pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile);
-
-
return 0;
-
}
-
-
/* Callback function invoked by libpcap for every incoming packet */
-
void packet_handler(u_char *dumpfile, const struct pcap_pkthdr *header, const u_char *pkt_data)
-
{
-
/* save the packet on the dump file */
-
pcap_dump(dumpfile, header, pkt_data);
-
}
-

As you can see, the structure of the program is very similar to the ones we have seen in the previous lessons. The differences are:

    -
  • a call to pcap_dump_open() is issued once the interface is opened. This call opens a dump file and associates it with the interface.
  • -
  • the packets are written to this file with a pcap_dump() from the packet_handler() callback. The parameters of pcap_dump() are in 1-1 correspondence with the parameters of pcap_handler().
  • -
-

Reading packets from a dump file

-

Now that we have a dump file available, we can try to read its content. The following code opens a WinPcap/libpcap dump file and displays every packet contained in the file. The file is opened with pcap_open_offline(), then the usual pcap_loop() is used to sequence through the packets. As you can see, reading packets from an offline capture is nearly identical to receiving them from a physical interface.

-

This example introduces another function: pcap_createsrcsrc(). This function is required to create a source string that begins with a marker used to tell WinPcap the type of the source, e.g. "rpcap://" if we are going to open an adapter, or "file://" if we are going to open a file. This step is not required when pcap_findalldevs_ex() is used (the returned values already contain these strings). However, it is required in this example because the name of the file is read from the user input.

-
#include <stdio.h>
-
#include <pcap.h>
-
-
#define LINE_LEN 16
-
-
void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *);
-
-
int main(int argc, char **argv)
-
{
-
pcap_t *fp;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
char source[PCAP_BUF_SIZE];
-
-
if(argc != 2){
-
-
printf("usage: %s filename", argv[0]);
-
return -1;
-
-
}
-
-
/* Create the source string according to the new WinPcap syntax */
-
if ( pcap_createsrcstr( source, // variable that will keep the source string
-
PCAP_SRC_FILE, // we want to open a file
-
NULL, // remote host
-
NULL, // port on the remote host
-
argv[1], // name of the file we want to open
-
errbuf // error buffer
-
) != 0)
-
{
-
fprintf(stderr,"\nError creating a source string\n");
-
return -1;
-
}
-
-
/* Open the capture file */
-
if ( (fp= pcap_open(source, // name of the device
-
65536, // portion of the packet to capture
-
// 65536 guarantees that the whole packet will be captured on all the link layers
-
PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
-
1000, // read timeout
-
NULL, // authentication on the remote machine
-
errbuf // error buffer
-
) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the file %s.\n", source);
-
return -1;
-
}
-
-
// read and dispatch packets until EOF is reached
-
pcap_loop(fp, 0, dispatcher_handler, NULL);
-
-
return 0;
-
}
-
-
-
-
void dispatcher_handler(u_char *temp1,
-
const struct pcap_pkthdr *header, const u_char *pkt_data)
-
{
-
u_int i=0;
-
-
/*
-
* Unused variable
-
*/
-
(VOID)temp1;
-
-
/* print pkt timestamp and pkt len */
-
printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len);
-
-
/* Print the packet */
-
for (i=1; (i < header->caplen + 1 ) ; i++)
-
{
-
printf("%.2x ", pkt_data[i-1]);
-
if ( (i % LINE_LEN) == 0) printf("\n");
-
}
-
-
printf("\n\n");
-
-
}
-

The following example has the same purpose of the last one, but pcap_next_ex() is used instead of the pcap_loop() callback method.

-
#include <stdio.h>
-
#include <pcap.h>
-
-
#define LINE_LEN 16
-
-
int main(int argc, char **argv)
-
{
-
pcap_t *fp;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
char source[PCAP_BUF_SIZE];
-
struct pcap_pkthdr *header;
-
const u_char *pkt_data;
-
u_int i=0;
-
int res;
-
-
if(argc != 2)
-
{
-
printf("usage: %s filename", argv[0]);
-
return -1;
-
}
-
-
/* Create the source string according to the new WinPcap syntax */
-
if ( pcap_createsrcstr( source, // variable that will keep the source string
-
PCAP_SRC_FILE, // we want to open a file
-
NULL, // remote host
-
NULL, // port on the remote host
-
argv[1], // name of the file we want to open
-
errbuf // error buffer
-
) != 0)
-
{
-
fprintf(stderr,"\nError creating a source string\n");
-
return -1;
-
}
-
-
/* Open the capture file */
-
if ( (fp= pcap_open(source, // name of the device
-
65536, // portion of the packet to capture
-
// 65536 guarantees that the whole packet will be captured on all the link layers
-
PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
-
1000, // read timeout
-
NULL, // authentication on the remote machine
-
errbuf // error buffer
-
) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the file %s.\n", source);
-
return -1;
-
}
-
-
/* Retrieve the packets from the file */
-
while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0)
-
{
-
/* print pkt timestamp and pkt len */
-
printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len);
-
-
/* Print the packet */
-
for (i=1; (i < header->caplen + 1 ) ; i++)
-
{
-
printf("%.2x ", pkt_data[i-1]);
-
if ( (i % LINE_LEN) == 0) printf("\n");
-
}
-
-
printf("\n\n");
-
}
-
-
-
if (res == -1)
-
{
-
printf("Error reading the packets: %s\n", pcap_geterr(fp));
-
}
-
-
return 0;
-
}
-
-

Writing packets to a dump file with pcap_live_dump

-

NOTE: At the moment, due to some problems with the new kernel buffer, this feature has been disabled.

-

Recent versions of WinPcap provide a further way to save network traffic to disk, the pcap_live_dump() function. pcap_live_dump() takes three parameters: a file name, the maximum size (in bytes) that this file is allowed to reach and the maximum amount of packets that the file is allowed to contain. Zero means no limit for both these values. Notice that the program can set a filter (with pcap_setfilter(), see the tutorial Filtering the traffic) before calling pcap_live_dump() to define the subset of the traffic that will be saved.

-

pcap_live_dump() is non-blocking, therefore it starts the dump and returns immediately: The dump process goes on asynchronously until the maximum file size or the maximum amount of packets has been reached.

-

The application can wait or check the end of the dump with pcap_live_dump_ended(). Beware that if the sync parameter is nonzero, this function will block your application forever if the limits are both 0.

-
/*
-
* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
-
* All rights reserved.
-
*
-
* Redistribution and use in source and binary forms, with or without
-
* modification, are permitted provided that the following conditions
-
* are met:
-
*
-
* 1. Redistributions of source code must retain the above copyright
-
* notice, this list of conditions and the following disclaimer.
-
* 2. Redistributions in binary form must reproduce the above copyright
-
* notice, this list of conditions and the following disclaimer in the
-
* documentation and/or other materials provided with the distribution.
-
* 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.
-
*
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
*
-
*/
-
-
#include <stdlib.h>
-
#include <stdio.h>
-
-
#include <pcap.h>
-
-
#error At the moment the kernel dump feature is not supported in the driver
-
-
main(int argc, char **argv) {
-
-
pcap_if_t *alldevs, *d;
-
pcap_t *fp;
-
u_int inum, i=0;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
-
printf("kdump: saves the network traffic to file using WinPcap kernel-level dump faeature.\n");
-
printf("\t Usage: %s [adapter] | dump_file_name max_size max_packs\n", argv[0]);
-
printf("\t Where: max_size is the maximum size that the dump file will reach (0 means no limit)\n");
-
printf("\t Where: max_packs is the maximum number of packets that will be saved (0 means no limit)\n\n");
-
-
-
if(argc < 5){
-
-
/* The user didn't provide a packet source: Retrieve the device list */
-
if (pcap_findalldevs(&alldevs, errbuf) == -1)
-
{
-
fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
-
exit(1);
-
}
-
-
/* Print the list */
-
for(d=alldevs; d; d=d->next)
-
{
-
printf("%d. %s", ++i, d->name);
-
if (d->description)
-
printf(" (%s)\n", d->description);
-
else
-
printf(" (No description available)\n");
-
}
-
-
if(i==0)
-
{
-
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
-
return -1;
-
}
-
-
printf("Enter the interface number (1-%d):",i);
-
scanf("%d", &inum);
-
-
if(inum < 1 || inum > i)
-
{
-
printf("\nInterface number out of range.\n");
-
/* Free the device list */
-
return -1;
-
}
-
-
/* Jump to the selected adapter */
-
for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-
-
/* Open the device */
-
if ( (fp = pcap_open_live(d->name, 100, 1, 20, errbuf) ) == NULL)
-
{
-
fprintf(stderr,"\nError opening adapter\n");
-
return -1;
-
}
-
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
-
/* Start the dump */
-
if(pcap_live_dump(fp, argv[1], atoi(argv[2]), atoi(argv[3]))==-1){
-
printf("Unable to start the dump, %s\n", pcap_geterr(fp));
-
return -1;
-
}
-
}
-
else{
-
-
/* Open the device */
-
if ( (fp= pcap_open_live(argv[1], 100, 1, 20, errbuf) ) == NULL)
-
{
-
fprintf(stderr,"\nError opening adapter\n");
-
return -1;
-
}
-
-
/* Start the dump */
-
if(pcap_live_dump(fp, argv[0], atoi(argv[1]), atoi(argv[2]))==-1){
-
printf("Unable to start the dump, %s\n", pcap_geterr(fp));
-
return -1;
-
}
-
}
-
-
/* Wait until the dump finishes, i.e. when max_size or max_packs is reached*/
- -
-
/* Close the adapter, so that the file is correctly flushed */
- -
-
return 0;
-
}
-

The difference between pcap_live_dump() and pcap_dump(), apart from the possibility to set limits, is performance. pcap_live_dump() exploits the ability of the WinPcap NPF driver (see NPF driver internals manual) to write dumps from kernel level, minimizing the number of context switches and memory copies.

-

Obviously, since this feature is currently not available on other operating systems, pcap_live_dump() is WinPcap specific and is present only under Win32.

-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut8.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut8.html deleted file mode 100644 index d3eac918..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut8.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - -WinPcap: Sending Packets - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
- -
-

Although the name WinPcap indicates clearly that the purpose of the library is packet capture, other useful features for raw networking are provided. Among them, the user can find a complete set of functions to send packets.

-

Note that the original libpcap library at the moment doesn't provide any way to send packets, therefore all the functions shown here are WinPcap extensions and will not work under Unix.

-

Sending a single packet with pcap_sendpacket()

-

The simplest way to send a packet is shown in the following code snippet. After opening an adapter, pcap_sendpacket() is called to send a hand-crafted packet. pcap_sendpacket() takes as arguments a buffer containing the data to send, the length of the buffer and the adapter that will send it. Notice that the buffer is sent to the net as is, without any manipulation. This means that the application has to create the correct protocol headers in order to send something meaningful.

-
#include <stdlib.h>
-
#include <stdio.h>
-
-
#include <pcap.h>
-
-
-
void main(int argc, char **argv)
-
{
-
pcap_t *fp;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
u_char packet[100];
-
int i;
-
-
/* Check the validity of the command line */
-
if (argc != 2)
-
{
-
printf("usage: %s interface (e.g. 'rpcap://eth0')", argv[0]);
-
return;
-
}
-
-
/* Open the output device */
-
if ( (fp= pcap_open(argv[1], // name of the device
-
100, // portion of the packet to capture (only the first 100 bytes)
-
PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
-
1000, // read timeout
-
NULL, // authentication on the remote machine
-
errbuf // error buffer
-
) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]);
-
return;
-
}
-
-
/* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */
-
packet[0]=1;
-
packet[1]=1;
-
packet[2]=1;
-
packet[3]=1;
-
packet[4]=1;
-
packet[5]=1;
-
-
/* set mac source to 2:2:2:2:2:2 */
-
packet[6]=2;
-
packet[7]=2;
-
packet[8]=2;
-
packet[9]=2;
-
packet[10]=2;
-
packet[11]=2;
-
-
/* Fill the rest of the packet */
-
for(i=12;i<100;i++)
-
{
-
packet[i]=(u_char)i;
-
}
-
-
/* Send down the packet */
-
if (pcap_sendpacket(fp, packet, 100 /* size */) != 0)
-
{
-
fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp));
-
return;
-
}
-
-
return;
-
}
-

Send queues

-

While pcap_sendpacket() offers a simple and immediate way to send a single packet, send queues provides an advanced, powerful and optimized mechanism to send a collection of packets. A send queue is a container for a variable number of packets that will be sent to the network. It has a size, that represents the maximum amount of bytes it can store.

-

A send queue is created calling the pcap_sendqueue_alloc() function, specifying the size of the new send queue.

-

Once the send queue is created, pcap_sendqueue_queue() can be used to add a packet to the send queue. This function takes a pcap_pkthdr with the timestamp and the length and a buffer with the data of the packet. These parameters are the same as those received by pcap_next_ex() and pcap_handler(), therefore queuing a packet that was just captured or read from a file is a matter of passing these parameters to pcap_sendqueue_queue().

-

To transmit a send queue, WinPcap provides the pcap_sendqueue_transmit() function. Note the third parameter: if nonzero, the send will be synchronized, i.e. the relative timestamps of the packets will be respected. This operation requires a remarkable amount of CPU, because the synchronization takes place in the kernel driver using "busy wait" loops. Although this operation is quite CPU intensive, it often results in very high precision packet transmissions (often around few microseconds or less).

-

Note that transmitting a send queue with pcap_sendqueue_transmit() is much more efficient than performing a series of pcap_sendpacket(), because the send queue is buffered at kernel level drastically decreasing the number of context switches.

-

When a queue is no longer needed, it can be deleted with pcap_sendqueue_destroy() that frees all the buffers associated with the send queue.

-

The next program shows how to use send queues. It opens a capture file with pcap_open_offline(), then it moves the packets from the file to a properly allocated send queue. At his point it transmits the queue, synchronizing it if requested by the user.

-

Note that the link-layer of the dumpfile is compared with the one of the interface that will send the packets using pcap_datalink(), and a warning is printed if they are different – it is important that the capture-file link-layer be the same as the adapter's link layer for otherwise the tranmission is pointless.

-
/*
-
* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
-
* All rights reserved.
-
*
-
* Redistribution and use in source and binary forms, with or without
-
* modification, are permitted provided that the following conditions
-
* are met:
-
*
-
* 1. Redistributions of source code must retain the above copyright
-
* notice, this list of conditions and the following disclaimer.
-
* 2. Redistributions in binary form must reproduce the above copyright
-
* notice, this list of conditions and the following disclaimer in the
-
* documentation and/or other materials provided with the distribution.
-
* 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.
-
*
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
*
-
*/
-
-
#include <stdlib.h>
-
#include <stdio.h>
-
-
#include <pcap.h>
-
-
void usage();
-
-
void main(int argc, char **argv)
-
{
-
pcap_t *indesc,*outdesc;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
char source[PCAP_BUF_SIZE];
-
FILE *capfile;
-
int caplen, sync;
-
u_int res;
-
pcap_send_queue *squeue;
-
struct pcap_pkthdr *pktheader;
-
u_char *pktdata;
-
float cpu_time;
-
u_int npacks = 0;
-
errno_t fopen_error;
-
-
/* Check the validity of the command line */
-
if (argc <= 2 || argc >= 5)
-
{
-
usage();
-
return;
-
}
-
-
/* Retrieve the length of the capture file */
-
fopen_error = fopen_s(&capfile, argv[1],"rb");
-
if(fopen_error != 0){
-
printf("Error opening the file, errno %d.\n", fopen_error);
-
return;
-
}
-
-
fseek(capfile , 0, SEEK_END);
-
caplen= ftell(capfile)- sizeof(struct pcap_file_header);
-
fclose(capfile);
-
-
/* Chek if the timestamps must be respected */
-
if(argc == 4 && argv[3][0] == 's')
-
sync = TRUE;
-
else
-
sync = FALSE;
-
-
/* Open the capture */
-
/* Create the source string according to the new WinPcap syntax */
-
if ( pcap_createsrcstr( source, // variable that will keep the source string
-
PCAP_SRC_FILE, // we want to open a file
-
NULL, // remote host
-
NULL, // port on the remote host
-
argv[1], // name of the file we want to open
-
errbuf // error buffer
-
) != 0)
-
{
-
fprintf(stderr,"\nError creating a source string\n");
-
return;
-
}
-
-
/* Open the capture file */
-
if ( (indesc= pcap_open(source, 65536, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the file %s.\n", source);
-
return;
-
}
-
-
/* Open the output adapter */
-
if ( (outdesc= pcap_open(argv[2], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open adapter %s.\n", source);
-
return;
-
}
-
-
/* Check the MAC type */
-
if (pcap_datalink(indesc) != pcap_datalink(outdesc))
-
{
-
printf("Warning: the datalink of the capture differs from the one of the selected interface.\n");
-
printf("Press a key to continue, or CTRL+C to stop.\n");
-
getchar();
-
}
-
-
/* Allocate a send queue */
-
squeue = pcap_sendqueue_alloc(caplen);
-
-
/* Fill the queue with the packets from the file */
-
while ((res = pcap_next_ex( indesc, &pktheader, &pktdata)) == 1)
-
{
-
if (pcap_sendqueue_queue(squeue, pktheader, pktdata) == -1)
-
{
-
printf("Warning: packet buffer too small, not all the packets will be sent.\n");
-
break;
-
}
-
-
npacks++;
-
}
-
-
if (res == -1)
-
{
-
printf("Corrupted input file.\n");
- -
return;
-
}
-
-
/* Transmit the queue */
-
-
cpu_time = (float)clock ();
-
-
if ((res = pcap_sendqueue_transmit(outdesc, squeue, sync)) < squeue->len)
-
{
-
printf("An error occurred sending the packets: %s. Only %d bytes were sent\n", pcap_geterr(outdesc), res);
-
}
-
-
cpu_time = (clock() - cpu_time)/CLK_TCK;
-
-
printf ("\n\nElapsed time: %5.3f\n", cpu_time);
-
printf ("\nTotal packets generated = %d", npacks);
-
printf ("\nAverage packets per second = %d", (int)((double)npacks/cpu_time));
-
printf ("\n");
-
-
/* free the send queue */
- -
-
/* Close the input file */
-
pcap_close(indesc);
-
-
/*
-
* lose the output adapter
-
* IMPORTANT: remember to close the adapter, otherwise there will be no guarantee that all the
-
* packets will be sent!
-
*/
-
pcap_close(outdesc);
-
-
-
return;
-
}
-
-
-
void usage()
-
{
-
-
printf("\nSendcap, sends a libpcap/tcpdump capture file to the net. Copyright (C) 2002 Loris Degioanni.\n");
-
printf("\nUsage:\n");
-
printf("\t sendcap file_name adapter [s]\n");
-
printf("\nParameters:\n");
-
printf("\nfile_name: the name of the dump file that will be sent to the network\n");
-
printf("\nadapter: the device to use. Use \"WinDump -D\" for a list of valid devices\n");
-
printf("\ns: if present, forces the packets to be sent synchronously, i.e. respecting the timestamps in the dump file. This option will work only under Windows NTx.\n\n");
-
-
exit(0);
-
}
-

<<< Previous Next >>>

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut9.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut9.html deleted file mode 100644 index 4ee85531..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcap__tut9.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - -WinPcap: Gathering Statistics on the network traffic - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
- -
-
-

This lesson shows another advanced feature of WinPcap: the ability to collect statistics about network traffic. The statistical engine makes use of the kernel-level packet filter to efficiently classify the incoming packet. You can take a look at the NPF driver internals manual if you want to know more details.

-

In order to use this feature, the programmer must open an adapter and put it in statistical mode. This can be done with pcap_setmode(). In particular, MODE_STAT must be used as the mode argument of this function.

-

With statistical mode, making an application that monitors the TCP traffic load is a matter of few lines of code. The following sample shows how to do it.

-
/*
-
* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
-
* All rights reserved.
-
*
-
* Redistribution and use in source and binary forms, with or without
-
* modification, are permitted provided that the following conditions
-
* are met:
-
*
-
* 1. Redistributions of source code must retain the above copyright
-
* notice, this list of conditions and the following disclaimer.
-
* 2. Redistributions in binary form must reproduce the above copyright
-
* notice, this list of conditions and the following disclaimer in the
-
* documentation and/or other materials provided with the distribution.
-
* 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.
-
*
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
*
-
*/
-
-
#include <stdlib.h>
-
#include <stdio.h>
-
-
#include <pcap.h>
-
-
void usage();
-
-
void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *);
-
-
-
void main(int argc, char **argv)
-
{
-
pcap_t *fp;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
struct timeval st_ts;
-
u_int netmask;
-
struct bpf_program fcode;
-
-
/* Check the validity of the command line */
-
if (argc != 2)
-
{
-
usage();
-
return;
-
}
-
-
/* Open the output adapter */
-
if ( (fp= pcap_open(argv[1], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open adapter %s.\n", errbuf);
-
return;
-
}
-
-
/* Don't care about netmask, it won't be used for this filter */
-
netmask=0xffffff;
-
-
//compile the filter
-
if (pcap_compile(fp, &fcode, "tcp", 1, netmask) <0 )
-
{
-
fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n");
-
/* Free the device list */
-
return;
-
}
-
-
//set the filter
-
if (pcap_setfilter(fp, &fcode)<0)
-
{
-
fprintf(stderr,"\nError setting the filter.\n");
- -
/* Free the device list */
-
return;
-
}
-
-
/* Put the interface in statstics mode */
-
if (pcap_setmode(fp, MODE_STAT)<0)
-
{
-
fprintf(stderr,"\nError setting the mode.\n");
- -
/* Free the device list */
-
return;
-
}
-
-
-
printf("TCP traffic summary:\n");
-
-
/* Start the main loop */
-
pcap_loop(fp, 0, dispatcher_handler, (PUCHAR)&st_ts);
-
- -
return;
-
}
-
-
void dispatcher_handler(u_char *state, const struct pcap_pkthdr *header, const u_char *pkt_data)
-
{
-
struct timeval *old_ts = (struct timeval *)state;
-
u_int delay;
-
LARGE_INTEGER Bps,Pps;
-
struct tm ltime;
-
char timestr[16];
-
time_t local_tv_sec;
-
-
/* Calculate the delay in microseconds from the last sample. */
-
/* This value is obtained from the timestamp that the associated with the sample. */
-
delay=(header->ts.tv_sec - old_ts->tv_sec) * 1000000 - old_ts->tv_usec + header->ts.tv_usec;
-
/* Get the number of Bits per second */
-
Bps.QuadPart=(((*(LONGLONG*)(pkt_data + 8)) * 8 * 1000000) / (delay));
-
/* ^ ^
-
| |
-
| |
-
| |
-
converts bytes in bits -- |
-
|
-
delay is expressed in microseconds --
-
*/
-
-
/* Get the number of Packets per second */
-
Pps.QuadPart=(((*(LONGLONG*)(pkt_data)) * 1000000) / (delay));
-
-
/* Convert the timestamp to readable format */
-
local_tv_sec = header->ts.tv_sec;
-
localtime_s(&ltime, &local_tv_sec);
-
strftime( timestr, sizeof timestr, "%H:%M:%S", &ltime);
-
-
/* Print timestamp*/
-
printf("%s ", timestr);
-
-
/* Print the samples */
-
printf("BPS=%I64u ", Bps.QuadPart);
-
printf("PPS=%I64u\n", Pps.QuadPart);
-
-
//store current timestamp
-
old_ts->tv_sec=header->ts.tv_sec;
-
old_ts->tv_usec=header->ts.tv_usec;
-
}
-
-
-
void usage()
-
{
-
-
printf("\nShows the TCP traffic load, in bits per second and packets per second.\nCopyright (C) 2002 Loris Degioanni.\n");
-
printf("\nUsage:\n");
-
printf("\t tcptop adapter\n");
-
printf("\t You can use \"WinDump -D\" if you don't know the name of your adapters.\n");
-
-
exit(0);
-
}
-

Before enabling statistical mode, the user has the option to set a filter that defines the subset of network traffic that will be monitored. See the paragraph on the Filtering expression syntax for details. If no filter has been set, all of the traffic will be monitored.

-

Once

- -

the interface descriptor starts to work in statistical mode. Notice the fourth parameter (to_ms) of pcap_open(): it defines the interval among the statistical samples. The callback function receives the samples calculated by the driver every to_ms milliseconds. These samples are encapsulated in the second and third parameters of the callback function, as shown in the following figure:

-
-stats_wpcap.gif -
-

Two 64-bit counters are provided: the number of packets and the amount of bytes received during the last interval.

-

In the example, the adapter is opened with a timeout of 1000 ms. This means that dispatcher_handler() is called once per second. At this point a filter that keeps only tcp packets is compiled and set. Then pcap_setmode() and pcap_loop() are called. Note that a struct timeval pointer is passed to pcap_loop() as the user parameter. This structure will be used to store a timestamp in order to calculate the interval between two samples. dispatcher_handler()uses this interval to obtain the bits per second and the packets per second and then prints these values on the screen.

-

Note finally that this example is by far more efficient than a program that captures the packets in the traditional way and calculates statistics at user-level. Statistical mode requires the minumum amount of data copies and context switches and therefore the CPU is optimized. Moreover, a very small amount of memory is required.

-

<<< Previous

-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcapfunc.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcapfunc.html deleted file mode 100644 index fe34200d..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcapfunc.html +++ /dev/null @@ -1,2427 +0,0 @@ - - - - - - -WinPcap: Exported functions - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Exported functions
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Unix-compatible Functions

These functions are part of the libpcap library, and therefore work both on Windows and on Linux.

Note
errbuf in pcap_open_live(), pcap_open_dead(), pcap_open_offline(), pcap_setnonblock(), pcap_getnonblock(), pcap_findalldevs(), pcap_lookupdev(), and pcap_lookupnet() is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.
-
typedef void(* pcap_handler )(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Prototype of the callback function that receives the packets. More...
 
pcap_tpcap_open_live (const char *device, int snaplen, int promisc, int to_ms, char *ebuf)
 Open a live capture from the network. More...
 
pcap_tpcap_open_dead (int linktype, int snaplen)
 Create a pcap_t structure without starting a capture. More...
 
pcap_tpcap_open_offline (const char *fname, char *errbuf)
 Open a savefile in the tcpdump/libpcap format to read packets. More...
 
pcap_dumper_tpcap_dump_open (pcap_t *p, const char *fname)
 Open a file to write packets. More...
 
int pcap_setnonblock (pcap_t *p, int nonblock, char *errbuf)
 Switch between blocking and nonblocking mode. More...
 
int pcap_getnonblock (pcap_t *p, char *errbuf)
 Get the "non-blocking" state of an interface. More...
 
int pcap_findalldevs (pcap_if_t **alldevsp, char *errbuf)
 Construct a list of network devices that can be opened with pcap_open_live(). More...
 
void pcap_freealldevs (pcap_if_t *alldevsp)
 Free an interface list returned by pcap_findalldevs(). More...
 
char * pcap_lookupdev (char *errbuf)
 Return the first valid device in the system. More...
 
int pcap_lookupnet (const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf)
 Return the subnet and netmask of an interface. More...
 
int pcap_dispatch (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets. More...
 
int pcap_loop (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets. More...
 
u_char * pcap_next (pcap_t *p, struct pcap_pkthdr *h)
 Return the next available packet. More...
 
int pcap_next_ex (pcap_t *p, struct pcap_pkthdr **pkt_header, const u_char **pkt_data)
 Read a packet from an interface or from an offline capture. More...
 
void pcap_breakloop (pcap_t *)
 set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping. More...
 
int pcap_sendpacket (pcap_t *p, u_char *buf, int size)
 Send a raw packet. More...
 
void pcap_dump (u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
 Save a packet to disk. More...
 
long pcap_dump_ftell (pcap_dumper_t *)
 Return the file position for a "savefile". More...
 
int pcap_compile (pcap_t *p, struct bpf_program *fp, char *str, int optimize, bpf_u_int32 netmask)
 Compile a packet filter, converting an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine. More...
 
int pcap_compile_nopcap (int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask)
 Compile a packet filter without the need of opening an adapter. This function converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine. More...
 
int pcap_setfilter (pcap_t *p, struct bpf_program *fp)
 Associate a filter to a capture. More...
 
void pcap_freecode (struct bpf_program *fp)
 Free a filter. More...
 
int pcap_datalink (pcap_t *p)
 Return the link layer of an adapter. More...
 
int pcap_list_datalinks (pcap_t *p, int **dlt_buf)
 list datalinks More...
 
int pcap_set_datalink (pcap_t *p, int dlt)
 Set the current data link type of the pcap descriptor to the type specified by dlt. -1 is returned on failure. More...
 
int pcap_datalink_name_to_val (const char *name)
 Translates a data link type name, which is a DLT_ name with the DLT_ removed, to the corresponding data link type value. The translation is case-insensitive. -1 is returned on failure. More...
 
const char * pcap_datalink_val_to_name (int dlt)
 Translates a data link type value to the corresponding data link type name. NULL is returned on failure. More...
 
const char * pcap_datalink_val_to_description (int dlt)
 Translates a data link type value to a short description of that data link type. NULL is returned on failure. More...
 
int pcap_snapshot (pcap_t *p)
 Return the dimension of the packet portion (in bytes) that is delivered to the application. More...
 
int pcap_is_swapped (pcap_t *p)
 returns true if the current savefile uses a different byte order than the current system. More...
 
int pcap_major_version (pcap_t *p)
 return the major version number of the pcap library used to write the savefile. More...
 
int pcap_minor_version (pcap_t *p)
 return the minor version number of the pcap library used to write the savefile. More...
 
FILE * pcap_file (pcap_t *p)
 Return the standard stream of an offline capture. More...
 
int pcap_stats (pcap_t *p, struct pcap_stat *ps)
 Return statistics on current capture. More...
 
void pcap_perror (pcap_t *p, char *prefix)
 print the text of the last pcap library error on stderr, prefixed by prefix. More...
 
char * pcap_geterr (pcap_t *p)
 return the error text pertaining to the last pcap library error. More...
 
char * pcap_strerror (int error)
 Provided in case strerror() isn't available. More...
 
const char * pcap_lib_version (void)
 Returns a pointer to a string giving information about the version of the libpcap library being used; note that it contains more information than just a version number. More...
 
void pcap_close (pcap_t *p)
 close the files associated with p and deallocates resources. More...
 
FILE * pcap_dump_file (pcap_dumper_t *p)
 return the standard I/O stream of the 'savefile' opened by pcap_dump_open(). More...
 
int pcap_dump_flush (pcap_dumper_t *p)
 Flushes the output buffer to the savefile,'' so that any packets written with pcap_dump() but not yet written to thesavefile'' will be written. -1 is returned on error, 0 on success. More...
 
void pcap_dump_close (pcap_dumper_t *p)
 Closes a savefile. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Windows-specific Extensions

The functions in this section extend libpcap to offer advanced functionalities (like remote packet capture, packet buffer size variation or high-precision packet injection). Howerver, at the moment they can be used only in Windows.

-
PAirpcapHandle pcap_get_airpcap_handle (pcap_t *p)
 Returns the AirPcap handler associated with an adapter. This handler can be used to change the wireless-related settings of the CACE Technologies AirPcap wireless capture adapters. More...
 
int pcap_offline_filter (struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
 Returns if a given filter applies to an offline packet. More...
 
int pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
 Save a capture to file. More...
 
int pcap_live_dump_ended (pcap_t *p, int sync)
 Return the status of the kernel dump process, i.e. tells if one of the limits defined with pcap_live_dump() has been reached. More...
 
struct pcap_statpcap_stats_ex (pcap_t *p, int *pcap_stat_size)
 Return statistics on current capture. More...
 
int pcap_setbuff (pcap_t *p, int dim)
 Set the size of the kernel buffer associated with an adapter. More...
 
int pcap_setmode (pcap_t *p, int mode)
 Set the working mode of the interface p to mode. More...
 
int pcap_setmintocopy (pcap_t *p, int size)
 Set the minumum amount of data received by the kernel in a single call. More...
 
HANDLE pcap_getevent (pcap_t *p)
 Return the handle of the event associated with the interface p. More...
 
pcap_send_queuepcap_sendqueue_alloc (u_int memsize)
 Allocate a send queue. More...
 
void pcap_sendqueue_destroy (pcap_send_queue *queue)
 Destroy a send queue. More...
 
int pcap_sendqueue_queue (pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Add a packet to a send queue. More...
 
u_int pcap_sendqueue_transmit (pcap_t *p, pcap_send_queue *queue, int sync)
 Send a queue of raw packets to the network. More...
 
int pcap_findalldevs_ex (char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
 Create a list of network devices that can be opened with pcap_open(). More...
 
int pcap_createsrcstr (char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
 Accept a set of strings (host name, port, ...), and it returns the complete source string according to the new format (e.g. 'rpcap://1.2.3.4/eth0'). More...
 
int pcap_parsesrcstr (const char *source, int *type, char *host, char *port, char *name, char *errbuf)
 Parse the source string and returns the pieces in which the source can be split. More...
 
pcap_tpcap_open (const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
 Open a generic source in order to capture / send (WinPcap only) traffic. More...
 
struct pcap_samp * pcap_setsampling (pcap_t *p)
 Define a sampling method for packet capture. More...
 
SOCKET pcap_remoteact_accept (const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
 Block until a network connection is accepted (active mode only). More...
 
int pcap_remoteact_close (const char *host, char *errbuf)
 Drop an active connection (active mode only). More...
 
void pcap_remoteact_cleanup ()
 Clean the socket that is currently used in waiting active connections. More...
 
int pcap_remoteact_list (char *hostlist, char sep, int size, char *errbuf)
 Return the hostname of the host that have an active connection with us (active mode only). More...
 
-

Detailed Description

-

Functions exported by wpcap.dll

-

Typedef Documentation

- -
-
- - - - -
typedef void(* pcap_handler)(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
-
- -

Prototype of the callback function that receives the packets.

-

When pcap_dispatch() or pcap_loop() are called by the user, the packets are passed to the application by means of this callback. user is a user-defined parameter that contains the state of the capture session, it corresponds to the user parameter of pcap_dispatch() and pcap_loop(). pkt_header is the header associated by the capture driver to the packet. It is NOT a protocol header. pkt_data points to the data of the packet, including the protocol headers.

- -

Definition at line 27 of file funcs/pcap.h.

- -
-
-

Function Documentation

- -
-
- - - - - - - - -
void pcap_breakloop (pcap_t)
-
- -

set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping.

-

They will return the number of packets that have been processed so far, or -2 if no packets have been processed so far. This routine is safe to use inside a signal handler on UNIX or a console control handler on Windows, as it merely sets a flag that is checked within the loop. The flag is checked in loops reading packets from the OS - a signal by itself will not necessarily terminate those loops - as well as in loops processing a set of packets returned by the OS. Note that if you are catching signals on UNIX systems that support restarting system calls after a signal, and calling pcap_breakloop() in the signal handler, you must specify, when catching those signals, that system calls should NOT be restarted by that signal. Otherwise, if the signal interrupted a call reading packets in a live capture, when your signal handler returns after calling pcap_breakloop(), the call will be restarted, and the loop will not terminate until more packets arrive and the call completes.

Note
pcap_next() will, on some platforms, loop reading packets from the OS; that loop will not necessarily be terminated by a signal, so pcap_breakloop() should be used to terminate packet processing even if pcap_next() is being used. pcap_breakloop() does not guarantee that no further packets will be processed by pcap_dispatch() or pcap_loop() after it is called; at most one more packet might be processed. If -2 is returned from pcap_dispatch() or pcap_loop(), the flag is cleared, so a subsequent call will resume reading packets. If a positive number is returned, the flag is not cleared, so a subsequent call will return -2 and clear the flag.
- -
-
- -
-
- - - - - - - - -
void pcap_close (pcap_tp)
-
- -

close the files associated with p and deallocates resources.

-
See also
pcap_open_live(), pcap_open_offline(), pcap_open_dead()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_compile (pcap_tp,
struct bpf_program * fp,
char * str,
int optimize,
bpf_u_int32 netmask 
)
-
- -

Compile a packet filter, converting an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.

-

pcap_compile() is used to compile the string str into a filter program. program is a pointer to a bpf_program struct and is filled in by pcap_compile(). optimize controls whether optimization on the resulting code is performed. netmask specifies the IPv4 netmask of the network on which packets are being captured; it is used only when checking for IPv4 broadcast addresses in the filter program. If the netmask of the network on which packets are being captured isn't known to the program, or if packets are being captured on the Linux "any" pseudo-interface that can capture on more than one network, a value of 0 can be supplied; tests for IPv4 broadcast addreses won't be done correctly, but all other tests in the filter program will be OK. A return of -1 indicates an error in which case pcap_geterr() may be used to display the error text.

-
See also
pcap_open_live(), pcap_setfilter(), pcap_freecode(), pcap_snapshot()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_compile_nopcap (int snaplen_arg,
int linktype_arg,
struct bpf_program * program,
char * buf,
int optimize,
bpf_u_int32 mask 
)
-
- -

Compile a packet filter without the need of opening an adapter. This function converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.

-

pcap_compile_nopcap() is similar to pcap_compile() except that instead of passing a pcap structure, one passes the snaplen and linktype explicitly. It is intended to be used for compiling filters for direct BPF usage, without necessarily having called pcap_open(). A return of -1 indicates an error; the error text is unavailable. (pcap_compile_nopcap() is a wrapper around pcap_open_dead(), pcap_compile(), and pcap_close(); the latter three routines can be used directly in order to get the error text for a compilation error.)

-

Look at the Filtering expression syntax section for details on the str parameter.

-
See also
pcap_open_live(), pcap_setfilter(), pcap_freecode(), pcap_snapshot()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_createsrcstr (char * source,
int type,
const char * host,
const char * port,
const char * name,
char * errbuf 
)
-
- -

Accept a set of strings (host name, port, ...), and it returns the complete source string according to the new format (e.g. 'rpcap://1.2.3.4/eth0').

-

This function is provided in order to help the user creating the source string according to the new format. An unique source string is used in order to make easy for old applications to use the remote facilities. Think about tcpdump, for example, which has only one way to specify the interface on which the capture has to be started. However, GUI-based programs can find more useful to specify hostname, port and interface name separately. In that case, they can use this function to create the source string before passing it to the pcap_open() function.

-
Parameters
- - - - - - - -
sourcea user-allocated buffer that will contain the complete source string wen the function returns.
- The source will start with an identifier according to the new Source Specification Syntax .
- This function assumes that the allocated buffer is at least PCAP_BUF_SIZE bytes.
typeits value tells the type of the source we want to create. It can assume the values defined in the Source identification Codes .
-
hostan user-allocated buffer that keeps the host (e.g. "foo.bar.com") we want to connect to. It can be NULL in case we want to open an interface on a local host.
portan user-allocated buffer that keeps the network port (e.g. "2002") we want to use for the RPCAP protocol. It can be NULL in case we want to open an interface on a local host.
namean user-allocated buffer that keeps the interface name we want to use (e.g. "eth0"). It can be NULL in case the return string (i.e. 'source') has to be used with the pcap_findalldevs_ex(), which does not require the interface name.
errbufa pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns
'0' if everything is fine, '-1' if some errors occurred. The string containing the complete source is returned in the 'source' variable.
-
Warning
If the source is longer than PCAP_BUF_SIZE, the excess characters are truncated.
- -
-
- -
-
- - - - - - - - -
int pcap_datalink (pcap_tp)
-
- -

Return the link layer of an adapter.

-

returns the link layer type; link layer types it can return include:

- DLT_NULL BSD loopback encapsulation; the link layer header is a 4-byte field, in host byte order, containing a PF_ value from socket.h for the network-layer protocol of the packet. 
-    Note that ``host byte order'' is the byte order of the machine on which the packets are captured, and the PF_ values are for the OS of the machine on which the packets are captured; if a live capture is being done, ``host byte order'' is the byte order of the machine capturing the packets, and the PF_ values are those of the OS of the machine capturing the packets, but if a ``savefile'' is being read, the byte order and PF_ values are not necessarily those of the machine reading the capture file. 
-- DLT_EN10MB Ethernet (10Mb, 100Mb, 1000Mb, and up) 
-- DLT_IEEE802: IEEE 802.5 Token Ring 
-- DLT_ARCNET: ARCNET 
-- DLT_SLIP: SLIP; the link layer header contains, in order:
-        -# a 1-byte flag, which is 0 for packets received by the machine and 1 for packets sent by the machine;
-        -# a 1-byte field, the upper 4 bits of which indicate the type of packet, as per RFC 1144:
-            - 0x40: an unmodified IP datagram (TYPE_IP); 
-            - 0x70: an uncompressed-TCP IP datagram (UNCOMPRESSED_TCP), with that byte being the first byte of the raw IP header on the wire, containing the connection number in the protocol field; 
-            - 0x80: a compressed-TCP IP datagram (COMPRESSED_TCP), with that byte being the first byte of the compressed TCP/IP datagram header; 
-        -# for UNCOMPRESSED_TCP, the rest of the modified IP header, and for COMPRESSED_TCP, the compressed TCP/IP datagram header; 
-        -# for a total of 16 bytes; the uncompressed IP datagram follows the header. 
-
-- DLT_PPP: PPP; if the first 2 bytes are 0xff and 0x03, it's PPP in HDLC-like framing, with the PPP header following those two bytes, otherwise it's PPP without framing, and the packet begins with the PPP header. 
-- DLT_FDDI: FDDI 
-- DLT_ATM_RFC1483: RFC 1483 LLC/SNAP-encapsulated ATM; the packet begins with an IEEE 802.2 LLC header. 
-- DLT_RAW: raw IP; the packet begins with an IP header. 
-- DLT_PPP_SERIAL: PPP in HDLC-like framing, as per RFC 1662, or Cisco PPP with HDLC framing, as per section 4.3.1 of RFC 1547; the first byte will be 0xFF for PPP in HDLC-like framing, and will be 0x0F or 0x8F for Cisco PPP with HDLC framing. 
-- DLT_PPP_ETHER: PPPoE; the packet begins with a PPPoE header, as per RFC 2516. 
-- DLT_C_HDLC: Cisco PPP with HDLC framing, as per section 4.3.1 of RFC 1547. 
-- DLT_IEEE802_11: IEEE 802.11 wireless LAN 
-- DLT_FRELAY: Frame Relay 
-- DLT_LOOP: OpenBSD loopback encapsulation; the link layer header is a 4-byte field, in network byte order, containing a PF_ value from OpenBSD's socket.h for the network-layer protocol of the packet. 
-    Note that, if a ``savefile'' is being read, those PF_ values are not necessarily those of the machine reading the capture file. 
-- DLT_LINUX_SLL: Linux "cooked" capture encapsulation; the link layer header contains, in order:
-    - a 2-byte "packet type", in network byte order, which is one of:
-        -# packet was sent to us by somebody else 
-        -# packet was broadcast by somebody else 
-        -# packet was multicast, but not broadcast, by somebody else 
-        -# packet was sent by somebody else to somebody else 
-        -# packet was sent by us 
-    - a 2-byte field, in network byte order, containing a Linux ARPHRD_ value for the link layer device type;
-    - a 2-byte field, in network byte order, containing the length of the link layer address of the sender of the packet (which could be 0);
-    - an 8-byte field containing that number of bytes of the link layer header (if there are more than 8 bytes, only the first 8 are present);
-    - 2-byte field containing an Ethernet protocol type, in network byte order, or containing 1 for Novell 802.3 frames without an 802.2 LLC header or 4 for frames beginning with an 802.2 LLC header. 
-- DLT_LTALK: Apple LocalTalk; the packet begins with an AppleTalk LLAP header. 
-- DLT_PFLOG: OpenBSD pflog; the link layer header contains, in order:
-    - a 4-byte PF_ value, in network byte order;
-    - a 16-character interface name;
-    - a 2-byte rule number, in network byte order;
-    - a 2-byte reason code, in network byte order, which is one of:
-        -# match 
-        -# bad offset 
-        -# fragment 
-        -# short 
-        -# normalize 
-        -# memory
-    -a 2-byte action code, in network byte order, which is one of:
-        -# passed 
-        -# dropped 
-        -# scrubbed 
-    - a 2-byte direction, in network byte order, which is one of:
-        -# incoming or outgoing 
-        -# incoming 
-        -# outgoing 
-- DLT_PRISM_HEADER: Prism monitor mode information followed by an 802.11 header. 
-- DLT_IP_OVER_FC: RFC 2625 IP-over-Fibre Channel, with the link-layer header being the Network_Header as described in that RFC. 
-- DLT_SUNATM: SunATM devices; the link layer header contains, in order:
-    - a 1-byte flag field, containing a direction flag in the uppermost bit, which is set for packets transmitted by the machine and clear for packets received by the machine, and a 4-byte traffic type in the low-order 4 bits, which is one of:
-        -# raw traffic 
-        -# LANE traffic 
-        -# LLC-encapsulated traffic 
-        -# MARS traffic 
-        -# IFMP traffic 
-        -# ILMI traffic 
-        -# Q.2931 traffic 
-    - a 1-byte VPI value;
-    - a 2-byte VCI field, in network byte order. 
-- DLT_IEEE802_11_RADIO: link-layer information followed by an 802.11 header - see http://www.radiotap.org/ for a description of the link-layer information. 
-- DLT_ARCNET_LINUX: ARCNET, with no exception frames, reassembled packets rather than raw frames, and an extra 16-bit offset field between the destination host and type bytes. 
-- DLT_LINUX_IRDA: Linux-IrDA packets, with a DLT_LINUX_SLL header followed by the IrLAP header. 
-
See also
pcap_list_datalinks(), pcap_set_datalink(), pcap_datalink_name_to_val()
- -
-
- -
-
- - - - - - - - -
int pcap_datalink_name_to_val (const char * name)
-
- -

Translates a data link type name, which is a DLT_ name with the DLT_ removed, to the corresponding data link type value. The translation is case-insensitive. -1 is returned on failure.

- -
-
- -
-
- - - - - - - - -
const char* pcap_datalink_val_to_description (int dlt)
-
- -

Translates a data link type value to a short description of that data link type. NULL is returned on failure.

- -
-
- -
-
- - - - - - - - -
const char* pcap_datalink_val_to_name (int dlt)
-
- -

Translates a data link type value to the corresponding data link type name. NULL is returned on failure.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_dispatch (pcap_tp,
int cnt,
pcap_handler callback,
u_char * user 
)
-
- -

Collect a group of packets.

-

pcap_dispatch() is used to collect and process packets. cnt specifies the maximum number of packets to process before returning. This is not a minimum number; when reading a live capture, only one bufferful of packets is read at a time, so fewer than cnt packets may be processed. A cnt of -1 processes all the packets received in one buffer when reading a live capture, or all the packets in the file when reading a ``savefile''. callback specifies a routine to be called with three arguments: a u_char pointer which is passed in from pcap_dispatch(), a const struct pcap_pkthdr pointer, and a const u_char pointer to the first caplen (as given in the struct pcap_pkthdr a pointer to which is passed to the callback routine) bytes of data from the packet (which won't necessarily be the entire packet; to capture the entire packet, you will have to provide a value for snaplen in your call to pcap_open_live() that is sufficiently large to get all of the packet's data - a value of 65535 should be sufficient on most if not all networks).

-

The number of packets read is returned. 0 is returned if no packets were read from a live capture (if, for example, they were discarded because they didn't pass the packet filter, or if, on platforms that support a read timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read) or if no more packets are available in a ``savefile.'' A return of -1 indicates an error in which case pcap_perror() or pcap_geterr() may be used to display the error text. A return of -2 indicates that the loop terminated due to a call to pcap_breakloop() before any packets were processed. If your application uses pcap_breakloop(), make sure that you explicitly check for -1 and -2, rather than just checking for a return value < 0.

-
Note
when reading a live capture, pcap_dispatch() will not necessarily return when the read times out; on some platforms, the read timeout isn't supported, and, on other platforms, the timer doesn't start until at least one packet arrives. This means that the read timeout should NOT be used in, for example, an interactive application, to allow the packet capture loop to ``poll'' for user input periodically, as there's no guarantee that pcap_dispatch() will return after the timeout expires.
-
See also
pcap_loop(), pcap_next(), pcap_open_live(), pcap_open_offline(), pcap_handler
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void pcap_dump (u_char * user,
const struct pcap_pkthdrh,
const u_char * sp 
)
-
- -

Save a packet to disk.

-

pcap_dump() outputs a packet to the "savefile" opened with pcap_dump_open(). Note that its calling arguments are suitable for use with pcap_dispatch() or pcap_loop(). If called directly, the user parameter is of type pcap_dumper_t as returned by pcap_dump_open().

-
See also
pcap_dump_open(), pcap_dump_close(), pcap_dispatch(), pcap_loop()
- -
-
- -
-
- - - - - - - - -
void pcap_dump_close (pcap_dumper_tp)
-
- -

Closes a savefile.

-
See also
pcap_dump_open(), pcap_dump()
- -
-
- -
-
- - - - - - - - -
FILE* pcap_dump_file (pcap_dumper_tp)
-
- -

return the standard I/O stream of the 'savefile' opened by pcap_dump_open().

- -
-
- -
-
- - - - - - - - -
int pcap_dump_flush (pcap_dumper_tp)
-
- -

Flushes the output buffer to the savefile,'' so that any packets written with pcap_dump() but not yet written to thesavefile'' will be written. -1 is returned on error, 0 on success.

- -
-
- -
-
- - - - - - - - -
long pcap_dump_ftell (pcap_dumper_t)
-
- -

Return the file position for a "savefile".

-

pcap_dump_ftell() returns the current file position for the "savefile", representing the number of bytes written by pcap_dump_open() and pcap_dump() . -1 is returned on error.

-
See also
pcap_dump_open(), pcap_dump()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
pcap_dumper_t* pcap_dump_open (pcap_tp,
const char * fname 
)
-
- -

Open a file to write packets.

-

pcap_dump_open() is called to open a "savefile" for writing. The name "-" in a synonym for stdout. NULL is returned on failure. p is a pcap struct as returned by pcap_open_offline() or pcap_open_live(). fname specifies the name of the file to open. Alternatively, you may call pcap_dump_fopen() to write data to an existing open stream fp. Note that on Windows, that stream should be opened in binary mode. If NULL is returned, pcap_geterr() can be used to get the error text.

-
See also
pcap_dump_close(), pcap_dump()
- -
-
- -
-
- - - - - - - - -
FILE* pcap_file (pcap_tp)
-
- -

Return the standard stream of an offline capture.

-

pcap_file() returns the standard I/O stream of the "savefile", if a "savefile" was opened with pcap_open_offline(), or NULL, if a network device was opened with pcap_open_live().

Deprecated:
Due to incompatibilities between the C Runtime (CRT) used to compile WinPcap and the one used by WinPcap-based applications, this function may return an invalid FILE pointer, i.e. a descriptor that causes all the standard I/O stream functions (ftell, fseek, fclose...) to fail. The function is still available for backwards binary compatibility, only.
-
See also
pcap_open_offline(), pcap_open_live()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_findalldevs (pcap_if_t ** alldevsp,
char * errbuf 
)
-
- -

Construct a list of network devices that can be opened with pcap_open_live().

-
Note
that there may be network devices that cannot be opened with pcap_open_live() by the process calling pcap_findalldevs(), because, for example, that process might not have sufficient privileges to open them for capturing; if so, those devices will not appear on the list.) alldevsp is set to point to the first element of the list; each element of the list is of type pcap_if_t,
-

-1 is returned on failure, in which case errbuf is filled in with an appropriate error message; 0 is returned on success.

-
See also
struct pcap_if, pcap_freealldevs(), pcap_open_live(), pcap_lookupdev(), pcap_lookupnet()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_findalldevs_ex (char * source,
struct pcap_rmtauth * auth,
pcap_if_t ** alldevs,
char * errbuf 
)
-
- -

Create a list of network devices that can be opened with pcap_open().

-

This function is a superset of the old 'pcap_findalldevs()', which allows listing only the devices present on the local machine. Vice versa, pcap_findalldevs_ex() allows listing the devices present on a remote machine as well. Additionally, it can list all the pcap files available into a given folder. Moreover, pcap_findalldevs_ex() is platform independent, since it relies on the standard pcap_findalldevs() to get addresses on the local machine.

-

In case the function has to list the interfaces on a remote machine, it opens a new control connection toward that machine, it retrieves the interfaces, and it drops the connection. However, if this function detects that the remote machine is in 'active' mode, the connection is not dropped and the existing socket is used.

-

The 'source' is a parameter that tells the function where the lookup has to be done and it uses the same syntax of the pcap_open().

-

Differently from the pcap_findalldevs(), the interface names (pointed by the alldevs->name and the other ones in the linked list) are already ready to be used in the pcap_open() call. Vice versa, the output that comes from pcap_findalldevs() must be formatted with the new pcap_createsrcstr() before passing the source identifier to the pcap_open().

-
Parameters
- - - - - -
sourcea char* buffer that keeps the 'source localtion', according to the new WinPcap syntax. This source will be examined looking for adapters (local or remote) (e.g. source can be 'rpcap://' for local adapters or 'rpcap://host:port' for adapters on a remote host) or pcap files (e.g. source can be 'file://c:/myfolder/').
- The strings that must be prepended to the 'source' in order to define if we want local/remote adapters or files is defined in the new Source Specification Syntax .
autha pointer to a pcap_rmtauth structure. This pointer keeps the information required to authenticate the RPCAP connection to the remote host. This parameter is not meaningful in case of a query to the local host: in that case it can be NULL.
alldevsa 'struct pcap_if_t' pointer, which will be properly allocated inside this function. When the function returns, it is set to point to the first element of the interface list; each element of the list is of type 'struct pcap_if_t'.
errbufa pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns
'0' if everything is fine, '-1' if some errors occurred. The list of the devices is returned in the 'alldevs' variable. When the function returns correctly, 'alldevs' cannot be NULL. In other words, this function returns '-1' also in case the system does not have any interface to list.
-

The error message is returned in the 'errbuf' variable. An error could be due to several reasons:

    -
  • libpcap/WinPcap was not installed on the local/remote host
  • -
  • the user does not have enough privileges to list the devices / files
  • -
  • a network problem
  • -
  • the RPCAP version negotiation failed
  • -
  • other errors (not enough memory and others).
  • -
-
Warning
There may be network devices that cannot be opened with pcap_open() by the process calling pcap_findalldevs(), because, for example, that process might not have sufficient privileges to open them for capturing; if so, those devices will not appear on the list.
-
-The interface list must be deallocated manually by using the pcap_freealldevs().
- -
-
- -
-
- - - - - - - - -
void pcap_freealldevs (pcap_if_talldevsp)
-
- -

Free an interface list returned by pcap_findalldevs().

-

pcap_freealldevs() is used to free a list allocated by pcap_findalldevs().

-
See also
pcap_findalldevs()
- -
-
- -
-
- - - - - - - - -
void pcap_freecode (struct bpf_program * fp)
-
- -

Free a filter.

-

pcap_freecode() is used to free up allocated memory pointed to by a bpf_program struct generated by pcap_compile() when that BPF program is no longer needed, for example after it has been made the filter program for a pcap structure by a call to pcap_setfilter().

-
See also
pcap_compile(), pcap_compile_nopcap()
- -
-
- -
-
- - - - - - - - -
PAirpcapHandle pcap_get_airpcap_handle (pcap_tp)
-
- -

Returns the AirPcap handler associated with an adapter. This handler can be used to change the wireless-related settings of the CACE Technologies AirPcap wireless capture adapters.

-
Note
THIS FUNCTION SHOULD BE CONSIDERED PROVISIONAL, AND MAY BE REPLACED IN THE FUTURE BY A MORE COMPLETE SET OF FUNCTIONS FOR WIRELESS SUPPORT.
-

pcap_get_airpcap_handle() allows to obtain the airpcap handle of an open adapter. This handle can be used with the AirPcap API functions to perform wireless-releated operations, e.g. changing the channel or enabling WEP decryption. For more details about the AirPcap wireless capture adapters, see http://www.cacetech.com/products/airpcap.html

-
Parameters
- - -
phandle to an open libpcap adapter
-
-
-
Returns
a pointer to an open AirPcap handle, used internally by the libpcap open adapter. NULL if the libpcap adapter doesn't have wireless support through AirPcap.
- -
-
- -
-
- - - - - - - - -
char* pcap_geterr (pcap_tp)
-
- -

return the error text pertaining to the last pcap library error.

-
Note
the pointer Return will no longer point to a valid error message string after the pcap_t passed to it is closed; you must use or copy the string before closing the pcap_t.
-
See also
pcap_perror()
- -
-
- -
-
- - - - - - - - -
HANDLE pcap_getevent (pcap_tp)
-
- -

Return the handle of the event associated with the interface p.

-

This event can be passed to functions like WaitForSingleObject() or WaitForMultipleObjects() to wait until the driver's buffer contains some data without performing a read.

-

We disourage the use of this function because it is not portable.

-
See also
pcap_open_live()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_getnonblock (pcap_tp,
char * errbuf 
)
-
- -

Get the "non-blocking" state of an interface.

-

pcap_getnonblock() returns the current "non-blocking" state of the capture descriptor; it always returns 0 on "savefiles". If there is an error, -1 is returned and errbuf is filled in with an appropriate error message.

-
See also
pcap_setnonblock()
- -
-
- -
-
- - - - - - - - -
int pcap_is_swapped (pcap_tp)
-
- -

returns true if the current savefile uses a different byte order than the current system.

- -
-
- -
-
- - - - - - - - -
const char* pcap_lib_version (void )
-
- -

Returns a pointer to a string giving information about the version of the libpcap library being used; note that it contains more information than just a version number.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_list_datalinks (pcap_tp,
int ** dlt_buf 
)
-
- -

list datalinks

-

pcap_list_datalinks() is used to get a list of the supported data link types of the interface associated with the pcap descriptor. pcap_list_datalinks() allocates an array to hold the list and sets *dlt_buf. The caller is responsible for freeing the array. -1 is returned on failure; otherwise, the number of data link types in the array is returned.

-
See also
pcap_datalink(), pcap_set_datalink(), pcap_datalink_name_to_val()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_live_dump (pcap_tp,
char * filename,
int maxsize,
int maxpacks 
)
-
- -

Save a capture to file.

-
Note
: this function does not work in current version of WinPcap.
-

pcap_live_dump() dumps the network traffic from an interface to a file. Using this function the dump is performed at kernel level, therefore it is more efficient than using pcap_dump().

-

The parameters of this function are an interface descriptor (obtained with pcap_open_live()), a string with the name of the dump file, the maximum size of the file (in bytes) and the maximum number of packets that the file will contain. Setting maxsize or maxpacks to 0 means no limit. When maxsize or maxpacks are reached, the dump ends.

-

pcap_live_dump() is non-blocking, threfore Return immediately. pcap_live_dump_ended() can be used to check the status of the dump process or to wait until it is finished. pcap_close() can instead be used to end the dump process.

-

Note that when one of the two limits is reached, the dump is stopped, but the file remains opened. In order to correctly flush the data and put the file in a consistent state, the adapter must be closed with pcap_close().

-
See also
pcap_live_dump_ended(), pcap_open_live(), pcap_close(), pcap_dump_open(), pcap_dump()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_live_dump_ended (pcap_tp,
int sync 
)
-
- -

Return the status of the kernel dump process, i.e. tells if one of the limits defined with pcap_live_dump() has been reached.

-
Note
: this function does not work in current version of WinPcap.
-

pcap_live_dump_ended() informs the user about the limits that were set with a previous call to pcap_live_dump() on the interface pointed by p: if the return value is nonzero, one of the limits has been reched and the dump process is currently stopped.

-

If sync is nonzero, the function blocks until the dump is finished, otherwise Return immediately.

-
Warning
if the dump process has no limits (i.e. if the maxsize and maxpacks arguments of pcap_live_dump() were both 0), the dump process will never stop, therefore setting sync to TRUE will block the application on this call forever.
-
See also
pcap_live_dump()
- -
-
- -
-
- - - - - - - - -
char* pcap_lookupdev (char * errbuf)
-
- -

Return the first valid device in the system.

-
Deprecated:
Use pcap_findalldevs() or pcap_findalldevs_ex() instead.
-
   pcap_lookupdev() returns a pointer  to  a  network  device
-   suitable  for  use  with pcap_open_live() and pcap_lookupnet().
-   If there is an error, NULL is returned and  errbuf
-   is filled in with an appropriate error message.
-
See also
pcap_findalldevs(), pcap_open_live()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_lookupnet (const char * device,
bpf_u_int32netp,
bpf_u_int32maskp,
char * errbuf 
)
-
- -

Return the subnet and netmask of an interface.

-
Deprecated:
Use pcap_findalldevs() or pcap_findalldevs_ex() instead.
-
   pcap_lookupnet()  is  used to determine the network number
-   and mask associated with the network device device.   Both
-   netp  and  maskp are bpf_u_int32 pointers.  A return of -1
-   indicates an error in which case errbuf is filled in  with
-   an appropriate error message.
-
See also
pcap_findalldevs()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_loop (pcap_tp,
int cnt,
pcap_handler callback,
u_char * user 
)
-
- -

Collect a group of packets.

-

pcap_loop() is similar to pcap_dispatch() except it keeps reading packets until cnt packets are processed or an error occurs. It does not return when live read timeouts occur. Rather, specifying a non-zero read timeout to pcap_open_live() and then calling pcap_dispatch() allows the reception and processing of any packets that arrive when the timeout occurs. A negative cnt causes pcap_loop() to loop forever (or at least until an error occurs). -1 is returned on an error; 0 is returned if cnt is exhausted; -2 is returned if the loop terminated due to a call to pcap_breakloop() before any packets were processed. If your application uses pcap_breakloop(), make sure that you explicitly check for -1 and -2, rather than just checking for a return value < 0.

-
See also
pcap_dispatch(), pcap_next(), pcap_open_live(), pcap_open_offline(), pcap_handler
- -
-
- -
-
- - - - - - - - -
int pcap_major_version (pcap_tp)
-
- -

return the major version number of the pcap library used to write the savefile.

-
See also
pcap_minor_version()
- -
-
- -
-
- - - - - - - - -
int pcap_minor_version (pcap_tp)
-
- -

return the minor version number of the pcap library used to write the savefile.

-
See also
pcap_major_version()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
u_char* pcap_next (pcap_tp,
struct pcap_pkthdrh 
)
-
- -

Return the next available packet.

-

pcap_next() reads the next packet (by calling pcap_dispatch() with a cnt of 1) and returns a u_char pointer to the data in that packet. (The pcap_pkthdr struct for that packet is not supplied.) NULL is returned if an error occured, or if no packets were read from a live capture (if, for example, they were discarded because they didn't pass the packet filter, or if, on platforms that support a read timeout that starts before any packets arrive, the timeout expires before any packets arrive, or if the file descriptor for the capture device is in non-blocking mode and no packets were available to be read), or if no more packets are available in a ``savefile.'' Unfortunately, there is no way to determine whether an error occured or not.

See also
pcap_dispatch(), pcap_loop()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_next_ex (pcap_tp,
struct pcap_pkthdr ** pkt_header,
const u_char ** pkt_data 
)
-
- -

Read a packet from an interface or from an offline capture.

-

This function is used to retrieve the next available packet, bypassing the callback method traditionally provided by libpcap.

-

pcap_next_ex fills the pkt_header and pkt_data parameters (see pcap_handler()) with the pointers to the header and to the data of the next captured packet.

-

The return value can be:

    -
  • 1 if the packet has been read without problems
  • -
  • 0 if the timeout set with pcap_open_live() has elapsed. In this case pkt_header and pkt_data don't point to a valid packet
  • -
  • -1 if an error occurred
  • -
  • -2 if EOF was reached reading from an offline capture
  • -
-
See also
pcap_open_live(), pcap_loop(), pcap_dispatch(), pcap_handler()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_offline_filter (struct bpf_program * prog,
const struct pcap_pkthdrheader,
const u_char * pkt_data 
)
-
- -

Returns if a given filter applies to an offline packet.

-

This function is used to apply a filter to a packet that is currently in memory. This process does not need to open an adapter; we need just to create the proper filter (by settings parameters like the snapshot length, or the link-layer type) by means of the pcap_compile_nopcap().

-

The current API of libpcap does not allow to receive a packet and to filter the packet after it has been received. However, this can be useful in case you want to filter packets in the application, instead of into the receiving process. This function allows you to do the job.

-
Parameters
- - - - -
progbpf program (created with the pcap_compile_nopcap() )
headerheader of the packet that has to be filtered
pkt_databuffer containing the packet, in network-byte order.
-
-
-
Returns
the length of the bytes that are currently available into the packet if the packet satisfies the filter, 0 otherwise.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open (const char * source,
int snaplen,
int flags,
int read_timeout,
struct pcap_rmtauth * auth,
char * errbuf 
)
-
- -

Open a generic source in order to capture / send (WinPcap only) traffic.

-

The pcap_open() replaces all the pcap_open_xxx() functions with a single call.

-

This function hides the differences between the different pcap_open_xxx() functions so that the programmer does not have to manage different opening function. In this way, the 'true' open function is decided according to the source type, which is included into the source string (in the form of source prefix).

-

This function can rely on the pcap_createsrcstr() to create the string that keeps the capture device according to the new syntax, and the pcap_parsesrcstr() for the other way round.

-
Parameters
- - - - - - - -
sourcezero-terminated string containing the source name to open. The source name has to include the format prefix according to the new Source Specification Syntax and it cannot be NULL.
- On on Linux systems with 2.2 or later kernels, a device argument of "any" (i.e. rpcap://any) can be used to capture packets from all interfaces.
- In order to makes the source syntax easier, please remember that: -
snaplenlength of the packet that has to be retained. For each packet received by the filter, only the first 'snaplen' bytes are stored in the buffer and passed to the user application. For instance, snaplen equal to 100 means that only the first 100 bytes of each packet are stored.
flagskeeps several flags that can be needed for capturing packets. The allowed flags are defined in the pcap_open() flags .
read_timeoutread timeout in milliseconds. The read timeout is used to arrange that the read not necessarily return immediately when a packet is seen, but that it waits for some amount of time to allow more packets to arrive and to read multiple packets from the OS kernel in one operation. Not all platforms support a read timeout; on platforms that don't, the read timeout is ignored.
autha pointer to a 'struct pcap_rmtauth' that keeps the information required to authenticate the user on a remote machine. In case this is not a remote capture, this pointer can be set to NULL.
errbufa pointer to a user-allocated buffer which will contain the error in case this function fails. The pcap_open() and findalldevs() are the only two functions which have this parameter, since they do not have (yet) a pointer to a pcap_t structure, which reserves space for the error string. Since these functions do not have (yet) a pcap_t pointer (the pcap_t pointer is NULL in case of errors), they need an explicit 'errbuf' variable. 'errbuf' may also be set to warning text when pcap_open_live() succeds; to detect this case the caller should store a zero-length string in 'errbuf' before calling pcap_open_live() and display the warning to the user if 'errbuf' is no longer a zero-length string.
-
-
-
Returns
A pointer to a 'pcap_t' which can be used as a parameter to the following calls (pcap_compile() and so on) and that specifies an opened WinPcap session. In case of problems, it returns NULL and the 'errbuf' variable keeps the error message.
-
Warning
The source cannot be larger than PCAP_BUF_SIZE.
-
-The following formats are not allowed as 'source' strings:
    -
  • rpcap:// [to open the first local adapter]
  • -
  • rpcap://hostname/ [to open the first remote adapter]
  • -
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open_dead (int linktype,
int snaplen 
)
-
- -

Create a pcap_t structure without starting a capture.

-

pcap_open_dead() is used for creating a pcap_t structure to use when calling the other functions in libpcap. It is typically used when just using libpcap for compiling BPF code.

-
See also
pcap_open_offline(), pcap_open_live(), pcap_findalldevs(), pcap_compile(), pcap_setfilter(), pcap_close()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open_live (const char * device,
int snaplen,
int promisc,
int to_ms,
char * ebuf 
)
-
- -

Open a live capture from the network.

-

pcap_open_live() is used to obtain a packet capture descriptor to look at packets on the network. device is a string that specifies the network device to open; on Linux systems with 2.2 or later kernels, a device argument of "any" or NULL can be used to capture packets from all interfaces. snaplen specifies the maximum number of bytes to capture. If this value is less than the size of a packet that is captured, only the first snaplen bytes of that packet will be captured and provided as packet data. A value of 65535 should be sufficient, on most if not all networks, to capture all the data available from the packet. promisc specifies if the interface is to be put into promiscuous mode. (Note that even if this parameter is false, the interface could well be in promiscuous mode for some other reason.) For now, this doesn't work on the "any" device; if an argument of "any" or NULL is supplied, the promisc flag is ignored. to_ms specifies the read timeout in milliseconds. The read timeout is used to arrange that the read not necessarily return immediately when a packet is seen, but that it wait for some amount of time to allow more packets to arrive and to read multiple packets from the OS kernel in one operation. Not all platforms support a read timeout; on platforms that don't, the read timeout is ignored. A zero value for to_ms, on platforms that support a read timeout, will cause a read to wait forever to allow enough packets to arrive, with no timeout. errbuf is used to return error or warning text. It will be set to error text when pcap_open_live() fails and returns NULL. errbuf may also be set to warning text when pcap_open_live() succeds; to detect this case the caller should store a zero-length string in errbuf before calling pcap_open_live() and display the warning to the user if errbuf is no longer a zero-length string.

-
See also
pcap_open_offline(), pcap_open_dead(), pcap_findalldevs(), pcap_close()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
pcap_t* pcap_open_offline (const char * fname,
char * errbuf 
)
-
- -

Open a savefile in the tcpdump/libpcap format to read packets.

-

pcap_open_offline() is called to open a "savefile" for reading. fname specifies the name of the file to open. The file has the same format as those used by tcpdump(1) and tcpslice(1). The name "-" in a synonym for stdin. Alternatively, you may call pcap_fopen_offline() to read dumped data from an existing open stream fp. Note that on Windows, that stream should be opened in binary mode. errbuf is used to return error text and is only set when pcap_open_offline() or pcap_fopen_offline() fails and returns NULL.

-
See also
pcap_open_live(), pcap_dump_open(), pcap_findalldevs(), pcap_close()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_parsesrcstr (const char * source,
int * type,
char * host,
char * port,
char * name,
char * errbuf 
)
-
- -

Parse the source string and returns the pieces in which the source can be split.

-

This call is the other way round of pcap_createsrcstr(). It accepts a null-terminated string and it returns the parameters related to the source. This includes:

    -
  • the type of the source (file, winpcap on a remote adapter, winpcap on local adapter), which is determined by the source prefix (PCAP_SRC_IF_STRING and so on)
  • -
  • the host on which the capture has to be started (only for remote captures)
  • -
  • the 'raw' name of the source (file name, name of the remote adapter, name of the local adapter), without the source prefix. The string returned does not include the type of the source itself (i.e. the string returned does not include "file://" or rpcap:// or such).
  • -
-

The user can omit some parameters in case it is not interested in them.

-
Parameters
- - - - - - - -
sourcea null-terminated string containing the WinPcap source. This source starts with an identifier according to the new Source Specification Syntax .
typepointer to an integer, which is used to return the code corrisponding to the selected source. The code will be one defined in the Source identification Codes .
- In case the source string does not exists (i.e. 'source == NULL') or it is empty ('*source == NULL'), it returns PCAP_SRC_IF_LOCAL (i.e. you are ready to call pcap_open_live() ). This behavior is kept only for compatibility with older applications (e.g. tcpdump); therefore we suggest to move to the new syntax for sources.
- This parameter can be NULL in case the user is not interested in that.
hostuser-allocated buffer (of size PCAP_BUF_SIZE) that is used to return the host name on which the capture has to be started. This value is meaningful only in case of remote capture; otherwise, the returned string will be empty (""). This parameter can be NULL in case the user is not interested in that.
portuser-allocated buffer (of size PCAP_BUF_SIZE) that is used to return the port that has to be used by the RPCAP protocol to contact the other host. This value is meaningful only in case of remote capture and if the user wants to use a non-standard port; otherwise, the returned string will be empty (""). In case of remote capture, an emply string means "use the standard RPCAP port". This parameter can be NULL in case the user is not interested in that.
nameuser-allocated buffer (of size PCAP_BUF_SIZE) that is used to return the source name, without the source prefix. If the name does not exist (for example because source contains 'rpcap://' that means 'default local adapter'), it returns NULL. This parameter can be NULL in case the user is not interested in that.
errbufpointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one). This parameter can be NULL in case the user is not interested in that.
-
-
-
Returns
'0' if everything is fine, '-1' if some errors occurred. The requested values (host name, network port, type of the source) are returned into the proper variables passed by reference.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void pcap_perror (pcap_tp,
char * prefix 
)
-
- -

print the text of the last pcap library error on stderr, prefixed by prefix.

-
See also
pcap_geterr()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SOCKET pcap_remoteact_accept (const char * address,
const char * port,
const char * hostlist,
char * connectinghost,
struct pcap_rmtauth * auth,
char * errbuf 
)
-
- -

Block until a network connection is accepted (active mode only).

-

This function has been defined to allow the client dealing with the 'active mode'. In other words, in the 'active mode' the server opens the connection toward the client, so that the client has to open a socket in order to wait for connections. When a new connection is accepted, the RPCAP protocol starts as usual; the only difference is that the connection is initiated by the server.

-

This function accepts only ONE connection, then it closes the waiting socket. This means that if some error occurs, the application has to call it again in order to accept another connection.

-

This function returns when a new connection (coming from a valid host 'connectinghost') is accepted; it returns error otherwise.

-
Parameters
- - - - - - - -
addressa string that keeps the network address we have to bind to; usually it is NULL (it means 'bind on all local addresses').
porta string that keeps the network port on which we have to bind to; usually it is NULL (it means 'bind on the predefined port', i.e. RPCAP_DEFAULT_NETPORT_ACTIVE).
hostlista string that keeps the host name of the host from whom we are expecting a connection; it can be NULL (it means 'accept connection from everyone'). Host names are separated by a whatever character in the RPCAP_HOSTLIST_SEP list.
connectinghosta user-allocated buffer that will contain the name of the host is trying to connect to us. This variable must be at least RPCAP_HOSTLIST_SIZE bytes..
autha pointer to a pcap_rmtauth structure. This pointer keeps the information required to authenticate the RPCAP connection to the remote host.
errbufa pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns
The SOCKET identifier of the new control connection if everything is fine, a negative number if some errors occurred. The error message is returned into the errbuf variable. In case it returns '-1', this means 'everything is fine', but the host cannot be admitted. In case it returns '-2', in means 'unrecoverable error' (for example it is not able to bind the socket, or something like that). In case it returns '-3', it means 'authentication failed'. The authentication check is performed only if the connecting host is among the ones that are allowed to connect to this host.
-

The host that is connecting to us is returned into the hostlist variable, which ust be allocated by the user. This variable contains the host name both in case the host is allowed, and in case the connection is refused.

-
Warning
Although this function returns the socket established by the new control connection, this value should not be used. This value will be stored into some libpcap internal variables and it will be managed automatically by the library. In other words, all the following calls to findalldevs() and pcap_open() will check if the host is among one that already has a control connection in place; if so, that one will be used.
-
-This function has several problems if used inside a thread, which is stopped when this call is blocked into the accept(). In this case, the socket on which we accept connections is not freed (thread termination is a very dirty job), so that we are no longer able to accept other connections until the program (i.e. the process) stops. In order to solve the problem, call the pcap_remoteact_cleanup().
- -
-
- -
-
- - - - - - - -
void pcap_remoteact_cleanup ()
-
- -

Clean the socket that is currently used in waiting active connections.

-

This function does a very dirty job. The fact is that is the waiting socket is not freed if the pcap_remoteaccept() is killed inside a new thread. This function is able to clean the socket in order to allow the next calls to pcap_remoteact_accept() to work.

-

This function is useful only if you launch pcap_remoteact_accept() inside a new thread, and you stops (not very gracefully) the thread (for example because the user changed idea, and it does no longer want to wait for an active connection). So, basically, the flow should be the following:

-

This function has no effects in other cases.

-
Returns
None.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_remoteact_close (const char * host,
char * errbuf 
)
-
- -

Drop an active connection (active mode only).

-

This function has been defined to allow the client dealing with the 'active mode'. This function closes an active connection that is still in place and it purges the host name from the 'activeHost' list. From this point on, the client will not have any connection with that host in place.

-
Parameters
- - - -
hosta string that keeps the host name of the host for which we want to close the active connection.
errbufa pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns
'0' if everything is fine, '-1' if some errors occurred. The error message is returned into the errbuf variable.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_remoteact_list (char * hostlist,
char sep,
int size,
char * errbuf 
)
-
- -

Return the hostname of the host that have an active connection with us (active mode only).

-

This function has been defined to allow the client dealing with the 'active mode'. This function returns the list of hosts that are currently having an active connection with us. This function is useful in order to delete an active connection that is still in place.

-
Parameters
- - - - - -
hostlista user-allocated string that will keep the list of host that are currently connected with us.
septhe character that has to be sued as a separator between the hosts (',' for example).
sizesize of the hostlist buffer.
errbufa pointer to a user-allocated buffer (of size PCAP_ERRBUF_SIZE) that will contain the error message (in case there is one).
-
-
-
Returns
'0' if everything is fine, '-1' if some errors occurred. The error message is returned into the errbuf variable.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_sendpacket (pcap_tp,
u_char * buf,
int size 
)
-
- -

Send a raw packet.

-

This function allows to send a raw packet to the network. p is the interface that will be used to send the packet, buf contains the data of the packet to send (including the various protocol headers), size is the dimension of the buffer pointed by buf, i.e. the size of the packet to send. The MAC CRC doesn't need to be included, because it is transparently calculated and added by the network interface driver. The return value is 0 if the packet is succesfully sent, -1 otherwise.

-
See also
pcap_open_live()
- -
-
- -
-
- - - - - - - - -
pcap_send_queue* pcap_sendqueue_alloc (u_int memsize)
-
- -

Allocate a send queue.

-

This function allocates a send queue, i.e. a buffer containing a set of raw packets that will be transimtted on the network with pcap_sendqueue_transmit().

-

memsize is the size, in bytes, of the queue, therefore it determines the maximum amount of data that the queue will contain.

-

Use pcap_sendqueue_queue() to insert packets in the queue.

-
See also
pcap_sendqueue_queue(), pcap_sendqueue_transmit(), pcap_sendqueue_destroy()
- -
-
- -
-
- - - - - - - - -
void pcap_sendqueue_destroy (pcap_send_queuequeue)
-
- -

Destroy a send queue.

-

Deletes a send queue and frees all the memory associated with it.

-
See also
pcap_sendqueue_alloc(), pcap_sendqueue_queue(), pcap_sendqueue_transmit()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_sendqueue_queue (pcap_send_queuequeue,
const struct pcap_pkthdrpkt_header,
const u_char * pkt_data 
)
-
- -

Add a packet to a send queue.

-

pcap_sendqueue_queue() adds a packet at the end of the send queue pointed by the queue parameter. pkt_header points to a pcap_pkthdr structure with the timestamp and the length of the packet, pkt_data points to a buffer with the data of the packet.

-

The pcap_pkthdr structure is the same used by WinPcap and libpcap to store the packets in a file, therefore sending a capture file is straightforward. 'Raw packet' means that the sending application will have to include the protocol headers, since every packet is sent to the network 'as is'. The CRC of the packets needs not to be calculated, because it will be transparently added by the network interface.

-
See also
pcap_sendqueue_alloc(), pcap_sendqueue_transmit(), pcap_sendqueue_destroy()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
u_int pcap_sendqueue_transmit (pcap_tp,
pcap_send_queuequeue,
int sync 
)
-
- -

Send a queue of raw packets to the network.

-

This function transmits the content of a queue to the wire. p is a pointer to the adapter on which the packets will be sent, queue points to a pcap_send_queue structure containing the packets to send (see pcap_sendqueue_alloc() and pcap_sendqueue_queue()), sync determines if the send operation must be synchronized: if it is non-zero, the packets are sent respecting the timestamps, otherwise they are sent as fast as possible.

-

The return value is the amount of bytes actually sent. If it is smaller than the size parameter, an error occurred during the send. The error can be caused by a driver/adapter problem or by an inconsistent/bogus send queue.

-
Note
Using this function is more efficient than issuing a series of pcap_sendpacket(), because the packets are buffered in the kernel driver, so the number of context switches is reduced. Therefore, expect a better throughput when using pcap_sendqueue_transmit.
-
-When Sync is set to TRUE, the packets are synchronized in the kernel with a high precision timestamp. This requires a non-negligible amount of CPU, but allows normally to send the packets with a precision of some microseconds (depending on the accuracy of the performance counter of the machine). Such a precision cannot be reached sending the packets with pcap_sendpacket().
-
See also
pcap_sendqueue_alloc(), pcap_sendqueue_queue(), pcap_sendqueue_destroy()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_set_datalink (pcap_tp,
int dlt 
)
-
- -

Set the current data link type of the pcap descriptor to the type specified by dlt. -1 is returned on failure.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setbuff (pcap_tp,
int dim 
)
-
- -

Set the size of the kernel buffer associated with an adapter.

-

dim specifies the size of the buffer in bytes. The return value is 0 when the call succeeds, -1 otherwise. If an old buffer was already created with a previous call to pcap_setbuff(), it is deleted and its content is discarded. pcap_open_live() creates a 1 MByte buffer by default.

-
See also
pcap_open_live(), pcap_loop(), pcap_dispatch()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setfilter (pcap_tp,
struct bpf_program * fp 
)
-
- -

Associate a filter to a capture.

-

pcap_setfilter() is used to specify a filter program. fp is a pointer to a bpf_program struct, usually the result of a call to pcap_compile(). -1 is returned on failure, in which case pcap_geterr() may be used to display the error text; 0 is returned on success.

-
See also
pcap_compile(), pcap_compile_nopcap()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setmintocopy (pcap_tp,
int size 
)
-
- -

Set the minumum amount of data received by the kernel in a single call.

-

pcap_setmintocopy() changes the minimum amount of data in the kernel buffer that causes a read from the application to return (unless the timeout expires). If the value of size is large, the kernel is forced to wait the arrival of several packets before copying the data to the user. This guarantees a low number of system calls, i.e. low processor usage, and is a good setting for applications like packet-sniffers and protocol analyzers. Vice versa, in presence of a small value for this variable, the kernel will copy the packets as soon as the application is ready to receive them. This is useful for real time applications that need the best responsiveness from the kernel. pcap_open_live() sets a default mintocopy value of 16000 bytes.

-
See also
pcap_open_live(), pcap_loop(), pcap_dispatch()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setmode (pcap_tp,
int mode 
)
-
- -

Set the working mode of the interface p to mode.

-

Valid values for mode are MODE_CAPT (default capture mode) and MODE_STAT (statistical mode). See the tutorial "\ref wpcap_tut9" for details about statistical mode.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_setnonblock (pcap_tp,
int nonblock,
char * errbuf 
)
-
- -

Switch between blocking and nonblocking mode.

-

pcap_setnonblock() puts a capture descriptor, opened with pcap_open_live(), into "non-blocking" mode, or takes it out of "non-blocking" mode, depending on whether the nonblock argument is non-zero or zero. It has no effect on "savefiles". If there is an error, -1 is returned and errbuf is filled in with an appropriate error message; otherwise, 0 is returned. In "non-blocking" mode, an attempt to read from the capture descriptor with pcap_dispatch() will, if no packets are currently available to be read, return 0 immediately rather than blocking waiting for packets to arrive. pcap_loop() and pcap_next() will not work in "non-blocking" mode.

-
See also
pcap_getnonblock(), pcap_dispatch()
- -
-
- -
-
- - - - - - - - -
struct pcap_samp* pcap_setsampling (pcap_tp)
-
- -

Define a sampling method for packet capture.

-

This function allows applying a sampling method to the packet capture process. The currently sampling methods (and the way to set them) are described into the struct pcap_samp. In other words, the user must set the appropriate parameters into it; these will be applied as soon as the capture starts.

-
Warning
Sampling parameters cannot be changed when a capture is active. These parameters must be applied before starting the capture. If they are applied when the capture is in progress, the new settings are ignored.
-
-Sampling works only when capturing data on Win32 or reading from a file. It has not been implemented on other platforms. Sampling works on remote machines provided that the probe (i.e. the capturing device) is a Win32 workstation.
- -
-
- -
-
- - - - - - - - -
int pcap_snapshot (pcap_tp)
-
- -

Return the dimension of the packet portion (in bytes) that is delivered to the application.

-

pcap_snapshot() returns the snapshot length specified when pcap_open_live was called.

-
See also
pcap_open_live(), pcap_compile(), pcap_compile_nopcap()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_stats (pcap_tp,
struct pcap_statps 
)
-
- -

Return statistics on current capture.

-

pcap_stats() returns 0 and fills in a pcap_stat struct. The values represent packet statistics from the start of the run to the time of the call. If there is an error or the underlying packet capture doesn't support packet statistics, -1 is returned and the error text can be obtained with pcap_perror() or pcap_geterr(). pcap_stats() is supported only on live captures, not on "savefiles"; no statistics are stored in "savefiles", so no statistics are available when reading from a "savefile".

-
See also
pcap_stats_ex(), pcap_open_live()
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct pcap_stat* pcap_stats_ex (pcap_tp,
int * pcap_stat_size 
)
-
- -

Return statistics on current capture.

-

pcap_stats_ex() extends the pcap_stats() allowing to return more statistical parameters than the old call. One of the advantages of this new call is that the pcap_stat structure is not allocated by the user; instead, it is returned back by the system. This allow to extend the pcap_stat structure without affecting backward compatibility on older applications. These will simply check at the values of the members at the beginning of the structure, while only newest applications are able to read new statistical values, which are appended in tail.

-

To be sure not to read a piece of mamory which has not been allocated by the system, the variable pcap_stat_size will return back the size of the structure pcap_stat allocated by the system.

-
Parameters
- - - -
ppointer to the pcap_t currently in use.
pcap_stat_sizepointer to an integer that will contain (when the function returns back) the size of the structure pcap_stat as it has been allocated by the system.
-
-
-
Returns
: a pointer to a pcap_stat structure, that will contain the statistics related to the current device. The return value is NULL in case of errors, and the error text can be obtained with pcap_perror() or pcap_geterr().
-
Warning
pcap_stats_ex() is supported only on live captures, not on "savefiles"; no statistics are stored in "savefiles", so no statistics are available when reading from a "savefile".
-
See also
pcap_stats()
- -
-
- -
-
- - - - - - - - -
char* pcap_strerror (int error)
-
- -

Provided in case strerror() isn't available.

-
See also
pcap_perror(), pcap_geterr()
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/group__wpcapsamps.html b/libs/WinPcap-413-173-b4/docs/html/group__wpcapsamps.html deleted file mode 100644 index 575e531c..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/group__wpcapsamps.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - - -WinPcap: Using WinPcap in your programs - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Using WinPcap in your programs
-
-
- - - - - - - - - - -

Creating an application that uses wpcap.dll

-

To create an application that uses wpcap.dll with Microsoft Visual C++, -follow these -steps:

-
    -
  • Include the file pcap.h at the beginning of every source file that - uses the functions exported by library.
  • -
  • If your program uses Win32 specific functions of WinPcap, remember to include WPCAP - among the preprocessor definitions.
  • -
  • If your program uses the remote capture capabilities of WinPcap, add - HAVE_REMOTE among the preprocessor definitions. Do not include - remote-ext.h directly in your source files.
  • Set the options of the linker to include the wpcap.lib library - file specific for your target (x86 or x64). wpcap.lib for x86 can be - found in the \lib folder of the WinPcap developer's - pack, wpcap.lib for x64 can - be found in the \lib\x64 folder.
  • Set the options of the linker to include the winsock library file - ws2_32.lib. This file is distributed with the C compiler - and contains the socket functions for Windows. It is needed by some - functions used by the samples in the tutorial.
  • -
-

How to properly set Microsoft Visual Studio
-
-
Visual Studio 6

-
    -
  • To add a preprocessor definition, you must select Settings from the Project menu, then select C/C++ - from the tab control, and under the category General, you must add - the definition under the Preprocessor Definitions text box. -
  • To add a new library to the project with Microsoft Visual C++, you must - select Settings from the Project menu, then select Link - from the tab control, and then add the name of the new library in the Object/library - modules editbox. -
  • To add a new path where Microsoft Visual C++ will look for the libraries, - you must select Options from the Tools menu, then - Directories - from the tab control, Library files from the Show directories - for combobox, and the add the path in the Directories box. -
  • To add a new path where Microsoft Visual C++ will look for include files, you must select Options from the Tools menu, then - Directories - from the tab control, Include files from the Show directories - for combobox, and the add the path in the Directories box.
  • -
-

Visual Studio 2005 (needed to compile x64 applications)

-
    -
  • To add a preprocessor definition, you must select Properties from the Project menu, then select C/C++ - from the list control on the left, and under the category Preprocessor, you must add - the definition under the Preprocessor Definitions text box. -
  • To add a new library to the project, you must - select Properties from the Project menu, then select Linker - from the list control on the left, and under the category Input add the name of the new library in the - Additional Dependencies text box.
  • To add a new path where Microsoft Visual - Studio will look for the libraries, - you must select Options from the Tools menu, then - Project and Solutions from the list control on the left, VC++ - Directories, then choose Library Files in the Show directories - for combobox, and the add the path in the box below. -
  • To add a new path where Microsoft Visual - Studio will look for the include files, - you must select Options from the Tools menu, then - Project and Solutions from the list control on the left, VC++ - Directories, then choose Include Files in the Show directories - for combobox, and the add the path in the box below. -
-

 

-

Sample programs

-

A couple of sample programs are provided to show the usage of the WinPcap API. The -source of the examples, along with all the files needed to compile and run them, can be found in the Developer's -Pack.  For didactic purpose we provide here a browsable version of the -code: it is possible to click on the variables and functions to jump the -documentation of each of them. For a more complete set of samples, try WinPcap -Tutorial Section.

- - - - - - - - - - - - - - - -

Packet Dump

-

This program reads packets from a file or a network adapter, depending on -a command line switch. If a source is not provided, the program shows a list of -available adapters, one of which can be selected. Once the -capture is started, the program prints the timestamp, the length and the raw -contents of the packets. Once compiled, it will run on all the Win32 platforms. It -can be compiled to run on Unix as well (the makefile is provided).

- - - - -
/*
-
* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
-
* All rights reserved.
-
*
-
* Redistribution and use in source and binary forms, with or without
-
* modification, are permitted provided that the following conditions
-
* are met:
-
*
-
* 1. Redistributions of source code must retain the above copyright
-
* notice, this list of conditions and the following disclaimer.
-
* 2. Redistributions in binary form must reproduce the above copyright
-
* notice, this list of conditions and the following disclaimer in the
-
* documentation and/or other materials provided with the distribution.
-
* 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.
-
*
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
*
-
*/
-
-
-
#include <stdlib.h>
-
#include <stdio.h>
-
-
//
-
// NOTE: remember to include WPCAP and HAVE_REMOTE among your
-
// preprocessor definitions.
-
//
-
-
#include <pcap.h>
-
-
#define LINE_LEN 16
-
-
int main(int argc, char **argv)
-
{
-
pcap_if_t *alldevs, *d;
-
pcap_t *fp;
-
u_int inum, i=0;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
int res;
-
struct pcap_pkthdr *header;
-
const u_char *pkt_data;
-
-
printf("pktdump_ex: prints the packets of the network using WinPcap.\n");
-
printf(" Usage: pktdump_ex [-s source]\n\n"
-
" Examples:\n"
-
" pktdump_ex -s file://c:/temp/file.acp\n"
-
" pktdump_ex -s rpcap://\\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n");
-
-
if(argc < 3)
-
{
-
-
printf("\nNo adapter selected: printing the device list:\n");
-
/* The user didn't provide a packet source: Retrieve the local device list */
-
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
-
{
-
fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);
-
return -1;
-
}
-
-
/* Print the list */
-
for(d=alldevs; d; d=d->next)
-
{
-
printf("%d. %s\n ", ++i, d->name);
-
-
if (d->description)
-
printf(" (%s)\n", d->description);
-
else
-
printf(" (No description available)\n");
-
}
-
-
if (i==0)
-
{
-
fprintf(stderr,"No interfaces found! Exiting.\n");
-
return -1;
-
}
-
-
printf("Enter the interface number (1-%d):",i);
-
scanf_s("%d", &inum);
-
-
if (inum < 1 || inum > i)
-
{
-
printf("\nInterface number out of range.\n");
-
-
/* Free the device list */
-
pcap_freealldevs(alldevs);
-
return -1;
-
}
-
-
/* Jump to the selected adapter */
-
for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
-
-
/* Open the device */
-
if ( (fp= pcap_open(d->name,
-
100 /*snaplen*/,
-
PCAP_OPENFLAG_PROMISCUOUS /*flags*/,
-
20 /*read timeout*/,
-
NULL /* remote authentication */,
-
errbuf)
-
) == NULL)
-
{
-
fprintf(stderr,"\nError opening adapter\n");
-
return -1;
-
}
-
}
-
else
-
{
-
// Do not check for the switch type ('-s')
-
if ( (fp= pcap_open(argv[2],
-
100 /*snaplen*/,
-
PCAP_OPENFLAG_PROMISCUOUS /*flags*/,
-
20 /*read timeout*/,
-
NULL /* remote authentication */,
-
errbuf)
-
) == NULL)
-
{
-
fprintf(stderr,"\nError opening source: %s\n", errbuf);
-
return -1;
-
}
-
}
-
-
/* Read the packets */
-
while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0)
-
{
-
-
if(res == 0)
-
/* Timeout elapsed */
-
continue;
-
-
/* print pkt timestamp and pkt len */
-
printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len);
-
-
/* Print the packet */
-
for (i=1; (i < header->caplen + 1 ) ; i++)
-
{
-
printf("%.2x ", pkt_data[i-1]);
-
if ( (i % LINE_LEN) == 0) printf("\n");
-
}
-
-
printf("\n\n");
-
}
-
-
if(res == -1)
-
{
-
fprintf(stderr, "Error reading the packets: %s\n", pcap_geterr(fp));
-
return -1;
-
}
-
-
return 0;
-
}
-
- - - - - - - - - - -

Packet Filter

- -

This is a more complete example of libpcap usage. It shows, among other -things, how to create and set filters and how to save a capture to disk. It can -be compiled under Win32 or Unix (projects and makefiles are provided). -Pcap_filter (pf.exe) is a general-purpose packet filtering application: its -input parameters are a source of packets (it can be a physical interface or a -file), a filter and an output file. It takes packets from the source until -CTRL+C is pressed or the whole file is processed, applies the filter to the -incoming packets and saves them to the output file if they satisfy the filter. -Pcap_filter can be used to dump network data according to a particular filter, -but also to extract a set of packets from a previously saved file. The format of -both input and output files is the format used by libpcap, i.e. same of WinDump, tcpdump -and many other network tools.

- - - - -
/*
-
* Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)
-
* Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)
-
* All rights reserved.
-
*
-
* Redistribution and use in source and binary forms, with or without
-
* modification, are permitted provided that the following conditions
-
* are met:
-
*
-
* 1. Redistributions of source code must retain the above copyright
-
* notice, this list of conditions and the following disclaimer.
-
* 2. Redistributions in binary form must reproduce the above copyright
-
* notice, this list of conditions and the following disclaimer in the
-
* documentation and/or other materials provided with the distribution.
-
* 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.
-
*
-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
*
-
*/
-
-
-
#include <stdlib.h>
-
#include <stdio.h>
-
-
#include <pcap.h>
-
-
#define MAX_PRINT 80
-
#define MAX_LINE 16
-
-
-
void usage();
-
-
-
void main(int argc, char **argv)
-
{
-
pcap_t *fp;
-
char errbuf[PCAP_ERRBUF_SIZE];
-
char *source=NULL;
-
char *ofilename=NULL;
-
char *filter=NULL;
-
int i;
-
pcap_dumper_t *dumpfile;
-
struct bpf_program fcode;
-
bpf_u_int32 NetMask;
-
int res;
-
struct pcap_pkthdr *header;
-
const u_char *pkt_data;
-
-
if (argc == 1)
-
{
-
usage();
-
return;
-
}
-
-
for(i=1;i < argc; i+= 2)
-
{
-
-
switch (argv[i] [1])
-
{
-
case 's':
-
{
-
source=argv[i+1];
-
};
-
break;
-
-
case 'o':
-
{
-
ofilename=argv[i+1];
-
};
-
break;
-
-
case 'f':
-
{
-
filter=argv[i+1];
-
};
-
break;
-
}
-
}
-
-
// open a capture from the network
-
if (source != NULL)
-
{
-
if ( (fp= pcap_open(source,
-
1514 /*snaplen*/,
-
PCAP_OPENFLAG_PROMISCUOUS /*flags*/,
-
20 /*read timeout*/,
-
NULL /* remote authentication */,
-
errbuf)
-
) == NULL)
-
{
-
fprintf(stderr,"\nUnable to open the adapter.\n");
-
return;
-
}
-
}
-
-
else usage();
-
-
if (filter != NULL)
-
{
-
// We should loop through the adapters returned by the pcap_findalldevs_ex()
-
// in order to locate the correct one.
-
//
-
// Let's do things simpler: we suppose to be in a C class network ;-)
-
NetMask=0xffffff;
-
-
//compile the filter
-
if(pcap_compile(fp, &fcode, filter, 1, NetMask) < 0)
-
{
-
fprintf(stderr,"\nError compiling filter: wrong syntax.\n");
-
return;
-
}
-
-
//set the filter
-
if(pcap_setfilter(fp, &fcode)<0)
-
{
-
fprintf(stderr,"\nError setting the filter\n");
-
return;
-
}
-
-
}
-
-
//open the dump file
-
if (ofilename != NULL)
-
{
-
dumpfile= pcap_dump_open(fp, ofilename);
-
-
if (dumpfile == NULL)
-
{
-
fprintf(stderr,"\nError opening output file\n");
-
return;
-
}
-
}
-
else usage();
-
-
//start the capture
-
while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0)
-
{
-
-
if(res == 0)
-
/* Timeout elapsed */
-
continue;
-
-
//save the packet on the dump file
-
pcap_dump((unsigned char *) dumpfile, header, pkt_data);
-
-
}
-
}
-
-
-
void usage()
-
{
-
-
printf("\npf - Generic Packet Filter.\n");
-
printf("\nUsage:\npf -s source -o output_file_name [-f filter_string]\n\n");
-
exit(0);
-
}
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/incs_2pcap_8h.html b/libs/WinPcap-413-173-b4/docs/html/incs_2pcap_8h.html deleted file mode 100644 index 9f1147ae..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/incs_2pcap_8h.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -WinPcap: pcap.h File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
- -
-
incs/pcap.h File Reference
-
-
-
#include <pcap-stdinc.h>
-#include <net/bpf.h>
-#include <stdio.h>
-
-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - -

-Data Structures

struct  pcap_file_header
 Header of a libpcap dump file. More...
 
struct  pcap_pkthdr
 Header of a packet in the dump file. More...
 
struct  pcap_stat
 Structure that keeps statistical values on an interface. More...
 
struct  pcap_if
 Item in a list of interfaces, used by pcap_findalldevs(). More...
 
struct  pcap_addr
 Representation of an interface address, used by pcap_findalldevs(). More...
 
- - - - - - - - - - - - - -

-Macros

#define PCAP_VERSION_MAJOR   2
 Major libpcap dump file version. More...
 
#define PCAP_VERSION_MINOR   4
 Minor libpcap dump file version. More...
 
#define PCAP_ERRBUF_SIZE   256
 Size to use when allocating the buffer that contains the libpcap errors. More...
 
#define PCAP_IF_LOOPBACK   0x00000001
 interface is loopback More...
 
- - - - - - - - - - - - - - - - - - - -

-Typedefs

typedef int bpf_int32
 32-bit integer More...
 
typedef u_int bpf_u_int32
 32-bit unsigned integer More...
 
typedef struct pcap pcap_t
 Descriptor of an open capture instance. This structure is opaque to the user, that handles its content through the functions provided by wpcap.dll. More...
 
typedef struct pcap_dumper pcap_dumper_t
 libpcap savefile descriptor. More...
 
typedef struct pcap_if pcap_if_t
 Item in a list of interfaces, see pcap_if. More...
 
typedef struct pcap_addr pcap_addr_t
 Representation of an interface address, see pcap_addr. More...
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/incs_2pcap_8h_source.html b/libs/WinPcap-413-173-b4/docs/html/incs_2pcap_8h_source.html deleted file mode 100644 index 8be0cb90..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/incs_2pcap_8h_source.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - -WinPcap: pcap.h Source File - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
-
-
incs/pcap.h
-
-
-Go to the documentation of this file.
1 /* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */
-
2 /*
-
3  * Copyright (c) 1993, 1994, 1995, 1996, 1997
-
4  * The Regents of the University of California. All rights reserved.
-
5  *
-
6  * Redistribution and use in source and binary forms, with or without
-
7  * modification, are permitted provided that the following conditions
-
8  * are met:
-
9  * 1. Redistributions of source code must retain the above copyright
-
10  * notice, this list of conditions and the following disclaimer.
-
11  * 2. Redistributions in binary form must reproduce the above copyright
-
12  * notice, this list of conditions and the following disclaimer in the
-
13  * documentation and/or other materials provided with the distribution.
-
14  * 3. All advertising materials mentioning features or use of this software
-
15  * must display the following acknowledgement:
-
16  * This product includes software developed by the Computer Systems
-
17  * Engineering Group at Lawrence Berkeley Laboratory.
-
18  * 4. Neither the name of the University nor of the Laboratory may be used
-
19  * to endorse or promote products derived from this software without
-
20  * specific prior written permission.
-
21  *
-
22  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-
23  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-
25  * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-
28  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-
29  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-
31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-
32  * SUCH DAMAGE.
-
33  *
-
34  * @(#) $Header: /usr/cvsroot_private/winpcap/dox/libpcap/incs/pcap.h,v 1.5 2005/11/30 21:48:23 gianlucav Exp $ (LBL)
-
35  */
-
36 
-
37 
-
44 #ifndef lib_pcap_h
-
45 #define lib_pcap_h
-
46 
-
47 #include <pcap-stdinc.h>
-
48 #include <net/bpf.h>
-
49 
-
50 #include <stdio.h>
-
51 
-
52 #ifdef __cplusplus
-
53 extern "C" {
-
54 #endif
-
55 
-
56 #define PCAP_VERSION_MAJOR 2
-
57 #define PCAP_VERSION_MINOR 4
-
58 
-
59 #define PCAP_ERRBUF_SIZE 256
-
60 
-
61 
-
65 #if BPF_RELEASE - 0 < 199406
-
66 typedef int bpf_int32;
-
67 typedef u_int bpf_u_int32;
-
68 #endif
-
69 
-
70 typedef struct pcap pcap_t;
-
71 typedef struct pcap_dumper pcap_dumper_t;
-
72 typedef struct pcap_if pcap_if_t;
-
73 typedef struct pcap_addr pcap_addr_t;
-
74 
- -
111  bpf_u_int32 magic;
-
112  u_short version_major;
-
113  u_short version_minor;
-
114  bpf_int32 thiszone;
-
115  bpf_u_int32 sigfigs;
-
116  bpf_u_int32 snaplen;
-
117  bpf_u_int32 linktype;
-
118 };
-
119 
-
126 struct pcap_pkthdr {
-
127  struct timeval ts;
-
128  bpf_u_int32 caplen;
-
129  bpf_u_int32 len;
-
130 };
-
131 
-
136 struct pcap_stat {
-
137  u_int ps_recv;
-
138  u_int ps_drop;
-
139  u_int ps_ifdrop;
-
140 #ifdef _WIN32
-
141  u_int bs_capt;
-
142 #endif /* _WIN32 */
-
143 };
-
144 
-
148 struct pcap_if {
-
149  struct pcap_if *next;
-
150  char *name;
-
151  char *description;
- -
153  u_int flags;
-
154 };
-
155 
-
156 #define PCAP_IF_LOOPBACK 0x00000001
-
157 
-
158 
-
161 struct pcap_addr {
-
162  struct pcap_addr *next;
-
163  struct sockaddr *addr;
-
164  struct sockaddr *netmask;
-
165  struct sockaddr *broadaddr;
-
166  struct sockaddr *dstaddr;
-
167 };
-
168 
-
169 #if defined(_WIN32)
-
170 
-
171 
-
172 #define MODE_CAPT 0
-
173 #define MODE_STAT 1
-
174 
-
175 #endif /* _WIN32 */
-
176 
-
177 #ifdef __cplusplus
-
178 }
-
179 #endif
-
180 
-
181 #endif
-
182 
-
u_int flags
PCAP_IF_ interface flags. Currently the only possible flag is PCAP_IF_LOOPBACK, that is set if the in...
Definition: incs/pcap.h:153
-
bpf_u_int32 sigfigs
accuracy of timestamps
Definition: incs/pcap.h:115
-
Header of a packet in the dump file.
Definition: incs/pcap.h:126
-
bpf_int32 thiszone
gmt to local correction
Definition: incs/pcap.h:114
-
char * name
a pointer to a string giving a name for the device to pass to pcap_open_live()
Definition: incs/pcap.h:150
-
bpf_u_int32 magic
Definition: incs/pcap.h:111
-
struct pcap pcap_t
Descriptor of an open capture instance. This structure is opaque to the user, that handles its conten...
Definition: incs/pcap.h:70
-
struct sockaddr * broadaddr
if not NULL, a pointer to a struct sockaddr that contains the broadcast address corre­ sponding to th...
Definition: incs/pcap.h:165
-
bpf_u_int32 caplen
length of portion present
Definition: incs/pcap.h:128
-
struct timeval ts
time stamp
Definition: incs/pcap.h:127
-
struct pcap_addr * next
if not NULL, a pointer to the next element in the list; NULL for the last element of the list ...
Definition: incs/pcap.h:162
-
u_short version_major
Libpcap major version.
Definition: incs/pcap.h:112
-
Structure that keeps statistical values on an interface.
Definition: incs/pcap.h:136
-
bpf_u_int32 len
length this packet (off wire)
Definition: incs/pcap.h:129
-
u_int ps_recv
number of packets transited on the network
Definition: incs/pcap.h:137
-
int bpf_int32
32-bit integer
Definition: incs/pcap.h:66
-
struct sockaddr * dstaddr
if not NULL, a pointer to a struct sockaddr that contains the destination address corre­ sponding to ...
Definition: incs/pcap.h:166
-
bpf_u_int32 linktype
data link type (LINKTYPE_*)
Definition: incs/pcap.h:117
-
struct pcap_if * next
if not NULL, a pointer to the next element in the list; NULL for the last element of the list ...
Definition: incs/pcap.h:149
-
Representation of an interface address, used by pcap_findalldevs().
Definition: incs/pcap.h:161
-
u_int ps_drop
number of packets dropped by the driver
Definition: incs/pcap.h:138
-
char * description
if not NULL, a pointer to a string giving a human-readable description of the device ...
Definition: incs/pcap.h:151
-
struct sockaddr * netmask
if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address po...
Definition: incs/pcap.h:164
-
struct pcap_dumper pcap_dumper_t
libpcap savefile descriptor.
Definition: incs/pcap.h:71
-
u_short version_minor
Libpcap minor version.
Definition: incs/pcap.h:113
-
struct pcap_addr * addresses
a pointer to the first element of a list of addresses for the interface
Definition: incs/pcap.h:152
-
Item in a list of interfaces, used by pcap_findalldevs().
Definition: incs/pcap.h:148
-
u_int ps_ifdrop
drops by interface, not yet supported
Definition: incs/pcap.h:139
-
bpf_u_int32 snaplen
max length saved portion of each pkt
Definition: incs/pcap.h:116
-
u_int bpf_u_int32
32-bit unsigned integer
Definition: incs/pcap.h:67
-
Header of a libpcap dump file.
Definition: incs/pcap.h:110
-
struct sockaddr * addr
a pointer to a struct sockaddr containing an address
Definition: incs/pcap.h:163
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/index.hhc b/libs/WinPcap-413-173-b4/docs/html/index.hhc deleted file mode 100644 index c5d19469..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/index.hhc +++ /dev/null @@ -1,1353 +0,0 @@ - - - - - -
    -
  • -
  • -
  • -
      -
    • -
        -
      • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
              -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            -
          • -
              -
            • -
            • -
            • -
            -
          • -
              -
            • -
            • -
            • -
            -
          • -
              -
            • -
            • -
            • -
            • -
            -
          • -
              -
            • -
            • -
            • -
            • -
            • -
            -
          • -
              -
            • -
            • -
            -
          • -
              -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            -
          • -
              -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            • -
            -
          • -
              -
            • -
            • -
            -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
              -
            • -
            • -
            • -
            -
          • -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
              -
            • -
            • -
            • -
            • -
            -
          • -
              -
            • -
            • -
            -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          -
        -
      • -
          -
        -
      • -
          -
        -
      -
    • -
        -
      • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        -
      • -
          -
        -
      • -
          -
        -
      -
    • -
        -
      • -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        • -
            -
          -
        -
      • -
          -
        -
      • -
          -
        -
      • -
          -
        • -
            -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          -
        • -
            -
          • -
          • -
          • -
          • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      -
    -
  • -
      -
    • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        -
      -
    • -
        -
      • -
      • -
      -
    -
  • -
      -
    • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
            -
          • -
          • -
          • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
          -
        • -
            -
          • -
          • -
          • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
      -
    • -
        -
      • -
          -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        • -
        -
      • -
      • -
      • -
      • -
      • -
      • -
      -
    -
- - diff --git a/libs/WinPcap-413-173-b4/docs/html/ioctls_8h.html b/libs/WinPcap-413-173-b4/docs/html/ioctls_8h.html deleted file mode 100644 index 941ab60f..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/ioctls_8h.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - -WinPcap: ioctls.h File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
- -
-
ioctls.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define BIOCSETBUFFERSIZE   9592
 IOCTL code: set kernel buffer size. More...
 
#define BIOCSETF   9030
 IOCTL code: set packet filtering program. More...
 
#define BIOCGSTATS   9031
 IOCTL code: get the capture stats. More...
 
#define BIOCSRTIMEOUT   7416
 IOCTL code: set the read timeout. More...
 
#define BIOCSMODE   7412
 IOCTL code: set working mode. More...
 
#define BIOCSWRITEREP   7413
 IOCTL code: set number of physical repetions of every packet written by the app. More...
 
#define BIOCSMINTOCOPY   7414
 IOCTL code: set minimum amount of data in the kernel buffer that unlocks a read call. More...
 
#define BIOCSETOID   0x80000000
 IOCTL code: set an OID value. More...
 
#define BIOCQUERYOID   0x80000004
 IOCTL code: get an OID value. More...
 
#define BIOCSETDUMPFILENAME   9029
 IOCTL code: set the name of a the file used by kernel dump mode. More...
 
#define BIOCGEVNAME   7415
 IOCTL code: get the name of the event that the driver signals when some data is present in the buffer. More...
 
#define BIOCSENDPACKETSNOSYNC   9032
 IOCTL code: Send a buffer containing multiple packets to the network, ignoring the timestamps. More...
 
#define BIOCSENDPACKETSSYNC   9033
 IOCTL code: Send a buffer containing multiple packets to the network, considering the timestamps. More...
 
#define BIOCSETDUMPLIMITS   9034
 IOCTL code: Set the dump file limits. More...
 
#define BIOCISDUMPENDED   7411
 IOCTL code: Get the status of the kernel dump process. More...
 
#define BIOCISETLOBBEH   7410
 IOCTL code: set the loopback behavior. More...
 
#define BIOCSETEVENTHANDLE   7920
 This IOCTL passes the read event HANDLE allocated by the user (packet.dll) to kernel level. More...
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/ioctls_8h_source.html b/libs/WinPcap-413-173-b4/docs/html/ioctls_8h_source.html deleted file mode 100644 index d853c453..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/ioctls_8h_source.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -WinPcap: ioctls.h Source File - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
-
-
ioctls.h
-
-
-Go to the documentation of this file.
1 /*
-
2  * Copyright (c) 2007 CACE Technologies, Davis (California)
-
3  * All rights reserved.
-
4  *
-
5  * Redistribution and use in source and binary forms, with or without
-
6  * modification, are permitted provided that the following conditions
-
7  * are met:
-
8  *
-
9  * 1. Redistributions of source code must retain the above copyright
-
10  * notice, this list of conditions and the following disclaimer.
-
11  * 2. Redistributions in binary form must reproduce the above copyright
-
12  * notice, this list of conditions and the following disclaimer in the
-
13  * documentation and/or other materials provided with the distribution.
-
14  * 3. Neither the name of CACE Technologies nor the names of its
-
15  * contributors may be used to endorse or promote products derived from
-
16  * this software without specific prior written permission.
-
17  *
-
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
22  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
29  *
-
30  */
-
31 
-
32 #ifndef __NPF_IOCTLS_H__
-
33 #define __NPF_IOCTLS_H__
-
34 
-
35 /***************************/
-
36 /* IOCTLs */
-
37 /***************************/
-
38 
-
55 #define BIOCSETBUFFERSIZE 9592
-
56 
-
67 #define BIOCSETF 9030
-
68 
-
75 #define BIOCGSTATS 9031
-
76 
-
82 #define BIOCSRTIMEOUT 7416
-
83 
-
91 #define BIOCSMODE 7412
-
92 
-
99 #define BIOCSWRITEREP 7413
-
100 
-
106 #define BIOCSMINTOCOPY 7414
-
107 
-
113 #define BIOCSETOID 0x80000000
-
114 
-
120 #define BIOCQUERYOID 0x80000004
-
121 
-
129 #define BIOCSETDUMPFILENAME 9029
-
130 
-
137 #define BIOCGEVNAME 7415
-
138 
-
146 #define BIOCSENDPACKETSNOSYNC 9032
-
147 
-
156 #define BIOCSENDPACKETSSYNC 9033
-
157 
-
164 #define BIOCSETDUMPLIMITS 9034
-
165 
-
172 #define BIOCISDUMPENDED 7411
-
173 
-
179 #define BIOCISETLOBBEH 7410
-
180 
-
190 #define BIOCSETEVENTHANDLE 7920
-
191 
-
203 #endif //__NPF_IOCTLS_H__
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/jitter_8h.html b/libs/WinPcap-413-173-b4/docs/html/jitter_8h.html deleted file mode 100644 index 22a16f3c..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/jitter_8h.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - -WinPcap: jitter.h File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
- -
-
jitter.h File Reference
-
-
- -

Go to the source code of this file.

- - - - - - - - -

-Data Structures

struct  binary_stream
 A stream of X86 binary code. More...
 
struct  JIT_BPF_Filter
 Structure describing a x86 filtering program created by the jitter. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define EAX   0
 
#define ECX   1
 
#define EDX   2
 
#define EBX   3
 
#define ESP   4
 
#define EBP   5
 
#define ESI   6
 
#define EDI   7
 
#define AX   0
 
#define CX   1
 
#define DX   2
 
#define BX   3
 
#define SP   4
 
#define BP   5
 
#define SI   6
 
#define DI   7
 
#define AL   0
 
#define CL   1
 
#define DL   2
 
#define BL   3
 
#define MOVid(r32, i32)   emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);
 mov r32,i32 More...
 
#define MOVrd(dr32, sr32)   emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
 mov dr32,sr32 More...
 
#define MOVodd(dr32, sr32, off)
 mov dr32,sr32[off] More...
 
#define MOVobd(dr32, sr32, or32)
 mov dr32,sr32[or32] More...
 
#define MOVobw(dr32, sr32, or32)
 mov dr16,sr32[or32] More...
 
#define MOVobb(dr8, sr32, or32)
 mov dr8,sr32[or32] More...
 
#define MOVomd(dr32, or32, sr32)
 mov [dr32][or32],sr32 More...
 
#define BSWAP(dr32)
 bswap dr32 More...
 
#define SWAP_AX()
 xchg al,ah More...
 
#define PUSH(r32)   emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);
 push r32 More...
 
#define POP(r32)   emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);
 pop r32 More...
 
#define RET()   emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);
 ret More...
 
#define ADDrd(dr32, sr32)
 add dr32,sr32 More...
 
#define ADD_EAXi(i32)
 add eax,i32 More...
 
#define ADDid(r32, i32)
 add r32,i32 More...
 
#define ADDib(r32, i8)
 add r32,i8 More...
 
#define SUBrd(dr32, sr32)
 sub dr32,sr32 More...
 
#define SUB_EAXi(i32)
 sub eax,i32 More...
 
#define MULrd(r32)
 mul r32 More...
 
#define DIVrd(r32)
 div r32 More...
 
#define ANDib(r8, i8)
 and r8,i8 More...
 
#define ANDid(r32, i32)
 and r32,i32 More...
 
#define ANDrd(dr32, sr32)
 and dr32,sr32 More...
 
#define ORrd(dr32, sr32)
 or dr32,sr32 More...
 
#define ORid(r32, i32)
 or r32,i32 More...
 
#define SHLib(r32, i8)
 shl r32,i8 More...
 
#define SHL_CLrb(dr32)
 shl dr32,cl More...
 
#define SHRib(r32, i8)
 shr r32,i8 More...
 
#define SHR_CLrb(dr32)
 shr dr32,cl More...
 
#define NEGd(r32)
 neg r32 More...
 
#define CMPodd(dr32, sr32, off)
 cmp dr32,sr32[off] More...
 
#define CMPrd(dr32, sr32)
 cmp dr32,sr32 More...
 
#define CMPid(dr32, i32)
 cmp dr32,i32 More...
 
#define JNEb(off8)
 jne off32 More...
 
#define JAb(off8)
 ja off32 More...
 
#define JE(off32)
 je off32 More...
 
#define JLE(off32)
 jle off32 More...
 
#define JLEb(off8)
 jle off8 More...
 
#define JBEb(off8)
 jbe off8 More...
 
#define JBb(off8)
 jb off8 More...
 
#define JA(off32)
 ja off32 More...
 
#define JAE(off32)
 jae off32 More...
 
#define JG(off32)
 jg off32 More...
 
#define JGE(off32)
 jge off32 More...
 
#define JMP(off32)
 jmp off32 More...
 
- - - - - - - - - - - - - -

-Typedefs

typedef struct binary_stream binary_stream
 A stream of X86 binary code. More...
 
typedef UINT(__cdecl * BPF_filter_function )(PVOID *, ULONG, UINT)
 Prototype of a filtering function created by the jitter. More...
 
typedef void(* emit_func )(binary_stream *stream, ULONG value, UINT n)
 Prototype of the emit functions. More...
 
typedef struct JIT_BPF_Filter JIT_BPF_Filter
 Structure describing a x86 filtering program created by the jitter. More...
 
- - - - - - - - - - -

-Functions

JIT_BPF_FilterBPF_jitter (struct bpf_insn *fp, INT nins)
 BPF jitter, builds an x86 function from a BPF program. More...
 
BPF_filter_function BPFtoX86 (struct bpf_insn *ins, UINT nins, INT *mem)
 Translates a set of BPF instructions in a set of x86 ones. More...
 
void BPF_Destroy_JIT_Filter (JIT_BPF_Filter *Filter)
 Deletes a filtering function that was previously created by BPF_jitter(). More...
 
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/jitter_8h_source.html b/libs/WinPcap-413-173-b4/docs/html/jitter_8h_source.html deleted file mode 100644 index 2855b3a2..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/jitter_8h_source.html +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - -WinPcap: jitter.h Source File - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
-
-
jitter.h
-
-
-Go to the documentation of this file.
1 /*
-
2  * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
-
3  * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California)
-
4  * All rights reserved.
-
5  *
-
6  * Redistribution and use in source and binary forms, with or without
-
7  * modification, are permitted provided that the following conditions
-
8  * are met:
-
9  *
-
10  * 1. Redistributions of source code must retain the above copyright
-
11  * notice, this list of conditions and the following disclaimer.
-
12  * 2. Redistributions in binary form must reproduce the above copyright
-
13  * notice, this list of conditions and the following disclaimer in the
-
14  * documentation and/or other materials provided with the distribution.
-
15  * 3. Neither the name of the Politecnico di Torino, CACE Technologies
-
16  * nor the names of its contributors may be used to endorse or promote
-
17  * products derived from this software without specific prior written
-
18  * permission.
-
19  *
-
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
31  *
-
32  */
-
33 
-
42 //
-
43 // Registers
-
44 //
-
45 #define EAX 0
-
46 #define ECX 1
-
47 #define EDX 2
-
48 #define EBX 3
-
49 #define ESP 4
-
50 #define EBP 5
-
51 #define ESI 6
-
52 #define EDI 7
-
53 
-
54 #define AX 0
-
55 #define CX 1
-
56 #define DX 2
-
57 #define BX 3
-
58 #define SP 4
-
59 #define BP 5
-
60 #define SI 6
-
61 #define DI 7
-
62 
-
63 #define AL 0
-
64 #define CL 1
-
65 #define DL 2
-
66 #define BL 3
-
67 
-
69 typedef struct binary_stream{
-
70  INT cur_ip;
-
71  INT bpf_pc;
-
72  PCHAR ibuf;
-
73  PUINT refs;
- -
75 
-
76 
-
82 typedef UINT (__cdecl *BPF_filter_function)( PVOID *, ULONG, UINT);
-
83 
-
92 typedef void (*emit_func)(binary_stream *stream, ULONG value, UINT n);
-
93 
-
95 typedef struct JIT_BPF_Filter{
- -
97  PINT mem;
-
98 }
- -
100 
-
101 
-
102 
-
103 
-
104 /**************************/
-
105 /* X86 INSTRUCTION MACROS */
-
106 /**************************/
-
107 
-
109 #define MOVid(r32, i32) \
-
110  emitm(&stream, 11 << 4 | 1 << 3 | r32 & 0x7, 1); emitm(&stream, i32, 4);
-
111 
-
113 #define MOVrd(dr32, sr32) \
-
114  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
115 
-
117 #define MOVodd(dr32, sr32, off) \
-
118  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-
119  emitm(&stream, 1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
-
120  emitm(&stream, off, 1);
-
121 
-
123 #define MOVobd(dr32, sr32, or32) \
-
124  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-
125  emitm(&stream, (dr32 & 0x7) << 3 | 4 , 1);\
-
126  emitm(&stream, (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
127 
-
129 #define MOVobw(dr32, sr32, or32) \
-
130  emitm(&stream, 0x66, 1); \
-
131  emitm(&stream, 8 << 4 | 3 | 1 << 3, 1); \
-
132  emitm(&stream, (dr32 & 0x7) << 3 | 4 , 1);\
-
133  emitm(&stream, (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
134 
-
136 #define MOVobb(dr8, sr32, or32) \
-
137  emitm(&stream, 0x8a, 1); \
-
138  emitm(&stream, (dr8 & 0x7) << 3 | 4 , 1);\
-
139  emitm(&stream, (or32 & 0x7) << 3 | (sr32 & 0x7) , 1);
-
140 
-
142 #define MOVomd(dr32, or32, sr32) \
-
143  emitm(&stream, 0x89, 1); \
-
144  emitm(&stream, (sr32 & 0x7) << 3 | 4 , 1);\
-
145  emitm(&stream, (or32 & 0x7) << 3 | (dr32 & 0x7) , 1);
-
146 
-
148 #define BSWAP(dr32) \
-
149  emitm(&stream, 0xf, 1); \
-
150  emitm(&stream, 0x19 << 3 | dr32 , 1);
-
151 
-
153 #define SWAP_AX() \
-
154  emitm(&stream, 0x86, 1); \
-
155  emitm(&stream, 0xc4 , 1);
-
156 
-
158 #define PUSH(r32) \
-
159  emitm(&stream, 5 << 4 | 0 << 3 | r32 & 0x7, 1);
-
160 
-
162 #define POP(r32) \
-
163  emitm(&stream, 5 << 4 | 1 << 3 | r32 & 0x7, 1);
-
164 
-
166 #define RET() \
-
167  emitm(&stream, 12 << 4 | 0 << 3 | 3, 1);
-
168 
-
170 #define ADDrd(dr32, sr32) \
-
171  emitm(&stream, 0x03, 1);\
-
172  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | (sr32 & 0x7), 1);
-
173 
-
175 #define ADD_EAXi(i32) \
-
176  emitm(&stream, 0x05, 1);\
-
177  emitm(&stream, i32, 4);
-
178 
-
180 #define ADDid(r32, i32) \
-
181  emitm(&stream, 0x81, 1);\
-
182  emitm(&stream, 24 << 3 | r32, 1);\
-
183  emitm(&stream, i32, 4);
-
184 
-
186 #define ADDib(r32, i8) \
-
187  emitm(&stream, 0x83, 1);\
-
188  emitm(&stream, 24 << 3 | r32, 1);\
-
189  emitm(&stream, i8, 1);
-
190 
-
192 #define SUBrd(dr32, sr32) \
-
193  emitm(&stream, 0x2b, 1);\
-
194  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | (sr32 & 0x7), 1);
-
195 
-
197 #define SUB_EAXi(i32) \
-
198  emitm(&stream, 0x2d, 1);\
-
199  emitm(&stream, i32, 4);
-
200 
-
202 #define MULrd(r32) \
-
203  emitm(&stream, 0xf7, 1);\
-
204  emitm(&stream, 7 << 5 | (r32 & 0x7), 1);
-
205 
-
207 #define DIVrd(r32) \
-
208  emitm(&stream, 0xf7, 1);\
-
209  emitm(&stream, 15 << 4 | (r32 & 0x7), 1);
-
210 
-
212 #define ANDib(r8, i8) \
-
213  emitm(&stream, 0x80, 1);\
-
214  emitm(&stream, 7 << 5 | r8, 1);\
-
215  emitm(&stream, i8, 1);
-
216 
-
218 #define ANDid(r32, i32) \
-
219  if (r32 == EAX){ \
-
220  emitm(&stream, 0x25, 1);\
-
221  emitm(&stream, i32, 4);}\
-
222  else{ \
-
223  emitm(&stream, 0x81, 1);\
-
224  emitm(&stream, 7 << 5 | r32, 1);\
-
225  emitm(&stream, i32, 4);}
-
226 
-
228 #define ANDrd(dr32, sr32) \
-
229  emitm(&stream, 0x23, 1);\
-
230  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
231 
-
233 #define ORrd(dr32, sr32) \
-
234  emitm(&stream, 0x0b, 1);\
-
235  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
236 
-
238 #define ORid(r32, i32) \
-
239  if (r32 == EAX){ \
-
240  emitm(&stream, 0x0d, 1);\
-
241  emitm(&stream, i32, 4);}\
-
242  else{ \
-
243  emitm(&stream, 0x81, 1);\
-
244  emitm(&stream, 25 << 3 | r32, 1);\
-
245  emitm(&stream, i32, 4);}
-
246 
-
248 #define SHLib(r32, i8) \
-
249  emitm(&stream, 0xc1, 1);\
-
250  emitm(&stream, 7 << 5 | r32 & 0x7, 1);\
-
251  emitm(&stream, i8, 1);
-
252 
-
254 #define SHL_CLrb(dr32) \
-
255  emitm(&stream, 0xd3, 1);\
-
256  emitm(&stream, 7 << 5 | dr32 & 0x7, 1);
-
257 
-
259 #define SHRib(r32, i8) \
-
260  emitm(&stream, 0xc1, 1);\
-
261  emitm(&stream, 29 << 3 | r32 & 0x7, 1);\
-
262  emitm(&stream, i8, 1);
-
263 
-
265 #define SHR_CLrb(dr32) \
-
266  emitm(&stream, 0xd3, 1);\
-
267  emitm(&stream, 29 << 3 | dr32 & 0x7, 1);
-
268 
-
270 #define NEGd(r32) \
-
271  emitm(&stream, 0xf7, 1);\
-
272  emitm(&stream, 27 << 3 | r32 & 0x7, 1);
-
273 
-
275 #define CMPodd(dr32, sr32, off) \
-
276  emitm(&stream, 3 << 4 | 3 | 1 << 3, 1); \
-
277  emitm(&stream, 1 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);\
-
278  emitm(&stream, off, 1);
-
279 
-
281 #define CMPrd(dr32, sr32) \
-
282  emitm(&stream, 0x3b, 1); \
-
283  emitm(&stream, 3 << 6 | (dr32 & 0x7) << 3 | sr32 & 0x7, 1);
-
284 
-
286 #define CMPid(dr32, i32) \
-
287  if (dr32 == EAX){ \
-
288  emitm(&stream, 0x3d, 1); \
-
289  emitm(&stream, i32, 4);} \
-
290  else{ \
-
291  emitm(&stream, 0x81, 1); \
-
292  emitm(&stream, 0x1f << 3 | (dr32 & 0x7), 1);\
-
293  emitm(&stream, i32, 4);}
-
294 
-
296 #define JNEb(off8) \
-
297  emitm(&stream, 0x75, 1);\
-
298  emitm(&stream, off8, 1);
-
299 
-
301 #define JAb(off8) \
-
302  emitm(&stream, 0x77, 1);\
-
303  emitm(&stream, off8, 1);
-
304 
-
306 #define JE(off32) \
-
307  emitm(&stream, 0x0f, 1);\
-
308  emitm(&stream, 0x84, 1);\
-
309  emitm(&stream, off32, 4);
-
310 
-
312 #define JLE(off32) \
-
313  emitm(&stream, 0x0f, 1);\
-
314  emitm(&stream, 0x8e, 1);\
-
315  emitm(&stream, off32, 4);
-
316 
-
318 #define JLEb(off8) \
-
319  emitm(&stream, 0x7e, 1);\
-
320  emitm(&stream, off8, 1);
-
321 
-
323 #define JBEb(off8) \
-
324  emitm(&stream, 0x76, 1);\
-
325  emitm(&stream, off8, 1);
-
326 
-
328 #define JBb(off8) \
-
329  emitm(&stream, 0x72, 1);\
-
330  emitm(&stream, off8, 1);
-
331 
-
333 #define JA(off32) \
-
334  emitm(&stream, 0x0f, 1);\
-
335  emitm(&stream, 0x87, 1);\
-
336  emitm(&stream, off32, 4);
-
337 
-
339 #define JAE(off32) \
-
340  emitm(&stream, 0x0f, 1);\
-
341  emitm(&stream, 0x83, 1);\
-
342  emitm(&stream, off32, 4);
-
343 
-
345 #define JG(off32) \
-
346  emitm(&stream, 0x0f, 1);\
-
347  emitm(&stream, 0x8f, 1);\
-
348  emitm(&stream, off32, 4);
-
349 
-
351 #define JGE(off32) \
-
352  emitm(&stream, 0x0f, 1);\
-
353  emitm(&stream, 0x8d, 1);\
-
354  emitm(&stream, off32, 4);
-
355 
-
357 #define JMP(off32) \
-
358  emitm(&stream, 0xe9, 1);\
-
359  emitm(&stream, off32, 4);
-
360 
-
365 /**************************/
-
366 /* Prototypes */
-
367 /**************************/
-
368 
-
382 JIT_BPF_Filter* BPF_jitter(struct bpf_insn *fp, INT nins);
-
383 
-
395 BPF_filter_function BPFtoX86(struct bpf_insn *ins, UINT nins, INT *mem);
- -
403 
-
PINT mem
Definition: jitter.h:97
-
Structure describing a x86 filtering program created by the jitter.
Definition: jitter.h:95
-
INT cur_ip
Current X86 instruction pointer.
Definition: jitter.h:70
-
A stream of X86 binary code.
Definition: jitter.h:69
-
struct binary_stream binary_stream
A stream of X86 binary code.
-
PUINT refs
Jumps reference table.
Definition: jitter.h:73
-
void BPF_Destroy_JIT_Filter(JIT_BPF_Filter *Filter)
Deletes a filtering function that was previously created by BPF_jitter().
-
PCHAR ibuf
Instruction buffer, contains the X86 generated code.
Definition: jitter.h:72
-
BPF_filter_function Function
The x86 filtering binary, in the form of a BPF_filter_function.
Definition: jitter.h:96
-
INT bpf_pc
Current BPF instruction pointer, i.e. position in the BPF program reached by the jitter.
Definition: jitter.h:71
-
UINT(__cdecl * BPF_filter_function)(PVOID *, ULONG, UINT)
Prototype of a filtering function created by the jitter.
Definition: jitter.h:82
-
JIT_BPF_Filter * BPF_jitter(struct bpf_insn *fp, INT nins)
BPF jitter, builds an x86 function from a BPF program.
-
BPF_filter_function BPFtoX86(struct bpf_insn *ins, UINT nins, INT *mem)
Translates a set of BPF instructions in a set of x86 ones.
-
struct JIT_BPF_Filter JIT_BPF_Filter
Structure describing a x86 filtering program created by the jitter.
-
void(* emit_func)(binary_stream *stream, ULONG value, UINT n)
Prototype of the emit functions.
Definition: jitter.h:92
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/jquery.js b/libs/WinPcap-413-173-b4/docs/html/jquery.js deleted file mode 100644 index 6aa2e4c2..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/jquery.js +++ /dev/null @@ -1,39 +0,0 @@ -/*! - * jQuery JavaScript Library v1.7.1 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Nov 21 21:11:03 2011 -0500 - */ -(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; -if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 -},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av); -ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; -if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b -})}})(window); -/*! - PowerTip - v1.2.0 - 2013-04-03 - http://stevenbenner.github.com/jquery-powertip/ - Copyright (c) 2013 Steven Benner (http://stevenbenner.com/). - Released under MIT license. - https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt -*/ -(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.topI||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.leftF){H|=p.left}if(M.left+L>F||M.right - - - - - -WinPcap: main.txt File Reference - - - - - - -
-
-
- - - - - -
-
WinPcap -  4.1.3 -
-
- - - - - - -
-
-
main.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/modules.html b/libs/WinPcap-413-173-b4/docs/html/modules.html deleted file mode 100644 index f907b40c..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/modules.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - -WinPcap: Modules - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Modules
-
- - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/nav_f.png b/libs/WinPcap-413-173-b4/docs/html/nav_f.png deleted file mode 100644 index 72a58a52..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/nav_f.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/nav_g.png b/libs/WinPcap-413-173-b4/docs/html/nav_g.png deleted file mode 100644 index 2093a237..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/nav_g.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/nav_h.png b/libs/WinPcap-413-173-b4/docs/html/nav_h.png deleted file mode 100644 index 33389b10..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/nav_h.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/open.png b/libs/WinPcap-413-173-b4/docs/html/open.png deleted file mode 100644 index 30f75c7e..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/open.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/pages.html b/libs/WinPcap-413-173-b4/docs/html/pages.html deleted file mode 100644 index 1f5d2385..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/pages.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -WinPcap: Related Pages - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - -
-
-
-
Related Pages
-
-
-
Here is a list of all related documentation pages:
- - -
 Deprecated List
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/pcap-remote_8h.html b/libs/WinPcap-413-173-b4/docs/html/pcap-remote_8h.html deleted file mode 100644 index f238dafd..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/pcap-remote_8h.html +++ /dev/null @@ -1,730 +0,0 @@ - - - - - - -WinPcap: pcap-remote.h File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
- -
-
pcap-remote.h File Reference
-
-
-
#include "pcap.h"
-#include "sockutils.h"
-
-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  activehosts
 Keeps a list of all the opened connections in the active mode. More...
 
struct  rpcap_header
 Common header for all the RPCAP messages. More...
 
struct  rpcap_findalldevs_if
 Format of the message for the interface description (findalldevs command) More...
 
struct  rpcap_findalldevs_ifaddr
 Format of the message for the address listing (findalldevs command) More...
 
struct  rpcap_openreply
 Format of the message of the connection opening reply (open command). More...
 
struct  rpcap_startcapreq
 Format of the message that starts a remote capture (startcap command) More...
 
struct  rpcap_startcapreply
 Format of the reply message that devoted to start a remote capture (startcap reply command) More...
 
struct  rpcap_pkthdr
 Format of the header which encapsulates captured packets when transmitted on the network. More...
 
struct  rpcap_filter
 General header used for the pcap_setfilter() command; keeps just the number of BPF instructions. More...
 
struct  rpcap_filterbpf_insn
 Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header. More...
 
struct  rpcap_auth
 Structure that keeps the data required for the authentication on the remote host. More...
 
struct  rpcap_stats
 Structure that keeps the statistics about the number of packets captured, dropped, etc. More...
 
struct  rpcap_sampling
 Structure that is needed to set sampling parameters. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Macros

#define RPCAP_DEFAULT_NETPORT   "2002"
 
#define RPCAP_DEFAULT_NETPORT_ACTIVE   "2003"
 
#define RPCAP_DEFAULT_NETADDR   ""
 
#define RPCAP_VERSION   0
 
#define RPCAP_TIMEOUT_INIT   90
 
#define RPCAP_TIMEOUT_RUNTIME   180
 
#define RPCAP_ACTIVE_WAIT   30
 
#define RPCAP_SUSPEND_WRONGAUTH   1
 
#define RPCAP_NETBUF_SIZE   64000
 Buffer used by socket functions to send-receive packets. In case you plan to have messages larger than this value, you have to increase it. More...
 
#define RPCAP_HOSTLIST_SEP   " ,;\n\r"
 Separators used for the host list. More...
 
#define RPCAP_MSG_ERROR   1
 
#define RPCAP_MSG_FINDALLIF_REQ   2
 
#define RPCAP_MSG_OPEN_REQ   3
 
#define RPCAP_MSG_STARTCAP_REQ   4
 
#define RPCAP_MSG_UPDATEFILTER_REQ   5
 
#define RPCAP_MSG_CLOSE   6
 
#define RPCAP_MSG_PACKET   7
 
#define RPCAP_MSG_AUTH_REQ   8
 
#define RPCAP_MSG_STATS_REQ   9
 
#define RPCAP_MSG_ENDCAP_REQ   10
 
#define RPCAP_MSG_SETSAMPLING_REQ   11
 
#define RPCAP_MSG_FINDALLIF_REPLY   (128+RPCAP_MSG_FINDALLIF_REQ)
 
#define RPCAP_MSG_OPEN_REPLY   (128+RPCAP_MSG_OPEN_REQ)
 
#define RPCAP_MSG_STARTCAP_REPLY   (128+RPCAP_MSG_STARTCAP_REQ)
 
#define RPCAP_MSG_UPDATEFILTER_REPLY   (128+RPCAP_MSG_UPDATEFILTER_REQ)
 
#define RPCAP_MSG_AUTH_REPLY   (128+RPCAP_MSG_AUTH_REQ)
 
#define RPCAP_MSG_STATS_REPLY   (128+RPCAP_MSG_STATS_REQ)
 
#define RPCAP_MSG_ENDCAP_REPLY   (128+RPCAP_MSG_ENDCAP_REQ)
 
#define RPCAP_MSG_SETSAMPLING_REPLY   (128+RPCAP_MSG_SETSAMPLING_REQ)
 
#define RPCAP_STARTCAPREQ_FLAG_PROMISC   1
 
#define RPCAP_STARTCAPREQ_FLAG_DGRAM   2
 
#define RPCAP_STARTCAPREQ_FLAG_SERVEROPEN   4
 
#define RPCAP_STARTCAPREQ_FLAG_INBOUND   8
 
#define RPCAP_STARTCAPREQ_FLAG_OUTBOUND   16
 
#define RPCAP_UPDATEFILTER_BPF   1
 
#define PCAP_ERR_NETW   1
 
#define PCAP_ERR_INITTIMEOUT   2
 
#define PCAP_ERR_AUTH   3
 
#define PCAP_ERR_FINDALLIF   4
 
#define PCAP_ERR_NOREMOTEIF   5
 
#define PCAP_ERR_OPEN   6
 
#define PCAP_ERR_UPDATEFILTER   7
 
#define PCAP_ERR_GETSTATS   8
 
#define PCAP_ERR_READEX   9
 
#define PCAP_ERR_HOSTNOAUTH   10
 
#define PCAP_ERR_REMOTEACCEPT   11
 
#define PCAP_ERR_STARTCAPTURE   12
 
#define PCAP_ERR_ENDCAPTURE   13
 
#define PCAP_ERR_RUNTIMETIMEOUT   14
 
#define PCAP_ERR_SETSAMPLING   15
 
#define PCAP_ERR_WRONGMSG   16
 
#define PCAP_ERR_WRONGVER   17
 
- - - - - - - - - - - - - -

-Typedefs

typedef unsigned char uint8
 Provides an 8-bits unsigned integer. More...
 
typedef unsigned short uint16
 Provides a 16-bits unsigned integer. More...
 
typedef unsigned int uint32
 Provides a 32-bits unsigned integer. More...
 
typedef int int32
 Provides a 32-bits integer. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

int pcap_opensource_remote (pcap_t *p, struct pcap_rmtauth *auth)
 
int pcap_startcapture_remote (pcap_t *fp)
 
int pcap_read_nocb_remote (pcap_t *p, struct pcap_pkthdr **pkt_header, u_char **pkt_data)
 
int pcap_read_remote (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 
int pcap_updatefilter_remote (pcap_t *fp, struct bpf_program *prog)
 
int pcap_setfilter_remote (pcap_t *fp, struct bpf_program *prog)
 
int pcap_stats_remote (pcap_t *p, struct pcap_stat *ps)
 
int pcap_setsampling_remote (pcap_t *p)
 
struct pcap_statpcap_stats_ex_remote (pcap_t *p)
 
void pcap_cleanup_remote (pcap_t *p)
 
void rpcap_createhdr (struct rpcap_header *header, uint8 type, uint16 value, uint32 length)
 
int rpcap_deseraddr (struct sockaddr_storage *sockaddrin, struct sockaddr_storage **sockaddrout, char *errbuf)
 
int rpcap_checkmsg (char *errbuf, SOCKET sock, struct rpcap_header *header, uint8 first,...)
 
int rpcap_senderror (SOCKET sock, char *error, unsigned short errcode, char *errbuf)
 
int rpcap_sendauth (SOCKET sock, struct pcap_rmtauth *auth, char *errbuf)
 
int rpcap_remoteact_getsock (const char *host, char *errbuf)
 
-

Detailed Description

-

This file keeps all the new definitions and typedefs that are exported to the user and that are needed for the RPCAP protocol.

-
Warning
All the RPCAP functions that are allowed to return a buffer containing the error description can return max PCAP_ERRBUF_SIZE characters. However there is no guarantees that the string will be zero-terminated. Best practice is to define the errbuf variable as a char of size 'PCAP_ERRBUF_SIZE+1' and to insert manually the termination char at the end of the buffer. This will guarantee that no buffer overflows occur even if we use the printf() to show the error on the screen.
-
-This file declares some typedefs that MUST be of a specific size. These definitions (i.e. typedefs) could need to be changed on other platforms than Intel IA32.
-
-This file defines some structures that are used to transfer data on the network. Be careful that you compiler MUST not insert padding into these structures for better alignment. These structures have been created in order to be correctly aligned to a 32 bits boundary, but be careful in any case.
- -

Definition in file pcap-remote.h.

-

Function Documentation

- -
-
- - - - - - - - -
void pcap_cleanup_remote (pcap_tp)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_opensource_remote (pcap_tp,
struct pcap_rmtauth * auth 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_read_nocb_remote (pcap_tp,
struct pcap_pkthdr ** pkt_header,
u_char ** pkt_data 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int pcap_read_remote (pcap_tp,
int cnt,
pcap_handler callback,
u_char * user 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_setfilter_remote (pcap_tfp,
struct bpf_program * prog 
)
-
- -
-
- -
-
- - - - - - - - -
int pcap_setsampling_remote (pcap_tp)
-
- -
-
- -
-
- - - - - - - - -
int pcap_startcapture_remote (pcap_tfp)
-
- -
-
- -
-
- - - - - - - - -
struct pcap_stat* pcap_stats_ex_remote (pcap_tp)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_stats_remote (pcap_tp,
struct pcap_statps 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int pcap_updatefilter_remote (pcap_tfp,
struct bpf_program * prog 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int rpcap_checkmsg (char * errbuf,
SOCKET sock,
struct rpcap_headerheader,
uint8 first,
 ... 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void rpcap_createhdr (struct rpcap_headerheader,
uint8 type,
uint16 value,
uint32 length 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int rpcap_deseraddr (struct sockaddr_storage * sockaddrin,
struct sockaddr_storage ** sockaddrout,
char * errbuf 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int rpcap_remoteact_getsock (const char * host,
char * errbuf 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
int rpcap_sendauth (SOCKET sock,
struct pcap_rmtauth * auth,
char * errbuf 
)
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int rpcap_senderror (SOCKET sock,
char * error,
unsigned short errcode,
char * errbuf 
)
-
- -
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/pcap-remote_8h_source.html b/libs/WinPcap-413-173-b4/docs/html/pcap-remote_8h_source.html deleted file mode 100644 index b78e36ec..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/pcap-remote_8h_source.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - - -WinPcap: pcap-remote.h Source File - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - - -
-
-
-
pcap-remote.h
-
-
-Go to the documentation of this file.
1 /*
-
2  * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
-
3  * Copyright (c) 2005 - 2008 CACE Technologies, Davis (California)
-
4  * All rights reserved.
-
5  *
-
6  * Redistribution and use in source and binary forms, with or without
-
7  * modification, are permitted provided that the following conditions
-
8  * are met:
-
9  *
-
10  * 1. Redistributions of source code must retain the above copyright
-
11  * notice, this list of conditions and the following disclaimer.
-
12  * 2. Redistributions in binary form must reproduce the above copyright
-
13  * notice, this list of conditions and the following disclaimer in the
-
14  * documentation and/or other materials provided with the distribution.
-
15  * 3. Neither the name of the Politecnico di Torino, CACE Technologies
-
16  * nor the names of its contributors may be used to endorse or promote
-
17  * products derived from this software without specific prior written
-
18  * permission.
-
19  *
-
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
31  *
-
32  */
-
33 
-
34 #ifndef __PCAP_REMOTE_H__
-
35 #define __PCAP_REMOTE_H__
-
36 
-
37 
-
38 #include "pcap.h"
-
39 #include "sockutils.h" // Needed for some structures (like SOCKET, sockaddr_in) which are used here
-
40 
-
41 
-
74 /*********************************************************
-
75  * *
-
76  * General definitions / typedefs for the RPCAP protocol *
-
77  * *
-
78  *********************************************************/
-
79 
-
80 // All the following structures and typedef belongs to the Private Documentation
-
85 #define RPCAP_DEFAULT_NETPORT "2002"
-
87 #define RPCAP_DEFAULT_NETPORT_ACTIVE "2003"
-
88 #define RPCAP_DEFAULT_NETADDR ""
-
89 #define RPCAP_VERSION 0
-
90 #define RPCAP_TIMEOUT_INIT 90
-
91 #define RPCAP_TIMEOUT_RUNTIME 180
-
92 #define RPCAP_ACTIVE_WAIT 30
-
93 #define RPCAP_SUSPEND_WRONGAUTH 1
-
99 #define RPCAP_NETBUF_SIZE 64000
-
100 
-
101 
-
109 #define RPCAP_HOSTLIST_SEP " ,;\n\r"
-
110 
-
111 
-
112 
-
113 
-
114 // WARNING: These could need to be changed on other platforms
-
115 typedef unsigned char uint8;
-
116 typedef unsigned short uint16;
-
117 typedef unsigned int uint32;
-
118 typedef int int32;
-
119 
-
120 
-
121 
-
122 
- -
134 {
-
135  struct sockaddr_storage host;
-
136  SOCKET sockctrl;
-
137  struct activehosts *next;
-
138 };
-
139 
-
140 
-
141 /*********************************************************
-
142  * *
-
143  * Protocol messages formats *
-
144  * *
-
145  *********************************************************/
-
146 // WARNING Take care you compiler does not insert padding for better alignments into these structs
-
147 
-
148 
- -
151 {
- - - - -
156 };
-
157 
-
158 
- -
161 {
- - - - - -
167 };
-
168 
-
169 
- -
172 {
-
173  struct sockaddr_storage addr;
-
174  struct sockaddr_storage netmask;
-
175  struct sockaddr_storage broadaddr;
-
176  struct sockaddr_storage dstaddr;
-
177 };
-
178 
-
179 
-
180 
- -
187 {
- - -
190 };
-
191 
-
192 
-
193 
- -
196 {
- - - - -
201 };
-
202 
-
203 
- -
206 {
- - - -
210 };
-
211 
-
212 
- -
220 {
- - - - - -
226 };
-
227 
-
228 
- -
231 {
- - - -
235 };
-
236 
-
237 
- -
240 {
- - - - -
245 };
-
246 
-
247 
- -
250 {
- - - - -
255 };
-
256 
-
257 
- -
260 {
- - - - -
265 };
-
266 
-
267 
- -
270 {
- - - - -
275 };
-
276 
-
277 
-
278 
-
279 // Messages field coding
-
280 #define RPCAP_MSG_ERROR 1
-
281 #define RPCAP_MSG_FINDALLIF_REQ 2
-
282 #define RPCAP_MSG_OPEN_REQ 3
-
283 #define RPCAP_MSG_STARTCAP_REQ 4
-
284 #define RPCAP_MSG_UPDATEFILTER_REQ 5
-
285 #define RPCAP_MSG_CLOSE 6
-
286 #define RPCAP_MSG_PACKET 7
-
287 #define RPCAP_MSG_AUTH_REQ 8
-
288 #define RPCAP_MSG_STATS_REQ 9
-
289 #define RPCAP_MSG_ENDCAP_REQ 10
-
290 #define RPCAP_MSG_SETSAMPLING_REQ 11
-
292 #define RPCAP_MSG_FINDALLIF_REPLY (128+RPCAP_MSG_FINDALLIF_REQ)
-
293 #define RPCAP_MSG_OPEN_REPLY (128+RPCAP_MSG_OPEN_REQ)
-
294 #define RPCAP_MSG_STARTCAP_REPLY (128+RPCAP_MSG_STARTCAP_REQ)
-
295 #define RPCAP_MSG_UPDATEFILTER_REPLY (128+RPCAP_MSG_UPDATEFILTER_REQ)
-
296 #define RPCAP_MSG_AUTH_REPLY (128+RPCAP_MSG_AUTH_REQ)
-
297 #define RPCAP_MSG_STATS_REPLY (128+RPCAP_MSG_STATS_REQ)
-
298 #define RPCAP_MSG_ENDCAP_REPLY (128+RPCAP_MSG_ENDCAP_REQ)
-
299 #define RPCAP_MSG_SETSAMPLING_REPLY (128+RPCAP_MSG_SETSAMPLING_REQ)
-
301 #define RPCAP_STARTCAPREQ_FLAG_PROMISC 1
-
302 #define RPCAP_STARTCAPREQ_FLAG_DGRAM 2
-
303 #define RPCAP_STARTCAPREQ_FLAG_SERVEROPEN 4
-
304 #define RPCAP_STARTCAPREQ_FLAG_INBOUND 8
-
305 #define RPCAP_STARTCAPREQ_FLAG_OUTBOUND 16
-
307 #define RPCAP_UPDATEFILTER_BPF 1
-
310 // Network error codes
-
311 #define PCAP_ERR_NETW 1
-
312 #define PCAP_ERR_INITTIMEOUT 2
-
313 #define PCAP_ERR_AUTH 3
-
314 #define PCAP_ERR_FINDALLIF 4
-
315 #define PCAP_ERR_NOREMOTEIF 5
-
316 #define PCAP_ERR_OPEN 6
-
317 #define PCAP_ERR_UPDATEFILTER 7
-
318 #define PCAP_ERR_GETSTATS 8
-
319 #define PCAP_ERR_READEX 9
-
320 #define PCAP_ERR_HOSTNOAUTH 10
-
321 #define PCAP_ERR_REMOTEACCEPT 11
-
322 #define PCAP_ERR_STARTCAPTURE 12
-
323 #define PCAP_ERR_ENDCAPTURE 13
-
324 #define PCAP_ERR_RUNTIMETIMEOUT 14
-
325 #define PCAP_ERR_SETSAMPLING 15
-
326 #define PCAP_ERR_WRONGMSG 16
-
327 #define PCAP_ERR_WRONGVER 17 // end of private documentation
-
331 
-
332 
-
333 
-
334 
-
335 
-
336 
-
337 /*********************************************************
-
338  * *
-
339  * Exported funtion prototypes *
-
340  * *
-
341  *********************************************************/
-
342 int pcap_opensource_remote(pcap_t *p, struct pcap_rmtauth *auth);
- -
344 
-
345 int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr **pkt_header, u_char **pkt_data);
-
346 int pcap_read_remote(pcap_t *p, int cnt, pcap_handler callback, u_char *user);
-
347 int pcap_updatefilter_remote(pcap_t *fp, struct bpf_program *prog);
-
348 int pcap_setfilter_remote(pcap_t *fp, struct bpf_program *prog);
-
349 int pcap_stats_remote(pcap_t *p, struct pcap_stat *ps);
- - -
352 void pcap_cleanup_remote(pcap_t *p);
-
353 
-
354 void rpcap_createhdr(struct rpcap_header *header, uint8 type, uint16 value, uint32 length);
-
355 int rpcap_deseraddr(struct sockaddr_storage *sockaddrin, struct sockaddr_storage **sockaddrout, char *errbuf);
-
356 int rpcap_checkmsg(char *errbuf, SOCKET sock, struct rpcap_header *header, uint8 first, ...);
-
357 int rpcap_senderror(SOCKET sock, char *error, unsigned short errcode, char *errbuf);
-
358 int rpcap_sendauth(SOCKET sock, struct pcap_rmtauth *auth, char *errbuf);
-
359 
-
360 int rpcap_remoteact_getsock(const char *host, char *errbuf);
-
361 
-
362 #endif
-
363 
-
Structure that is needed to set sampling parameters.
Definition: pcap-remote.h:269
-
uint32 ifrecv
Packets received by the kernel filter (i.e. pcap_stats.ps_recv)
Definition: pcap-remote.h:261
-
uint32 plen
Length of the payload of this RPCAP message.
Definition: pcap-remote.h:155
-
int pcap_setsampling_remote(pcap_t *p)
-
struct sockaddr_storage broadaddr
Broadcast address for that address.
Definition: pcap-remote.h:175
-
Header of a packet in the dump file.
Definition: incs/pcap.h:126
-
uint16 value
Message-dependent value (not always used)
Definition: pcap-remote.h:154
-
Format of the reply message that devoted to start a remote capture (startcap reply command) ...
Definition: pcap-remote.h:205
-
struct sockaddr_storage netmask
Netmask for that address.
Definition: pcap-remote.h:174
-
int pcap_read_remote(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
-
int pcap_updatefilter_remote(pcap_t *fp, struct bpf_program *prog)
-
uint16 dummy
Must be zero.
Definition: pcap-remote.h:209
-
uint16 slen1
Length of the first authentication item (e.g. username)
Definition: pcap-remote.h:253
-
uint32 krnldrop
Packets dropped by the kernel filter (i.e. pcap_stats.ps_drop)
Definition: pcap-remote.h:263
-
uint16 dummy
Must be zero.
Definition: pcap-remote.h:252
-
struct pcap pcap_t
Descriptor of an open capture instance. This structure is opaque to the user, that handles its conten...
Definition: incs/pcap.h:70
-
uint8 ver
RPCAP version number.
Definition: pcap-remote.h:152
-
uint16 filtertype
type of the filter transferred (BPF instructions, ...)
Definition: pcap-remote.h:232
-
Format of the message for the interface description (findalldevs command)
Definition: pcap-remote.h:160
-
void(* pcap_handler)(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
Prototype of the callback function that receives the packets.
Definition: funcs/pcap.h:27
-
uint8 method
Sampling method.
Definition: pcap-remote.h:271
-
uint32 svrcapt
Packets captured by the RPCAP daemon and sent on the network.
Definition: pcap-remote.h:264
-
Keeps a list of all the opened connections in the active mode.
Definition: pcap-remote.h:133
-
Structure that keeps statistical values on an interface.
Definition: incs/pcap.h:136
-
uint16 dummy
Must be zero.
Definition: pcap-remote.h:166
-
SOCKET sockctrl
Definition: pcap-remote.h:136
-
Structure that keeps the data required for the authentication on the remote host. ...
Definition: pcap-remote.h:249
-
uint32 read_timeout
Read timeout in milliseconds.
Definition: pcap-remote.h:198
-
unsigned short uint16
Provides a 16-bits unsigned integer.
Definition: pcap-remote.h:116
-
int pcap_stats_remote(pcap_t *p, struct pcap_stat *ps)
-
uint16 slen2
Length of the second authentication item (e.g. password)
Definition: pcap-remote.h:254
-
uint32 nitems
Number of items contained into the filter (e.g. BPF instructions for BPF filters) ...
Definition: pcap-remote.h:234
-
uint32 value
Parameter related to the sampling method.
Definition: pcap-remote.h:274
-
int32 k
instruction-dependent value
Definition: pcap-remote.h:244
-
int32 linktype
Link type.
Definition: pcap-remote.h:188
-
uint16 dummy2
Must be zero.
Definition: pcap-remote.h:273
-
uint32 flags
Interface flags.
Definition: pcap-remote.h:164
-
int rpcap_sendauth(SOCKET sock, struct pcap_rmtauth *auth, char *errbuf)
-
Common header for all the RPCAP messages.
Definition: pcap-remote.h:150
-
int int32
Provides a 32-bits integer.
Definition: pcap-remote.h:118
-
struct activehosts * next
Definition: pcap-remote.h:137
-
uint16 dummy
Must be zero.
Definition: pcap-remote.h:233
-
unsigned char uint8
Provides an 8-bits unsigned integer.
Definition: pcap-remote.h:115
-
uint32 timestamp_usec
'struct timeval' compatible, it represents the 'tv_usec' field
Definition: pcap-remote.h:222
-
int pcap_startcapture_remote(pcap_t *fp)
-
Format of the message that starts a remote capture (startcap command)
Definition: pcap-remote.h:195
-
int rpcap_senderror(SOCKET sock, char *error, unsigned short errcode, char *errbuf)
-
uint32 npkt
Ordinal number of the packet (i.e. the first one captured has '1', the second one '2'...
Definition: pcap-remote.h:225
-
uint16 code
opcode of the instuction
Definition: pcap-remote.h:241
-
Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_fi...
Definition: pcap-remote.h:239
-
uint16 type
Authentication type.
Definition: pcap-remote.h:251
-
uint32 len
Real length this packet (off wire)
Definition: pcap-remote.h:224
-
General header used for the pcap_setfilter() command; keeps just the number of BPF instructions...
Definition: pcap-remote.h:230
-
uint16 portdata
Network port on which the server is waiting at (passive mode only)
Definition: pcap-remote.h:208
-
struct sockaddr_storage addr
Network address.
Definition: pcap-remote.h:173
-
uint8 type
RPCAP message type (error, findalldevs, ...)
Definition: pcap-remote.h:153
-
uint16 namelen
Length of the interface name.
Definition: pcap-remote.h:162
-
Format of the message for the address listing (findalldevs command)
Definition: pcap-remote.h:171
-
uint16 flags
Flags (see RPCAP_STARTCAPREQ_FLAG_xxx)
Definition: pcap-remote.h:199
-
int rpcap_checkmsg(char *errbuf, SOCKET sock, struct rpcap_header *header, uint8 first,...)
-
uint32 caplen
Length of portion present in the capture.
Definition: pcap-remote.h:223
-
int pcap_setfilter_remote(pcap_t *fp, struct bpf_program *prog)
-
void rpcap_createhdr(struct rpcap_header *header, uint8 type, uint16 value, uint32 length)
-
int rpcap_deseraddr(struct sockaddr_storage *sockaddrin, struct sockaddr_storage **sockaddrout, char *errbuf)
-
Format of the message of the connection opening reply (open command).
Definition: pcap-remote.h:186
-
void pcap_cleanup_remote(pcap_t *p)
-
struct sockaddr_storage dstaddr
P2P destination address for that address.
Definition: pcap-remote.h:176
-
uint32 timestamp_sec
'struct timeval' compatible, it represents the 'tv_sec' field
Definition: pcap-remote.h:221
-
int pcap_read_nocb_remote(pcap_t *p, struct pcap_pkthdr **pkt_header, u_char **pkt_data)
-
struct sockaddr_storage host
Definition: pcap-remote.h:135
-
struct pcap_stat * pcap_stats_ex_remote(pcap_t *p)
-
Format of the header which encapsulates captured packets when transmitted on the network.
Definition: pcap-remote.h:219
-
unsigned int uint32
Provides a 32-bits unsigned integer.
Definition: pcap-remote.h:117
-
int pcap_opensource_remote(pcap_t *p, struct pcap_rmtauth *auth)
-
uint8 jf
relative offset to jump to in case of 'false'
Definition: pcap-remote.h:243
-
uint16 portdata
Network port on which the client is waiting at (if 'serveropen')
Definition: pcap-remote.h:200
-
int rpcap_remoteact_getsock(const char *host, char *errbuf)
-
uint32 snaplen
Length of the snapshot (number of bytes to capture for each packet)
Definition: pcap-remote.h:197
-
Structure that keeps the statistics about the number of packets captured, dropped, etc.
Definition: pcap-remote.h:259
-
int32 tzoff
Timezone offset.
Definition: pcap-remote.h:189
-
int32 bufsize
Size of the user buffer allocated by WinPcap; it can be different from the one we chose...
Definition: pcap-remote.h:207
-
uint16 naddr
Number of addresses.
Definition: pcap-remote.h:165
-
uint8 dummy1
Must be zero.
Definition: pcap-remote.h:272
-
uint16 desclen
Length of the interface description.
Definition: pcap-remote.h:163
-
uint8 jt
relative offset to jump to in case of 'true'
Definition: pcap-remote.h:242
-
uint32 ifdrop
Packets dropped by the network interface (e.g. not enough buffers) (i.e. pcap_stats.ps_ifdrop)
Definition: pcap-remote.h:262
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structJIT__BPF__Filter.html b/libs/WinPcap-413-173-b4/docs/html/structJIT__BPF__Filter.html deleted file mode 100644 index 60e35656..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structJIT__BPF__Filter.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - -WinPcap: JIT_BPF_Filter Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Structure describing a x86 filtering program created by the jitter. - More...

- -

#include <jitter.h>

- - - - - - - -

-Data Fields

BPF_filter_function Function
 The x86 filtering binary, in the form of a BPF_filter_function. More...
 
PINT mem
 
-

Detailed Description

-

Structure describing a x86 filtering program created by the jitter.

- -

Definition at line 95 of file jitter.h.

-

Field Documentation

- -
-
- - - - -
BPF_filter_function Function
-
- -

The x86 filtering binary, in the form of a BPF_filter_function.

- -

Definition at line 96 of file jitter.h.

- -
-
- -
-
- - - - -
PINT mem
-
- -

Definition at line 97 of file jitter.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structPacketHeader.html b/libs/WinPcap-413-173-b4/docs/html/structPacketHeader.html deleted file mode 100644 index e95f0691..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structPacketHeader.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - -WinPcap: PacketHeader Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Structure prepended to each packet in the kernel buffer pool. - More...

- -

#include <Packet.h>

- - - - - - - - -

-Data Fields

ULONG SN
 Sequence number of the packet. More...
 
struct bpf_hdr header
 bpf header, created by the tap, and copied unmodified to user level programs. More...
 
-

Detailed Description

-

Structure prepended to each packet in the kernel buffer pool.

-

Each packet in one of the kernel buffers is prepended by this header. It encapsulates the bpf_header, which will be passed to user level programs, as well as the sequence number of the packet, set by the producer (the tap function), and used by the consumer (the read function) to "reorder" the packets contained in the various kernel buffers.

- -

Definition at line 341 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
struct bpf_hdr header
-
- -

bpf header, created by the tap, and copied unmodified to user level programs.

- -

Definition at line 344 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG SN
-
- -

Sequence number of the packet.

- -

Definition at line 343 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/struct__DEVICE__EXTENSION.html b/libs/WinPcap-413-173-b4/docs/html/struct__DEVICE__EXTENSION.html deleted file mode 100644 index 0e42f635..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/struct__DEVICE__EXTENSION.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -WinPcap: _DEVICE_EXTENSION Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Port device extension. - More...

- -

#include <Packet.h>

- - - - - - - -

-Data Fields

NDIS_STRING AdapterName
 Name of the adapter. More...
 
PWSTR ExportString
 
-

Detailed Description

-

Port device extension.

-

Structure containing some data relative to every adapter on which NPF is bound.

- -

Definition at line 196 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
NDIS_STRING AdapterName
-
- -

Name of the adapter.

- -

Definition at line 197 of file Packet.h.

- -
-
- -
-
- - - - -
PWSTR ExportString
-
-

Name of the exported device, i.e. name that the applications will use to open this adapter through WinPcap.

- -

Definition at line 198 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/struct__INTERNAL__REQUEST.html b/libs/WinPcap-413-173-b4/docs/html/struct__INTERNAL__REQUEST.html deleted file mode 100644 index 78372a1d..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/struct__INTERNAL__REQUEST.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - -WinPcap: _INTERNAL_REQUEST Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Stores an OID request. - More...

- -

#include <Packet.h>

- - - - - - - - - - - - -

-Data Fields

LIST_ENTRY ListElement
 Used to handle lists of requests. More...
 
NDIS_EVENT InternalRequestCompletedEvent
 
NDIS_REQUEST Request
 The structure with the actual request, that will be passed to NdisRequest(). More...
 
NDIS_STATUS RequestStatus
 
-

Detailed Description

-

Stores an OID request.

-

This structure is used by the driver to perform OID query or set operations on the underlying NIC driver. The OID operations be performed usually only by network drivers, but NPF exports this mechanism to user-level applications through an IOCTL interface. The driver uses this structure to wrap a NDIS_REQUEST structure. This allows to handle correctly the callback structure of NdisRequest(), handling multiple requests and maintaining information about the IRPs to complete.

- -

Definition at line 163 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
NDIS_EVENT InternalRequestCompletedEvent
-
- -

Definition at line 167 of file Packet.h.

- -
-
- -
-
- - - - -
LIST_ENTRY ListElement
-
- -

Used to handle lists of requests.

- -

Definition at line 164 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_REQUEST Request
-
- -

The structure with the actual request, that will be passed to NdisRequest().

- -

Definition at line 168 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_STATUS RequestStatus
-
- -

Definition at line 169 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/struct__OPEN__INSTANCE.html b/libs/WinPcap-413-173-b4/docs/html/struct__OPEN__INSTANCE.html deleted file mode 100644 index 11514d35..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/struct__OPEN__INSTANCE.html +++ /dev/null @@ -1,1001 +0,0 @@ - - - - - - -WinPcap: _OPEN_INSTANCE Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Contains the state of a running instance of the NPF driver. - More...

- -

#include <Packet.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

PDEVICE_EXTENSION DeviceExtension
 
NDIS_HANDLE AdapterHandle
 NDIS idetifier of the adapter used by this instance. More...
 
UINT Medium
 
NDIS_HANDLE PacketPool
 Pool of NDIS_PACKET structures used to transfer the packets from and to the NIC driver. More...
 
KSPIN_LOCK RequestSpinLock
 SpinLock used to synchronize the OID requests. More...
 
LIST_ENTRY RequestList
 List of pending OID requests. More...
 
LIST_ENTRY ResetIrpList
 List of pending adapter reset requests. More...
 
INTERNAL_REQUEST Requests [MAX_REQUESTS]
 Array of structures that wrap every single OID request. More...
 
PMDL BufferMdl
 Pointer to a Memory descriptor list (MDL) that maps the circular buffer's memory. More...
 
PKEVENT ReadEvent
 Pointer to the event on which the read calls on this instance must wait. More...
 
PUCHAR bpfprogram
 
UINT MinToCopy
 
LARGE_INTEGER TimeOut
 
int mode
 Working mode of the driver. See PacketSetMode() for details. More...
 
LARGE_INTEGER Nbytes
 Amount of bytes accepted by the filter when this instance is in statistical mode. More...
 
LARGE_INTEGER Npackets
 Number of packets accepted by the filter when this instance is in statistical mode. More...
 
NDIS_SPIN_LOCK CountersLock
 SpinLock that protects the statistical mode counters. More...
 
UINT Nwrites
 
ULONG Multiple_Write_Counter
 Counts the number of times a single write has already physically repeated. More...
 
NDIS_EVENT WriteEvent
 Event used to synchronize the multiple write process. More...
 
BOOLEAN WriteInProgress
 
NDIS_SPIN_LOCK WriteLock
 SpinLock that protects the WriteInProgress variable. More...
 
NDIS_EVENT NdisRequestEvent
 Event used to synchronize I/O requests with the callback structure of NDIS. More...
 
BOOLEAN SkipSentPackets
 True if this instance should not capture back the packets that it transmits. More...
 
NDIS_STATUS IOStatus
 Maintains the status of and OID request call, that will be passed to the application. More...
 
HANDLE DumpFileHandle
 Handle of the file used in dump mode. More...
 
PFILE_OBJECT DumpFileObject
 Pointer to the object of the file used in dump mode. More...
 
PKTHREAD DumpThreadObject
 Pointer to the object of the thread used in dump mode. More...
 
HANDLE DumpThreadHandle
 Handle of the thread created by dump mode to asynchronously move the buffer to disk. More...
 
NDIS_EVENT DumpEvent
 Event used to synchronize the dump thread with the tap when the instance is in dump mode. More...
 
LARGE_INTEGER DumpOffset
 Current offset in the dump file. More...
 
UNICODE_STRING DumpFileName
 String containing the name of the dump file. More...
 
UINT MaxDumpBytes
 
UINT MaxDumpPacks
 
BOOLEAN DumpLimitReached
 
NDIS_SPIN_LOCK MachineLock
 SpinLock that protects the BPF filter and the TME engine, if in use. More...
 
UINT MaxFrameSize
 
CpuPrivateData CpuData [sizeof(KAFFINITY)*8]
 Pool of kernel buffer structures, one for each CPU. More...
 
ULONG ReaderSN
 Sequence number of the next packet to be read from the pool of kernel buffers. More...
 
ULONG WriterSN
 
ULONG Size
 Size of each kernel buffer contained in the CpuData field. More...
 
ULONG AdapterHandleUsageCounter
 
NDIS_SPIN_LOCK AdapterHandleLock
 
ULONG AdapterBindingStatus
 Specifies if NPF is still bound to the adapter used by this instance, it's unbinding or it's not bound. More...
 
NDIS_EVENT NdisOpenCloseCompleteEvent
 
NDIS_EVENT NdisWriteCompleteEvent
 Event that is signalled when all the packets have been successfully sent by NdisSend (and corresponfing sendComplete has been called) More...
 
NTSTATUS OpenCloseStatus
 
ULONG TransmitPendingPackets
 Specifies the number of packets that are pending to be transmitted, i.e. have been submitted to NdisSendXXX but the SendComplete has not been called yet. More...
 
ULONG NumPendingIrps
 
BOOLEAN ClosePending
 
NDIS_SPIN_LOCK OpenInUseLock
 
-

Detailed Description

-

Contains the state of a running instance of the NPF driver.

-

This is the most important structure of NPF: it is used by almost all the functions of the driver. An _OPEN_INSTANCE structure is associated with every user-level session, allowing concurrent access to the driver.

- -

Definition at line 240 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
ULONG AdapterBindingStatus
-
- -

Specifies if NPF is still bound to the adapter used by this instance, it's unbinding or it's not bound.

- -

Definition at line 315 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_HANDLE AdapterHandle
-
- -

NDIS idetifier of the adapter used by this instance.

- -

Definition at line 244 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK AdapterHandleLock
-
- -

Definition at line 314 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG AdapterHandleUsageCounter
-
- -

Definition at line 313 of file Packet.h.

- -
-
- -
-
- - - - -
PUCHAR bpfprogram
-
-

Pointer to the filtering pseudo-code associated with current instance of the driver. This code is used only in particular situations (for example when the packet received from the NIC driver is stored in two non-consecutive buffers. In normal situations the filtering routine created by the JIT compiler and pointed by the next field is used. See NPF driver internals manual for details on the filtering process.

- -

Definition at line 254 of file Packet.h.

- -
-
- -
-
- - - - -
PMDL BufferMdl
-
- -

Pointer to a Memory descriptor list (MDL) that maps the circular buffer's memory.

- -

Definition at line 252 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN ClosePending
-
- -

Definition at line 322 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK CountersLock
-
- -

SpinLock that protects the statistical mode counters.

- -

Definition at line 271 of file Packet.h.

- -
-
- -
-
- - - - -
CpuPrivateData CpuData[sizeof(KAFFINITY)*8]
-
- -

Pool of kernel buffer structures, one for each CPU.

- -

Definition at line 308 of file Packet.h.

- -
-
- -
-
- - - - -
PDEVICE_EXTENSION DeviceExtension
-
-

Pointer to the _DEVICE_EXTENSION structure of the device on which the instance is bound.

- -

Definition at line 242 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT DumpEvent
-
- -

Event used to synchronize the dump thread with the tap when the instance is in dump mode.

- -

Definition at line 286 of file Packet.h.

- -
-
- -
-
- - - - -
HANDLE DumpFileHandle
-
- -

Handle of the file used in dump mode.

- -

Definition at line 282 of file Packet.h.

- -
-
- -
-
- - - - -
UNICODE_STRING DumpFileName
-
- -

String containing the name of the dump file.

- -

Definition at line 288 of file Packet.h.

- -
-
- -
-
- - - - -
PFILE_OBJECT DumpFileObject
-
- -

Pointer to the object of the file used in dump mode.

- -

Definition at line 283 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN DumpLimitReached
-
-

TRUE if the maximum dimension of the dump file (MaxDumpBytes or MaxDumpPacks) is reached.

- -

Definition at line 294 of file Packet.h.

- -
-
- -
-
- - - - -
LARGE_INTEGER DumpOffset
-
- -

Current offset in the dump file.

- -

Definition at line 287 of file Packet.h.

- -
-
- -
-
- - - - -
HANDLE DumpThreadHandle
-
- -

Handle of the thread created by dump mode to asynchronously move the buffer to disk.

- -

Definition at line 285 of file Packet.h.

- -
-
- -
-
- - - - -
PKTHREAD DumpThreadObject
-
- -

Pointer to the object of the thread used in dump mode.

- -

Definition at line 284 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_STATUS IOStatus
-
- -

Maintains the status of and OID request call, that will be passed to the application.

- -

Definition at line 281 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK MachineLock
-
- -

SpinLock that protects the BPF filter and the TME engine, if in use.

- -

Definition at line 301 of file Packet.h.

- -
-
- -
-
- - - - -
UINT MaxDumpBytes
-
-

Maximum dimension in bytes of the dump file. If the dump file reaches this size it will be closed. A value of 0 means unlimited size.

- -

Definition at line 289 of file Packet.h.

- -
-
- -
-
- - - - -
UINT MaxDumpPacks
-
-

Maximum number of packets that will be saved in the dump file. If this number of packets is reached the dump will be closed. A value of 0 means unlimited number of packets.

- -

Definition at line 291 of file Packet.h.

- -
-
- -
-
- - - - -
UINT MaxFrameSize
-
-

Maximum frame size that the underlying MAC acceptes. Used to perform a check on the size of the frames sent with NPF_Write() or NPF_BufferedWrite().

- -

Definition at line 302 of file Packet.h.

- -
-
- -
-
- - - - -
UINT Medium
-
-

Type of physical medium the underlying NDIS driver uses. See the documentation of NdisOpenAdapter in the MS DDK for details.

- -

Definition at line 245 of file Packet.h.

- -
-
- -
-
- - - - -
UINT MinToCopy
-
-

Minimum amount of data in the circular buffer that unlocks a read. Set with the BIOCSMINTOCOPY IOCTL.

- -

Definition at line 263 of file Packet.h.

- -
-
- -
-
- - - - -
int mode
-
- -

Working mode of the driver. See PacketSetMode() for details.

- -

Definition at line 268 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Multiple_Write_Counter
-
- -

Counts the number of times a single write has already physically repeated.

- -

Definition at line 274 of file Packet.h.

- -
-
- -
-
- - - - -
LARGE_INTEGER Nbytes
-
- -

Amount of bytes accepted by the filter when this instance is in statistical mode.

- -

Definition at line 269 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT NdisOpenCloseCompleteEvent
-
- -

Definition at line 317 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT NdisRequestEvent
-
- -

Event used to synchronize I/O requests with the callback structure of NDIS.

- -

Definition at line 279 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT NdisWriteCompleteEvent
-
- -

Event that is signalled when all the packets have been successfully sent by NdisSend (and corresponfing sendComplete has been called)

- -

Definition at line 318 of file Packet.h.

- -
-
- -
-
- - - - -
LARGE_INTEGER Npackets
-
- -

Number of packets accepted by the filter when this instance is in statistical mode.

- -

Definition at line 270 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG NumPendingIrps
-
- -

Definition at line 321 of file Packet.h.

- -
-
- -
-
- - - - -
UINT Nwrites
-
-

Number of times a single write must be physically repeated. See NPF driver internals manual for an explanation

- -

Definition at line 272 of file Packet.h.

- -
-
- -
-
- - - - -
NTSTATUS OpenCloseStatus
-
- -

Definition at line 319 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK OpenInUseLock
-
- -

Definition at line 323 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_HANDLE PacketPool
-
- -

Pool of NDIS_PACKET structures used to transfer the packets from and to the NIC driver.

- -

Definition at line 247 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG ReaderSN
-
- -

Sequence number of the next packet to be read from the pool of kernel buffers.

- -

Definition at line 309 of file Packet.h.

- -
-
- -
-
- - - - -
PKEVENT ReadEvent
-
- -

Pointer to the event on which the read calls on this instance must wait.

- -

Definition at line 253 of file Packet.h.

- -
-
- -
-
- - - - -
LIST_ENTRY RequestList
-
- -

List of pending OID requests.

- -

Definition at line 249 of file Packet.h.

- -
-
- -
-
- - - - -
INTERNAL_REQUEST Requests[MAX_REQUESTS]
-
- -

Array of structures that wrap every single OID request.

- -

Definition at line 251 of file Packet.h.

- -
-
- -
-
- - - - -
KSPIN_LOCK RequestSpinLock
-
- -

SpinLock used to synchronize the OID requests.

- -

Definition at line 248 of file Packet.h.

- -
-
- -
-
- - - - -
LIST_ENTRY ResetIrpList
-
- -

List of pending adapter reset requests.

- -

Definition at line 250 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Size
-
- -

Size of each kernel buffer contained in the CpuData field.

- -

Definition at line 312 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN SkipSentPackets
-
- -

True if this instance should not capture back the packets that it transmits.

- -

Definition at line 280 of file Packet.h.

- -
-
- -
-
- - - - -
LARGE_INTEGER TimeOut
-
-

Timeout after which a read is released, also if the amount of data in the buffer is less than MinToCopy. Set with the BIOCSRTIMEOUT IOCTL.

- -

Definition at line 265 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG TransmitPendingPackets
-
- -

Specifies the number of packets that are pending to be transmitted, i.e. have been submitted to NdisSendXXX but the SendComplete has not been called yet.

- -

Definition at line 320 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_EVENT WriteEvent
-
- -

Event used to synchronize the multiple write process.

- -

Definition at line 275 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN WriteInProgress
-
-

True if a write is currently in progress. NPF currently allows a single wite on the same open instance.

- -

Definition at line 276 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK WriteLock
-
- -

SpinLock that protects the WriteInProgress variable.

- -

Definition at line 278 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG WriterSN
-
-

Sequence number of the next packet to be written in the pool of kernel buffers. These two sequence numbers are unique for each capture instance.

- -

Definition at line 310 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/struct__PACKET__OID__DATA.html b/libs/WinPcap-413-173-b4/docs/html/struct__PACKET__OID__DATA.html deleted file mode 100644 index 3e4cdf92..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/struct__PACKET__OID__DATA.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - -WinPcap: _PACKET_OID_DATA Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Structure containing an OID request. - More...

- -

#include <Packet.h>

- - - - - - - - - -

-Data Fields

ULONG Oid
 
ULONG Length
 Length of the data field. More...
 
UCHAR Data [1]
 
-

Detailed Description

-

Structure containing an OID request.

-

It is used by the PacketRequest() function to send an OID to the interface card driver. It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, the list of the multicast groups defined on it, and so on.

- -

Definition at line 143 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
UCHAR Data[1]
-
-

variable-lenght field that contains the information passed to or received from the adapter.

- -

Definition at line 147 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Length
-
- -

Length of the data field.

- -

Definition at line 146 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Oid
-
-

OID code. See the Microsoft DDK documentation or the file ntddndis.h for a complete list of valid codes.

- -

Definition at line 144 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/struct__PACKET__RESERVED.html b/libs/WinPcap-413-173-b4/docs/html/struct__PACKET__RESERVED.html deleted file mode 100644 index 6d2e25c2..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/struct__PACKET__RESERVED.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - -WinPcap: _PACKET_RESERVED Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Contains a NDIS packet. - More...

- -

#include <Packet.h>

- - - - - - - - - - - - - - - - -

-Data Fields

LIST_ENTRY ListElement
 Used to handle lists of packets. More...
 
PIRP Irp
 Irp that performed the request. More...
 
PMDL pMdl
 MDL mapping the buffer of the packet. More...
 
BOOLEAN FreeBufAfterWrite
 
ULONG Cpu
 The CPU on which the packet was pulled out of the linked list of free packets. More...
 
-

Detailed Description

-

Contains a NDIS packet.

-

The driver uses this structure to wrap a NDIS_PACKET structure. This allows to handle correctly the callback structure of NdisTransferData(), handling multiple requests and maintaining information about the IRPs to complete.

- -

Definition at line 180 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
ULONG Cpu
-
- -

The CPU on which the packet was pulled out of the linked list of free packets.

- -

Definition at line 186 of file Packet.h.

- -
-
- -
-
- - - - -
BOOLEAN FreeBufAfterWrite
-
-

True if the memory buffer associated with the packet must be freed after a call to NdisSend().

- -

Definition at line 184 of file Packet.h.

- -
-
- -
-
- - - - -
PIRP Irp
-
- -

Irp that performed the request.

- -

Definition at line 182 of file Packet.h.

- -
-
- -
-
- - - - -
LIST_ENTRY ListElement
-
- -

Used to handle lists of packets.

- -

Definition at line 181 of file Packet.h.

- -
-
- -
-
- - - - -
PMDL pMdl
-
- -

MDL mapping the buffer of the packet.

- -

Definition at line 183 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/struct____CPU__Private__Data.html b/libs/WinPcap-413-173-b4/docs/html/struct____CPU__Private__Data.html deleted file mode 100644 index 5372df41..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/struct____CPU__Private__Data.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - -WinPcap: __CPU_Private_Data Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Kernel buffer of each CPU. - More...

- -

#include <Packet.h>

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

ULONG P
 Zero-based index of the producer in the buffer. It indicates the first free byte to be written. More...
 
ULONG C
 Zero-based index of the consumer in the buffer. It indicates the first free byte to be read. More...
 
ULONG Free
 Number of the free bytes in the buffer. More...
 
PUCHAR Buffer
 Pointer to the kernel buffer used to capture packets. More...
 
ULONG Accepted
 
ULONG Received
 
ULONG Dropped
 
NDIS_SPIN_LOCK BufferLock
 It protects the buffer associated with this CPU. More...
 
PMDL TransferMdl1
 MDL used to map the portion of the buffer that will contain an incoming packet. More...
 
PMDL TransferMdl2
 Second MDL used to map the portion of the buffer that will contain an incoming packet. More...
 
ULONG NewP
 Used by NdisTransferData() (when we call NdisTransferData, p index must be updated only in the TransferDataComplete. More...
 
-

Detailed Description

-

Kernel buffer of each CPU.

-

Structure containing the kernel buffer (and other CPU related fields) used to capture packets.

- -

Definition at line 207 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
ULONG Accepted
-
-

Number of packet that current capture instance acepted, from its opening. A packet is accepted if it passes the filter and fits in the buffer. Accepted packets are the ones that reach the application. This number is related to the particular CPU this structure is referring to.

- -

Definition at line 213 of file Packet.h.

- -
-
- -
-
- - - - -
PUCHAR Buffer
-
- -

Pointer to the kernel buffer used to capture packets.

- -

Definition at line 212 of file Packet.h.

- -
-
- -
-
- - - - -
NDIS_SPIN_LOCK BufferLock
-
- -

It protects the buffer associated with this CPU.

- -

Definition at line 225 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG C
-
- -

Zero-based index of the consumer in the buffer. It indicates the first free byte to be read.

- -

Definition at line 210 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Dropped
-
-

Number of packet that current instance had to drop, from its opening. A packet is dropped if there is no more space to store it in the circular buffer that the driver associates to current instance. This number is related to the particular CPU this structure is referring to.

- -

Definition at line 221 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Free
-
- -

Number of the free bytes in the buffer.

- -

Definition at line 211 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG NewP
-
- -

Used by NdisTransferData() (when we call NdisTransferData, p index must be updated only in the TransferDataComplete.

- -

Definition at line 228 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG P
-
- -

Zero-based index of the producer in the buffer. It indicates the first free byte to be written.

- -

Definition at line 209 of file Packet.h.

- -
-
- -
-
- - - - -
ULONG Received
-
-

Number of packets received by current instance from its opening, i.e. number of packet received by the network adapter since the beginning of the capture/monitoring/dump session. This number is related to the particular CPU this structure is referring to.

- -

Definition at line 217 of file Packet.h.

- -
-
- -
-
- - - - -
PMDL TransferMdl1
-
- -

MDL used to map the portion of the buffer that will contain an incoming packet.

- -

Definition at line 226 of file Packet.h.

- -
-
- -
-
- - - - -
PMDL TransferMdl2
-
- -

Second MDL used to map the portion of the buffer that will contain an incoming packet.

- -

Definition at line 227 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structactivehosts.html b/libs/WinPcap-413-173-b4/docs/html/structactivehosts.html deleted file mode 100644 index 73a42b85..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structactivehosts.html +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - -WinPcap: activehosts Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
-
-
- -

Keeps a list of all the opened connections in the active mode. - More...

- -

#include <pcap-remote.h>

- - - - - - - - -

-Data Fields

struct sockaddr_storage host
 
SOCKET sockctrl
 
struct activehostsnext
 
-

Detailed Description

-

Keeps a list of all the opened connections in the active mode.

-

This structure defines a linked list of items that are needed to keep the info required to manage the active mode. In other words, when a new connection in active mode starts, this structure is updated so that it reflects the list of active mode connections currently opened. This structure is required by findalldevs() and open_remote() to see if they have to open a new control connection toward the host, or they already have a control connection in place.

- -

Definition at line 133 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
struct sockaddr_storage host
-
- -

Definition at line 135 of file pcap-remote.h.

- -
-
- -
-
- - - - -
struct activehosts* next
-
- -

Definition at line 137 of file pcap-remote.h.

- -
-
- -
-
- - - - -
SOCKET sockctrl
-
- -

Definition at line 136 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structbinary__stream.html b/libs/WinPcap-413-173-b4/docs/html/structbinary__stream.html deleted file mode 100644 index fa20f087..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structbinary__stream.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -WinPcap: binary_stream Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

A stream of X86 binary code. - More...

- -

#include <jitter.h>

- - - - - - - - - - - - - - -

-Data Fields

INT cur_ip
 Current X86 instruction pointer. More...
 
INT bpf_pc
 Current BPF instruction pointer, i.e. position in the BPF program reached by the jitter. More...
 
PCHAR ibuf
 Instruction buffer, contains the X86 generated code. More...
 
PUINT refs
 Jumps reference table. More...
 
-

Detailed Description

-

A stream of X86 binary code.

- -

Definition at line 69 of file jitter.h.

-

Field Documentation

- -
-
- - - - -
INT bpf_pc
-
- -

Current BPF instruction pointer, i.e. position in the BPF program reached by the jitter.

- -

Definition at line 71 of file jitter.h.

- -
-
- -
-
- - - - -
INT cur_ip
-
- -

Current X86 instruction pointer.

- -

Definition at line 70 of file jitter.h.

- -
-
- -
-
- - - - -
PCHAR ibuf
-
- -

Instruction buffer, contains the X86 generated code.

- -

Definition at line 72 of file jitter.h.

- -
-
- -
-
- - - - -
PUINT refs
-
- -

Jumps reference table.

- -

Definition at line 73 of file jitter.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structpacket__file__header.html b/libs/WinPcap-413-173-b4/docs/html/structpacket__file__header.html deleted file mode 100644 index 77a81345..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structpacket__file__header.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - -WinPcap: packet_file_header Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Header of a libpcap dump file. - More...

- -

#include <Packet.h>

- - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

UINT magic
 Libpcap magic number. More...
 
USHORT version_major
 Libpcap major version. More...
 
USHORT version_minor
 Libpcap minor version. More...
 
UINT thiszone
 Gmt to local correction. More...
 
UINT sigfigs
 Accuracy of timestamps. More...
 
UINT snaplen
 Length of the max saved portion of each packet. More...
 
UINT linktype
 Data link type (DLT_*). See win_bpf.h for details. More...
 
-

Detailed Description

-

Header of a libpcap dump file.

-

Used when a driver instance is set in dump mode to create a libpcap-compatible file.

- -

Definition at line 106 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
UINT linktype
-
- -

Data link type (DLT_*). See win_bpf.h for details.

- -

Definition at line 114 of file Packet.h.

- -
-
- -
-
- - - - -
UINT magic
-
- -

Libpcap magic number.

- -

Definition at line 108 of file Packet.h.

- -
-
- -
-
- - - - -
UINT sigfigs
-
- -

Accuracy of timestamps.

- -

Definition at line 112 of file Packet.h.

- -
-
- -
-
- - - - -
UINT snaplen
-
- -

Length of the max saved portion of each packet.

- -

Definition at line 113 of file Packet.h.

- -
-
- -
-
- - - - -
UINT thiszone
-
- -

Gmt to local correction.

- -

Definition at line 111 of file Packet.h.

- -
-
- -
-
- - - - -
USHORT version_major
-
- -

Libpcap major version.

- -

Definition at line 109 of file Packet.h.

- -
-
- -
-
- - - - -
USHORT version_minor
-
- -

Libpcap minor version.

- -

Definition at line 110 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structpcap__addr.html b/libs/WinPcap-413-173-b4/docs/html/structpcap__addr.html deleted file mode 100644 index d94101cd..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structpcap__addr.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - -WinPcap: pcap_addr Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
pcap_addr Struct Reference
-
-
- -

Representation of an interface address, used by pcap_findalldevs(). - More...

- -

#include <pcap.h>

- - - - - - - - - - - - - - - - - -

-Data Fields

struct pcap_addrnext
 if not NULL, a pointer to the next element in the list; NULL for the last element of the list More...
 
struct sockaddr * addr
 a pointer to a struct sockaddr containing an address More...
 
struct sockaddr * netmask
 if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address pointed to by addr. More...
 
struct sockaddr * broadaddr
 if not NULL, a pointer to a struct sockaddr that contains the broadcast address corre­ sponding to the address pointed to by addr; may be null if the interface doesn't support broadcasts More...
 
struct sockaddr * dstaddr
 if not NULL, a pointer to a struct sockaddr that contains the destination address corre­ sponding to the address pointed to by addr; may be null if the interface isn't a point- to-point interface More...
 
-

Detailed Description

-

Representation of an interface address, used by pcap_findalldevs().

- -

Definition at line 161 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
struct sockaddr* addr
-
- -

a pointer to a struct sockaddr containing an address

- -

Definition at line 163 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct sockaddr* broadaddr
-
- -

if not NULL, a pointer to a struct sockaddr that contains the broadcast address corre­ sponding to the address pointed to by addr; may be null if the interface doesn't support broadcasts

- -

Definition at line 165 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct sockaddr* dstaddr
-
- -

if not NULL, a pointer to a struct sockaddr that contains the destination address corre­ sponding to the address pointed to by addr; may be null if the interface isn't a point- to-point interface

- -

Definition at line 166 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct sockaddr* netmask
-
- -

if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address pointed to by addr.

- -

Definition at line 164 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct pcap_addr* next
-
- -

if not NULL, a pointer to the next element in the list; NULL for the last element of the list

- -

Definition at line 162 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structpcap__file__header.html b/libs/WinPcap-413-173-b4/docs/html/structpcap__file__header.html deleted file mode 100644 index 5254e683..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structpcap__file__header.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - -WinPcap: pcap_file_header Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
pcap_file_header Struct Reference
-
-
- -

Header of a libpcap dump file. - More...

- -

#include <pcap.h>

- - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

bpf_u_int32 magic
 
u_short version_major
 Libpcap major version. More...
 
u_short version_minor
 Libpcap minor version. More...
 
bpf_int32 thiszone
 gmt to local correction More...
 
bpf_u_int32 sigfigs
 accuracy of timestamps More...
 
bpf_u_int32 snaplen
 max length saved portion of each pkt More...
 
bpf_u_int32 linktype
 data link type (LINKTYPE_*) More...
 
-

Detailed Description

-

Header of a libpcap dump file.

-

The first record in the file contains saved values for some of the flags used in the printout phases of tcpdump. Many fields here are 32 bit ints so compilers won't insert unwanted padding; these files need to be interchangeable across architectures.

-

Do not change the layout of this structure, in any way (this includes changes that only affect the length of fields in this structure).

-

Also, do not change the interpretation of any of the members of this structure, in any way (this includes using values other than LINKTYPE_ values, as defined in "savefile.c", in the "linktype" field).

-

Instead:

-

introduce a new structure for the new format, if the layout of the structure changed;

-

send mail to "tcpdump-workers@tcpdump.org", requesting a new magic number for your new capture file format, and, when you get the new magic number, put it in "savefile.c";

-

use that magic number for save files with the changed file header;

-

make the code in "savefile.c" capable of reading files with the old file header as well as files with the new file header (using the magic number to determine the header format).

-

Then supply the changes to "patches@tcpdump.org", so that future versions of libpcap and programs that use it (such as tcpdump) will be able to read your new capture file format.

- -

Definition at line 110 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
bpf_u_int32 linktype
-
- -

data link type (LINKTYPE_*)

- -

Definition at line 117 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_u_int32 magic
-
- -

Definition at line 111 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_u_int32 sigfigs
-
- -

accuracy of timestamps

- -

Definition at line 115 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_u_int32 snaplen
-
- -

max length saved portion of each pkt

- -

Definition at line 116 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_int32 thiszone
-
- -

gmt to local correction

- -

Definition at line 114 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_short version_major
-
- -

Libpcap major version.

- -

Definition at line 112 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_short version_minor
-
- -

Libpcap minor version.

- -

Definition at line 113 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structpcap__if.html b/libs/WinPcap-413-173-b4/docs/html/structpcap__if.html deleted file mode 100644 index 77c03f19..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structpcap__if.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - -WinPcap: pcap_if Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
pcap_if Struct Reference
-
-
- -

Item in a list of interfaces, used by pcap_findalldevs(). - More...

- -

#include <pcap.h>

- - - - - - - - - - - - - - - - - -

-Data Fields

struct pcap_ifnext
 if not NULL, a pointer to the next element in the list; NULL for the last element of the list More...
 
char * name
 a pointer to a string giving a name for the device to pass to pcap_open_live() More...
 
char * description
 if not NULL, a pointer to a string giving a human-readable description of the device More...
 
struct pcap_addraddresses
 a pointer to the first element of a list of addresses for the interface More...
 
u_int flags
 PCAP_IF_ interface flags. Currently the only possible flag is PCAP_IF_LOOPBACK, that is set if the interface is a loopback interface. More...
 
-

Detailed Description

-

Item in a list of interfaces, used by pcap_findalldevs().

- -

Definition at line 148 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
struct pcap_addr* addresses
-
- -

a pointer to the first element of a list of addresses for the interface

- -

Definition at line 152 of file incs/pcap.h.

- -
-
- -
-
- - - - -
char* description
-
- -

if not NULL, a pointer to a string giving a human-readable description of the device

- -

Definition at line 151 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_int flags
-
- -

PCAP_IF_ interface flags. Currently the only possible flag is PCAP_IF_LOOPBACK, that is set if the interface is a loopback interface.

- -

Definition at line 153 of file incs/pcap.h.

- -
-
- -
-
- - - - -
char* name
-
- -

a pointer to a string giving a name for the device to pass to pcap_open_live()

- -

Definition at line 150 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct pcap_if* next
-
- -

if not NULL, a pointer to the next element in the list; NULL for the last element of the list

- -

Definition at line 149 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structpcap__pkthdr.html b/libs/WinPcap-413-173-b4/docs/html/structpcap__pkthdr.html deleted file mode 100644 index 17aa65b9..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structpcap__pkthdr.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -WinPcap: pcap_pkthdr Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
pcap_pkthdr Struct Reference
-
-
- -

Header of a packet in the dump file. - More...

- -

#include <pcap.h>

- - - - - - - - - - - -

-Data Fields

struct timeval ts
 time stamp More...
 
bpf_u_int32 caplen
 length of portion present More...
 
bpf_u_int32 len
 length this packet (off wire) More...
 
-

Detailed Description

-

Header of a packet in the dump file.

-

Each packet in the dump file is prepended with this generic header. This gets around the problem of different headers for different packet interfaces.

- -

Definition at line 126 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
bpf_u_int32 caplen
-
- -

length of portion present

- -

Definition at line 128 of file incs/pcap.h.

- -
-
- -
-
- - - - -
bpf_u_int32 len
-
- -

length this packet (off wire)

- -

Definition at line 129 of file incs/pcap.h.

- -
-
- -
-
- - - - -
struct timeval ts
-
- -

time stamp

- -

Definition at line 127 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structpcap__send__queue.html b/libs/WinPcap-413-173-b4/docs/html/structpcap__send__queue.html deleted file mode 100644 index fecb0bec..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structpcap__send__queue.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - -WinPcap: pcap_send_queue Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
pcap_send_queue Struct Reference
-
-
- -

A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). - More...

- -

#include <Win32-Extensions.h>

- - - - - - - - - - - -

-Data Fields

u_int maxlen
 Maximum size of the the queue, in bytes. This variable contains the size of the buffer field. More...
 
u_int len
 Current size of the queue, in bytes. More...
 
char * buffer
 Buffer containing the packets to be sent. More...
 
-

Detailed Description

-

A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().

- -

Definition at line 46 of file Win32-Extensions.h.

-

Field Documentation

- -
-
- - - - -
char* buffer
-
- -

Buffer containing the packets to be sent.

- -

Definition at line 50 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
u_int len
-
- -

Current size of the queue, in bytes.

- -

Definition at line 49 of file Win32-Extensions.h.

- -
-
- -
-
- - - - -
u_int maxlen
-
- -

Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.

- -

Definition at line 48 of file Win32-Extensions.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structpcap__stat.html b/libs/WinPcap-413-173-b4/docs/html/structpcap__stat.html deleted file mode 100644 index 871587e6..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structpcap__stat.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - -WinPcap: pcap_stat Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
pcap_stat Struct Reference
-
-
- -

Structure that keeps statistical values on an interface. - More...

- -

#include <pcap.h>

- - - - - - - - - - - -

-Data Fields

u_int ps_recv
 number of packets transited on the network More...
 
u_int ps_drop
 number of packets dropped by the driver More...
 
u_int ps_ifdrop
 drops by interface, not yet supported More...
 
-

Detailed Description

-

Structure that keeps statistical values on an interface.

-

As returned by the pcap_stats()

- -

Definition at line 136 of file incs/pcap.h.

-

Field Documentation

- -
-
- - - - -
u_int ps_drop
-
- -

number of packets dropped by the driver

- -

Definition at line 138 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_int ps_ifdrop
-
- -

drops by interface, not yet supported

- -

Definition at line 139 of file incs/pcap.h.

- -
-
- -
-
- - - - -
u_int ps_recv
-
- -

number of packets transited on the network

- -

Definition at line 137 of file incs/pcap.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__auth.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__auth.html deleted file mode 100644 index 85c4509d..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__auth.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -WinPcap: rpcap_auth Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
-
-
- -

Structure that keeps the data required for the authentication on the remote host. - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - -

-Data Fields

uint16 type
 Authentication type. More...
 
uint16 dummy
 Must be zero. More...
 
uint16 slen1
 Length of the first authentication item (e.g. username) More...
 
uint16 slen2
 Length of the second authentication item (e.g. password) More...
 
-

Detailed Description

-

Structure that keeps the data required for the authentication on the remote host.

- -

Definition at line 249 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 dummy
-
- -

Must be zero.

- -

Definition at line 252 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 slen1
-
- -

Length of the first authentication item (e.g. username)

- -

Definition at line 253 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 slen2
-
- -

Length of the second authentication item (e.g. password)

- -

Definition at line 254 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 type
-
- -

Authentication type.

- -

Definition at line 251 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__filter.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__filter.html deleted file mode 100644 index 6d6df6e9..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__filter.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - -WinPcap: rpcap_filter Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_filter Struct Reference
-
-
- -

General header used for the pcap_setfilter() command; keeps just the number of BPF instructions. - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - -

-Data Fields

uint16 filtertype
 type of the filter transferred (BPF instructions, ...) More...
 
uint16 dummy
 Must be zero. More...
 
uint32 nitems
 Number of items contained into the filter (e.g. BPF instructions for BPF filters) More...
 
-

Detailed Description

-

General header used for the pcap_setfilter() command; keeps just the number of BPF instructions.

- -

Definition at line 230 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 dummy
-
- -

Must be zero.

- -

Definition at line 233 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 filtertype
-
- -

type of the filter transferred (BPF instructions, ...)

- -

Definition at line 232 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 nitems
-
- -

Number of items contained into the filter (e.g. BPF instructions for BPF filters)

- -

Definition at line 234 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__filterbpf__insn.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__filterbpf__insn.html deleted file mode 100644 index 33eedfa3..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__filterbpf__insn.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -WinPcap: rpcap_filterbpf_insn Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_filterbpf_insn Struct Reference
-
-
- -

Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header. - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - -

-Data Fields

uint16 code
 opcode of the instuction More...
 
uint8 jt
 relative offset to jump to in case of 'true' More...
 
uint8 jf
 relative offset to jump to in case of 'false' More...
 
int32 k
 instruction-dependent value More...
 
-

Detailed Description

-

Structure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header.

- -

Definition at line 239 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 code
-
- -

opcode of the instuction

- -

Definition at line 241 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 jf
-
- -

relative offset to jump to in case of 'false'

- -

Definition at line 243 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 jt
-
- -

relative offset to jump to in case of 'true'

- -

Definition at line 242 of file pcap-remote.h.

- -
-
- -
-
- - - - -
int32 k
-
- -

instruction-dependent value

- -

Definition at line 244 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__findalldevs__if.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__findalldevs__if.html deleted file mode 100644 index b03917bb..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__findalldevs__if.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - -WinPcap: rpcap_findalldevs_if Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_findalldevs_if Struct Reference
-
-
- -

Format of the message for the interface description (findalldevs command) - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - - - - -

-Data Fields

uint16 namelen
 Length of the interface name. More...
 
uint16 desclen
 Length of the interface description. More...
 
uint32 flags
 Interface flags. More...
 
uint16 naddr
 Number of addresses. More...
 
uint16 dummy
 Must be zero. More...
 
-

Detailed Description

-

Format of the message for the interface description (findalldevs command)

- -

Definition at line 160 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 desclen
-
- -

Length of the interface description.

- -

Definition at line 163 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 dummy
-
- -

Must be zero.

- -

Definition at line 166 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 flags
-
- -

Interface flags.

- -

Definition at line 164 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 naddr
-
- -

Number of addresses.

- -

Definition at line 165 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 namelen
-
- -

Length of the interface name.

- -

Definition at line 162 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__findalldevs__ifaddr.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__findalldevs__ifaddr.html deleted file mode 100644 index 6d733b0a..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__findalldevs__ifaddr.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -WinPcap: rpcap_findalldevs_ifaddr Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_findalldevs_ifaddr Struct Reference
-
-
- -

Format of the message for the address listing (findalldevs command) - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - -

-Data Fields

struct sockaddr_storage addr
 Network address. More...
 
struct sockaddr_storage netmask
 Netmask for that address. More...
 
struct sockaddr_storage broadaddr
 Broadcast address for that address. More...
 
struct sockaddr_storage dstaddr
 P2P destination address for that address. More...
 
-

Detailed Description

-

Format of the message for the address listing (findalldevs command)

- -

Definition at line 171 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
struct sockaddr_storage addr
-
- -

Network address.

- -

Definition at line 173 of file pcap-remote.h.

- -
-
- -
-
- - - - -
struct sockaddr_storage broadaddr
-
- -

Broadcast address for that address.

- -

Definition at line 175 of file pcap-remote.h.

- -
-
- -
-
- - - - -
struct sockaddr_storage dstaddr
-
- -

P2P destination address for that address.

- -

Definition at line 176 of file pcap-remote.h.

- -
-
- -
-
- - - - -
struct sockaddr_storage netmask
-
- -

Netmask for that address.

- -

Definition at line 174 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__header.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__header.html deleted file mode 100644 index 5f193263..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__header.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -WinPcap: rpcap_header Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_header Struct Reference
-
-
- -

Common header for all the RPCAP messages. - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - -

-Data Fields

uint8 ver
 RPCAP version number. More...
 
uint8 type
 RPCAP message type (error, findalldevs, ...) More...
 
uint16 value
 Message-dependent value (not always used) More...
 
uint32 plen
 Length of the payload of this RPCAP message. More...
 
-

Detailed Description

-

Common header for all the RPCAP messages.

- -

Definition at line 150 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint32 plen
-
- -

Length of the payload of this RPCAP message.

- -

Definition at line 155 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 type
-
- -

RPCAP message type (error, findalldevs, ...)

- -

Definition at line 153 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 value
-
- -

Message-dependent value (not always used)

- -

Definition at line 154 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 ver
-
- -

RPCAP version number.

- -

Definition at line 152 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__openreply.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__openreply.html deleted file mode 100644 index 8c534997..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__openreply.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - -WinPcap: rpcap_openreply Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_openreply Struct Reference
-
-
- -

Format of the message of the connection opening reply (open command). - More...

- -

#include <pcap-remote.h>

- - - - - - - - -

-Data Fields

int32 linktype
 Link type. More...
 
int32 tzoff
 Timezone offset. More...
 
-

Detailed Description

-

Format of the message of the connection opening reply (open command).

-

This structure transfers over the network some of the values useful on the client side.

- -

Definition at line 186 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
int32 linktype
-
- -

Link type.

- -

Definition at line 188 of file pcap-remote.h.

- -
-
- -
-
- - - - -
int32 tzoff
-
- -

Timezone offset.

- -

Definition at line 189 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__pkthdr.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__pkthdr.html deleted file mode 100644 index 6f519ba5..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__pkthdr.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - -WinPcap: rpcap_pkthdr Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_pkthdr Struct Reference
-
-
- -

Format of the header which encapsulates captured packets when transmitted on the network. - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - - - - -

-Data Fields

uint32 timestamp_sec
 'struct timeval' compatible, it represents the 'tv_sec' field More...
 
uint32 timestamp_usec
 'struct timeval' compatible, it represents the 'tv_usec' field More...
 
uint32 caplen
 Length of portion present in the capture. More...
 
uint32 len
 Real length this packet (off wire) More...
 
uint32 npkt
 Ordinal number of the packet (i.e. the first one captured has '1', the second one '2', etc) More...
 
-

Detailed Description

-

Format of the header which encapsulates captured packets when transmitted on the network.

-

This message requries the general header as well, since we want to be albe to exchange more information across the network in the future (for example statistics, and kind like that).

- -

Definition at line 219 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint32 caplen
-
- -

Length of portion present in the capture.

- -

Definition at line 223 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 len
-
- -

Real length this packet (off wire)

- -

Definition at line 224 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 npkt
-
- -

Ordinal number of the packet (i.e. the first one captured has '1', the second one '2', etc)

- -

Definition at line 225 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 timestamp_sec
-
- -

'struct timeval' compatible, it represents the 'tv_sec' field

- -

Definition at line 221 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 timestamp_usec
-
- -

'struct timeval' compatible, it represents the 'tv_usec' field

- -

Definition at line 222 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__sampling.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__sampling.html deleted file mode 100644 index da537140..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__sampling.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -WinPcap: rpcap_sampling Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_sampling Struct Reference
-
-
- -

Structure that is needed to set sampling parameters. - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - -

-Data Fields

uint8 method
 Sampling method. More...
 
uint8 dummy1
 Must be zero. More...
 
uint16 dummy2
 Must be zero. More...
 
uint32 value
 Parameter related to the sampling method. More...
 
-

Detailed Description

-

Structure that is needed to set sampling parameters.

- -

Definition at line 269 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint8 dummy1
-
- -

Must be zero.

- -

Definition at line 272 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 dummy2
-
- -

Must be zero.

- -

Definition at line 273 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint8 method
-
- -

Sampling method.

- -

Definition at line 271 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 value
-
- -

Parameter related to the sampling method.

- -

Definition at line 274 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__startcapreply.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__startcapreply.html deleted file mode 100644 index 02d5a27c..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__startcapreply.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - -WinPcap: rpcap_startcapreply Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_startcapreply Struct Reference
-
-
- -

Format of the reply message that devoted to start a remote capture (startcap reply command) - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - -

-Data Fields

int32 bufsize
 Size of the user buffer allocated by WinPcap; it can be different from the one we chose. More...
 
uint16 portdata
 Network port on which the server is waiting at (passive mode only) More...
 
uint16 dummy
 Must be zero. More...
 
-

Detailed Description

-

Format of the reply message that devoted to start a remote capture (startcap reply command)

- -

Definition at line 205 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
int32 bufsize
-
- -

Size of the user buffer allocated by WinPcap; it can be different from the one we chose.

- -

Definition at line 207 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 dummy
-
- -

Must be zero.

- -

Definition at line 209 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 portdata
-
- -

Network port on which the server is waiting at (passive mode only)

- -

Definition at line 208 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__startcapreq.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__startcapreq.html deleted file mode 100644 index 26ec9f94..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__startcapreq.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -WinPcap: rpcap_startcapreq Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
rpcap_startcapreq Struct Reference
-
-
- -

Format of the message that starts a remote capture (startcap command) - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - -

-Data Fields

uint32 snaplen
 Length of the snapshot (number of bytes to capture for each packet) More...
 
uint32 read_timeout
 Read timeout in milliseconds. More...
 
uint16 flags
 Flags (see RPCAP_STARTCAPREQ_FLAG_xxx) More...
 
uint16 portdata
 Network port on which the client is waiting at (if 'serveropen') More...
 
-

Detailed Description

-

Format of the message that starts a remote capture (startcap command)

- -

Definition at line 195 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint16 flags
-
- -

Flags (see RPCAP_STARTCAPREQ_FLAG_xxx)

- -

Definition at line 199 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint16 portdata
-
- -

Network port on which the client is waiting at (if 'serveropen')

- -

Definition at line 200 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 read_timeout
-
- -

Read timeout in milliseconds.

- -

Definition at line 198 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 snaplen
-
- -

Length of the snapshot (number of bytes to capture for each packet)

- -

Definition at line 197 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structrpcap__stats.html b/libs/WinPcap-413-173-b4/docs/html/structrpcap__stats.html deleted file mode 100644 index dd953ed9..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structrpcap__stats.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - -WinPcap: rpcap_stats Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
- -
-
-
-
- -

Structure that keeps the statistics about the number of packets captured, dropped, etc. - More...

- -

#include <pcap-remote.h>

- - - - - - - - - - - - - - -

-Data Fields

uint32 ifrecv
 Packets received by the kernel filter (i.e. pcap_stats.ps_recv) More...
 
uint32 ifdrop
 Packets dropped by the network interface (e.g. not enough buffers) (i.e. pcap_stats.ps_ifdrop) More...
 
uint32 krnldrop
 Packets dropped by the kernel filter (i.e. pcap_stats.ps_drop) More...
 
uint32 svrcapt
 Packets captured by the RPCAP daemon and sent on the network. More...
 
-

Detailed Description

-

Structure that keeps the statistics about the number of packets captured, dropped, etc.

- -

Definition at line 259 of file pcap-remote.h.

-

Field Documentation

- -
-
- - - - -
uint32 ifdrop
-
- -

Packets dropped by the network interface (e.g. not enough buffers) (i.e. pcap_stats.ps_ifdrop)

- -

Definition at line 262 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 ifrecv
-
- -

Packets received by the kernel filter (i.e. pcap_stats.ps_recv)

- -

Definition at line 261 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 krnldrop
-
- -

Packets dropped by the kernel filter (i.e. pcap_stats.ps_drop)

- -

Definition at line 263 of file pcap-remote.h.

- -
-
- -
-
- - - - -
uint32 svrcapt
-
- -

Packets captured by the RPCAP daemon and sent on the network.

- -

Definition at line 264 of file pcap-remote.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/structsf__pkthdr.html b/libs/WinPcap-413-173-b4/docs/html/structsf__pkthdr.html deleted file mode 100644 index 7473d0ec..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/structsf__pkthdr.html +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - -WinPcap: sf_pkthdr Struct Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
- -
- -

Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler. - More...

- -

#include <Packet.h>

- - - - - - - - - - -

-Data Fields

struct timeval ts
 time stamp More...
 
UINT caplen
 
UINT len
 Length of the original packet (off wire). More...
 
-

Detailed Description

-

Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler.

- -

Definition at line 121 of file Packet.h.

-

Field Documentation

- -
-
- - - - -
UINT caplen
-
-

Length of captured portion. The captured portion can be different from the original packet, because it is possible (with a proper filter) to instruct the driver to capture only a portion of the packets.

- -

Definition at line 123 of file Packet.h.

- -
-
- -
-
- - - - -
UINT len
-
- -

Length of the original packet (off wire).

- -

Definition at line 126 of file Packet.h.

- -
-
- -
-
- - - - -
struct timeval ts
-
- -

time stamp

- -

Definition at line 122 of file Packet.h.

- -
-
-
The documentation for this struct was generated from the following file: -
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/sync_off.png b/libs/WinPcap-413-173-b4/docs/html/sync_off.png deleted file mode 100644 index 3b443fc6..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/sync_off.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/sync_on.png b/libs/WinPcap-413-173-b4/docs/html/sync_on.png deleted file mode 100644 index e08320fb..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/sync_on.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/tab_a.png b/libs/WinPcap-413-173-b4/docs/html/tab_a.png deleted file mode 100644 index 3b725c41..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/tab_a.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/tab_b.png b/libs/WinPcap-413-173-b4/docs/html/tab_b.png deleted file mode 100644 index e2b4a863..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/tab_b.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/tab_h.png b/libs/WinPcap-413-173-b4/docs/html/tab_h.png deleted file mode 100644 index fd5cb705..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/tab_h.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/tab_s.png b/libs/WinPcap-413-173-b4/docs/html/tab_s.png deleted file mode 100644 index ab478c95..00000000 Binary files a/libs/WinPcap-413-173-b4/docs/html/tab_s.png and /dev/null differ diff --git a/libs/WinPcap-413-173-b4/docs/html/tabs.css b/libs/WinPcap-413-173-b4/docs/html/tabs.css deleted file mode 100644 index 9cf578f2..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/tabs.css +++ /dev/null @@ -1,60 +0,0 @@ -.tabs, .tabs2, .tabs3 { - background-image: url('tab_b.png'); - width: 100%; - z-index: 101; - font-size: 13px; - font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; -} - -.tabs2 { - font-size: 10px; -} -.tabs3 { - font-size: 9px; -} - -.tablist { - margin: 0; - padding: 0; - display: table; -} - -.tablist li { - float: left; - display: table-cell; - background-image: url('tab_b.png'); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:url('tab_s.png'); - background-repeat:no-repeat; - background-position:right; - color: #283A5D; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: url('tab_h.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); - text-decoration: none; -} - -.tablist li.current a { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__remote_8htm.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__remote_8htm.html deleted file mode 100644 index 236f6c15..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__remote_8htm.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - -WinPcap: wpcap_remote.htm File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_remote.htm File Reference
-
- - -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__remote_8htm_source.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__remote_8htm_source.html deleted file mode 100644 index 26c6a73e..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__remote_8htm_source.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - -WinPcap: wpcap_remote.htm Source File - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_remote.htm
-
-
-Go to the documentation of this file.
1 <html>
-
2 
-
3 <head>
-
4 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-
5 <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
-
6 <meta name="ProgId" content="FrontPage.Editor.Document">
-
7 <title>Using WinPcap Remote Capture</title>
-
8 </head>
-
9 
-
10 <body>
-
11 
-
12 <hr>
-
13 <ul>
-
14  <li><a href="#RunningModes">Remote Capture Running Modes</a></li>
-
15  <li><a href="#Config">Configuring the Remote Daemon (rpcapd)</a></li>
-
16  <li><a href="#StartCap">Starting a capture on a remote machine</a></li>
-
17  <li><a href="#UNIX">Installing the Remote Capture Daemon in UNIX</a></li>
-
18 </ul>
-
19 <hr>
-
20 <p>WinPcap comes with Remote Capture capabilities. This is an highly
-
21 experimental feature that allows to interact to a remote machine and capture
-
22 packets that are being transmitted on the remote network.</p>
-
23 <p>This requires a <b>remote daemon </b>(called <code>rpcapd</code>) which
-
24 performs the capture and sends data back and a <b>local client </b>that sends
-
25 the appropriate commands and receives the captured data.</p>
-
26 <p>WinPcap extends the standard WinPcap code in such a way that all
-
27 WinPcap-based tools can expoit remote capture capabilities. For instance, the
-
28 capabillity to interact with a remote daemon are added to the client software
-
29 without any explicit modification to it. Vice versa, the remote daemon must be
-
30 explicitely installed (and configured) on the remote machine.</p>
-
31 <h2><a name="RunningModes"></a>Remote Capture Running Modes</h2>
-
32 <p>The Remote Capture Protocol (RPCAP) can work in two modes:</p>
-
33 <ul>
-
34  <li><b>Passive Mode</b> (default): the client (e.g. a network sniffer)
-
35  connects to the remote daemon, it sends them the appropriate commands, and
-
36  it starts the capture.</li>
-
37  <li><b>Active Mode</b>: the remote daemon try to establish a connection toward
-
38  the client (e.g. the network sniffer); then, the client sends the
-
39  appropriate commands to the daemon and it starts the capture. This name is
-
40  due to the fact thet the daemon becomes <i>active</i> instead of <i>waiting</i>
-
41  for new connections.</li>
-
42 </ul>
-
43 <p>The Active Mode is useful in case the remote daemon is behind a firewall and
-
44 it cannot receive connections from the external world. In this case, the daemon
-
45 can be configured to establish the connection to a given host, which will have
-
46 been configured in order to <i>wait</i> for that connection. After establishing
-
47 the connection, the protocol continues its job in almost the same way in both
-
48 Active and Passive Mode.</p>
-
49 <p>Analyzer (<a href="http://analyzer.polito.it/30alpha/">http://analyzer.polito.it/30alpha/</a>)
-
50 has a set of commands (in the <b>Capture</b> menu) that allows you to accept a
-
51 remote connection and then start the capture on the remote device. Currently,
-
52 Analyzer is the only tool that is able to work in active mode, since it requires
-
53 some modifications to the application code.</p>
-
54 <h2><a name="Config"></a>Configuring the Remote Daemon (rpcapd)</h2>
-
55 <p>The Remote Daemon is a standard Win32 executable running either in console
-
56 mode or as a service. The executable can be found in the <code>WinPcap</code>
-
57 folder and it has the following syntax:</p>
-
58 <pre> rpcapd [-b &lt;address&gt;] [-p &lt;port&gt;] [-6] [-l &lt;host_list&gt;] [-a &lt;host,port&gt;]
-
59  [-n] [-v] [-d] [-s &lt;file&gt;] [-f &lt;file&gt;]</pre>
-
60 <p>The daemon can be compiled and it is actually working on Linux as well.</p>
-
61 <p>Here there is a brief description of the allowed commands:</p>
-
62 <div align="left">
-
63  <table border="1">
-
64  <tr>
-
65  <th>Switch</th>
-
66  <th>Description</th>
-
67  </tr>
-
68  <tr>
-
69  <td>
-
70  <pre>-b &lt;address&gt;</pre>
-
71  </td>
-
72  <td>It sets the address the daemon has to bind to (either numeric or
-
73  literal). Default: it binds to all local IPv4 and IPv6 addresses.</td>
-
74  </tr>
-
75  <tr>
-
76  <td>
-
77  <pre>-p &lt;port&gt;</pre>
-
78  </td>
-
79  <td>It sets the port the daemon has to bind to. Default: it binds to port
-
80  2002.</td>
-
81  </tr>
-
82  <tr>
-
83  <td>
-
84  <pre>-4</pre>
-
85  </td>
-
86  <td>It binds only to IPv4 addresses. Default: both IPv4 and IPv6 waiting
-
87  sockets are used.</td>
-
88  </tr>
-
89  <tr>
-
90  <td>
-
91  <pre>-l &lt;host_list_file&gt;</pre>
-
92  </td>
-
93  <td>It specifies a file that keeps the list of the hosts which are allowed
-
94  to connect to this daemon (if more than one, the file keeps them one per
-
95  line). We suggest to use literal names (instead of numeric ones) in
-
96  order to avoid problems with different address families (IPv4 and IPv6).</td>
-
97  </tr>
-
98  <tr>
-
99  <td>
-
100  <pre>-n</pre>
-
101  </td>
-
102  <td>It permits NULL authentication (usually used with '-l', that
-
103  guarantees that only the allowed hosts can connect to the daemon).
-
104  Default: the username/password authentication mechanism is required.</td>
-
105  </tr>
-
106  <tr>
-
107  <td>
-
108  <pre>-a &lt;host, port&gt;</pre>
-
109  </td>
-
110  <td>It forces the daemon to run in active mode and to connect to 'host' on
-
111  port 'port'. This does not exclude that the daemon is still able to
-
112  accept passive connections.</td>
-
113  </tr>
-
114  <tr>
-
115  <td>
-
116  <pre>-v</pre>
-
117  </td>
-
118  <td>It forces the daemon to run in active mode only (default: the daemon
-
119  always accepts active connections, even if the '-a' switch is
-
120  specified).</td>
-
121  </tr>
-
122  <tr>
-
123  <td>
-
124  <pre>-d</pre>
-
125  </td>
-
126  <td>Forces the daemon to run in background, i.e. as a daemon (UNIX only)
-
127  or as a service (Win32 only). <b>Warning</b> (Win32): this switch is
-
128  provided automatically when WinPcap installs this daemon into the Win32
-
129  services (control panel - administrative tools - services).</td>
-
130  </tr>
-
131  <tr>
-
132  <td>
-
133  <pre>-s &lt;file&gt;</pre>
-
134  </td>
-
135  <td>It saves the current configuration to file.</td>
-
136  </tr>
-
137  <tr>
-
138  <td>
-
139  <pre>-f &lt;file&gt;</pre>
-
140  </td>
-
141  <td>It loads the current configuration from file; all the switches
-
142  specified from the command line are ignored and the file settings are
-
143  used instead.</td>
-
144  </tr>
-
145  <tr>
-
146  <td>
-
147  <pre>-h</pre>
-
148  </td>
-
149  <td>It prints an help screen.</td>
-
150  </tr>
-
151  </table>
-
152 </div>
-
153 <h3>Installing the remote daemon</h3>
-
154 <p>The remote daemon is installed automatically when installing WinPcap. The
-
155 installation process places the <code>rpcapd</code> file into the <code>WinPcap</code>
-
156 folder. This file can be executed either from the command line, or as a service.
-
157 For instance, the installation process updates the list of available services
-
158 list and it creates a new item (<b>Remote Packet Capture Protocol v.0
-
159 (experimental)</b> ). To avoid security problems, the service is inactive and it
-
160 has to be started manually (control panel - administrative tools - services -
-
161 start).</p>
-
162 <p>The service has a set of &quot;standard&quot; parameters, i.e. it it launched
-
163 with the &quot;<code>-d</code>&quot; flag (in orde to make it running as a
-
164 service) and the &quot;<code>-f rpcapd.ini</code>&quot; flag. The user can
-
165 create a file called <code>rpcapd.ini</code> in the same folder of the
-
166 executable, and put the configuration commands in there. In order for the
-
167 service to execute the commands, you have to stop and restart it again (i.e. the
-
168 initialization file is parsed only at the beginning). Viceversa, the UNIX
-
169 version of <code>rpcapd</code> is able to read the configuration file when
-
170 sending a kill -HUP signal to it. In that case, all the existing connections
-
171 remain in place, while the new connections will be created according to the new
-
172 parameters.</p>
-
173 <p>In case the user does not want to create the configuration file manually, it
-
174 can launch <code>rpcapd</code> with the requested parameters plus the &quot;<code>-s
-
175 filename</code>&quot; one. The daemon will parse all the parameters and save
-
176 them into the specified configuration file.</p>
-
177 <h3>Starting the remote daemon as a standard executable</h3>
-
178 <p>The <code>rpcapd</code> executable can be launched directly, i.e. it can run
-
179 in the foreground as well (not as a daemon/service). The procedure is quite
-
180 simple: you have to invoke the executable from the command line with all the
-
181 requested parameters but the &quot;<code>-d</code>&quot; flag. The capture
-
182 server will start in the foreground.</p>
-
183 <h2><a name="StartCap"></a>Starting a capture on a remote machine</h2>
-
184 <p>If you are using a tool that is already aware of the remote capture (like
-
185 Analyzer), everything is simple. The capture wizard will help you to locate the
-
186 appropriate interface on the remote machine.</p>
-
187 <p>If your preferred tool is not aware of the remote capture, you can still use
-
188 the remote capture. In this case you have to read the next Section.</p>
-
189 <p><b>Be carefully</b>: the capture server (<code>rpcapd</code>) must be up and
-
190 running on the remote machine.</p>
-
191 <h3>New string specifiers for interface selection</h3>
-
192 <p>If your preferred tool is not aware of the remote capture, the only thing you
-
193 must do is to insert, as interface specifier, the indication of the remote
-
194 machine you want to contact. The following forms are allowed:</p>
-
195 <div align="left">
-
196  <table border="1">
-
197  <tr>
-
198  <th>Adapter String</th>
-
199  <th>Description</th>
-
200  </tr>
-
201  <tr>
-
202  <td>
-
203  <pre>file://filename</pre>
-
204  </td>
-
205  <td>It opens a local file.</td>
-
206  </tr>
-
207  <tr>
-
208  <td>
-
209  <pre>rpcap://host.foo.bar/adaptername</pre>
-
210  </td>
-
211  <td>It opens a remote adapter; the host is specified by means of the
-
212  literal name, without port number (i.e. it uses the RPCAP default port).</td>
-
213  </tr>
-
214  <tr>
-
215  <td>
-
216  <pre>rpcap://host.foo.bar:1234/adaptername</pre>
-
217  </td>
-
218  <td>It is the same as before, but it uses a different port number.</td>
-
219  </tr>
-
220  <tr>
-
221  <td>
-
222  <pre>rpcap://10.11.12.13/adaptername</pre>
-
223  </td>
-
224  <td>It opens a remote adapter, but the host is specified by means of an
-
225  IPv4 numeric address, without port number (i.e. it uses the RPCAP
-
226  default port).</td>
-
227  </tr>
-
228  <tr>
-
229  <td>
-
230  <pre>rpcap://10.11.12.13:1234/adaptername</pre>
-
231  </td>
-
232  <td>It is the same as before, but it uses a different port number.</td>
-
233  </tr>
-
234  <tr>
-
235  <td>
-
236  <pre>rpcap://[10.11.12.13]:1234/adaptername</pre>
-
237  </td>
-
238  <td>It is the same as before, but the numeric address is specified within
-
239  square brackets (like IPv6 addresses).</td>
-
240  </tr>
-
241  <tr>
-
242  <td>
-
243  <pre>rpcap://[1:2:3::4]/adaptername</pre>
-
244  </td>
-
245  <td>It opens a remote adapter, but the host is specified by means of an
-
246  IPv6 numeric address, without port number (i.e. it uses the RPCAP
-
247  default port). In case of IPv6 addresses you MUST use the square
-
248  brackets.</td>
-
249  </tr>
-
250  <tr>
-
251  <td>
-
252  <pre>rpcap://[1:2:3::4]:1234/adaptername</pre>
-
253  </td>
-
254  <td>It is the same as before, but it uses a different port number.</td>
-
255  </tr>
-
256  <tr>
-
257  <td>
-
258  <pre>rpcap://adaptername</pre>
-
259  </td>
-
260  <td>It opens a local adapter, without using the RPCAP protocol.</td>
-
261  </tr>
-
262  <tr>
-
263  <td>
-
264  <pre>adaptername</pre>
-
265  </td>
-
266  <td>It opens a local adapter; it is kept for compability, but it is
-
267  strongly discouraged.</td>
-
268  </tr>
-
269  <tr>
-
270  <td>
-
271  <pre>(NULL)</pre>
-
272  </td>
-
273  <td>It opens the first local adapter; it is kept for compability, but it
-
274  is strongly discouraged.</td>
-
275  </tr>
-
276  </table>
-
277 </div>
-
278 <p>The following formats are not allowed:</p>
-
279 <table border="1">
-
280  <tr>
-
281  <th>Adapter String</th>
-
282  <th>Description</th>
-
283  </tr>
-
284  <tr>
-
285  <td>
-
286  <pre>rpcap://</pre>
-
287  </td>
-
288  <td>It cannot be used to open the first local adapter.</td>
-
289  </tr>
-
290  <tr>
-
291  <td>
-
292  <pre>rpcap://hostname/</pre>
-
293  </td>
-
294  <td>It cannot be used to open the first remote adapter.</td>
-
295  </tr>
-
296 </table>
-
297 <h2><a name="UNIX"></a>Installing the Remote Capture Daemon in UNIX</h2>
-
298 <p>The WinPcap source archive can be compiled in UNIX as well. Currently, remote
-
299 capture has been tested on Linux and BSD. What you have to do is:</p>
-
300 <ul>
-
301  <li>download the WinPcap sources</li>
-
302  <li>unpack the sources
-
303  <ul>
-
304  <li>we suggest to use the <code>unzip -a</code> command in order to
-
305  convert DOS files to UNIX ones</li>
-
306  </ul>
-
307  </li>
-
308  <li>move to the <code>libpcap</code> folder</li>
-
309  <li>type:
-
310  <ul>
-
311  <li><code>./configure</code></li>
-
312  <li><b>Warning</b>: in case the previous step reports an error, please
-
313  regenerate the <code>configure</code> file using <code>automake</code>
-
314  (version 2.50 or higher required)</li>
-
315  <li><code>make</code></li>
-
316  </ul>
-
317  </li>
-
318  <li>move to the <code>rpcapd</code> folder</li>
-
319  <li>type <code>make</code></li>
-
320 </ul>
-
321 <p>The remote capture capabilities are turned on by default on Linux and
-
322 FreeBSD. In case you do not want remote capture capabilities in libpcap, you can
-
323 type</p>
-
324 <pre> ./configure --disable-remote</pre>
-
325 <p>at the &quot;<code>configure</code>&quot; step. All the possible flags are
-
326 listed when typing <code>./configure --help</code>.</p>
-
327 <p>What you obtained right now, is:</p>
-
328 <ul>
-
329  <li>a library file (<code>libpcap.a</code>), which can be linked to other
-
330  applications (like <code>tcpdump</code>) in order to enable the remote
-
331  capture for them.</li>
-
332  <li>an executable (<code>rpcapd</code>) that is the remote daemon</li>
-
333 </ul>
-
334 <p><b>Warning</b>: in order to run the <code>rpcapd</code> daemon, the program
-
335 must either</p>
-
336 <ul>
-
337  <li>run as root (or)</li>
-
338  <li>run as user, but it must be owned by root and must be SUID root (<code>chmod
-
339  u+s rpcapd</code>)</li>
-
340 </ul>
-
341 <h3>Known bugs</h3>
-
342 <p><b>FreeBSD</b>: the first time you call the <code>pcap_stat()</code>, the
-
343 function takes several seconds to return. Therefore, programs like Analyzer seem
-
344 to hang up for 20-30 seconds at the beginning of the capture (if this is done
-
345 with BSD as a remote probe). We're investigating to solve this issue.</p>
-
346 <p><i>For any question, please refer to the WinPcap help page.</i></p>
-
347 
-
348 </body>
-
349 
-
350 </html>
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut1_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut1_8txt.html deleted file mode 100644 index a6986bc0..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut1_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut1.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut1.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut2_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut2_8txt.html deleted file mode 100644 index 63141314..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut2_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut2.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut2.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut3_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut3_8txt.html deleted file mode 100644 index f4016fbf..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut3_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut3.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut3.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut4_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut4_8txt.html deleted file mode 100644 index 98f5c247..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut4_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut4.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut4.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut5_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut5_8txt.html deleted file mode 100644 index 4e3cc210..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut5_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut5.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut5.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut6_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut6_8txt.html deleted file mode 100644 index 3515d42f..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut6_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut6.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut6.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut7_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut7_8txt.html deleted file mode 100644 index eededbeb..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut7_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut7.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut7.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut8_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut8_8txt.html deleted file mode 100644 index 7e84e7d5..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut8_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut8.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut8.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut9_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut9_8txt.html deleted file mode 100644 index 5d8dce48..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut9_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut9.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut9.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut_8txt.html b/libs/WinPcap-413-173-b4/docs/html/wpcap__tut_8txt.html deleted file mode 100644 index 8a1caead..00000000 --- a/libs/WinPcap-413-173-b4/docs/html/wpcap__tut_8txt.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -WinPcap: wpcap_tut.txt File Reference - - - - - - -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - - - -
-
-
-
wpcap_tut.txt File Reference
-
-
-
- -
-

-documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2010 -CACE Technologies. Copyright (c) 2010-2013 -Riverbed Technology. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/GNUmakefile similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-pcap/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/GNUmakefile index a62b3fb9..9bf82520 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/GNUmakefile @@ -1,10 +1,10 @@ -# Makefile for cygwin gcc -# Nate Lawson - -SUBDIRS = basic_dump basic_dump_ex iflist pcap_filter pktdump_ex readfile readfile_ex savedump sendpack UDPdump - -all clean install uninstall: ${SUBDIRS} - for subdir in ${SUBDIRS}; do \ - echo "Entering $$subdir"; \ - (cd $$subdir && ${MAKE} $@) \ - done; +# Makefile for cygwin gcc +# Nate Lawson + +SUBDIRS = basic_dump basic_dump_ex iflist pcap_filter pktdump_ex readfile readfile_ex savedump sendpack UDPdump + +all clean install uninstall: ${SUBDIRS} + for subdir in ${SUBDIRS}; do \ + echo "Entering $$subdir"; \ + (cd $$subdir && ${MAKE} $@) \ + done; diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/MakeaAll.dsw b/libs/WpdPack_4_1_2/Examples-pcap/MakeaAll.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/MakeaAll.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/MakeaAll.dsw index 68075d3e..3a595ac9 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/MakeaAll.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/MakeaAll.dsw @@ -1,137 +1,137 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "UDPdump"=.\UDPdump\UDPdump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump"=.\basic_dump\basic_dump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump_ex"=.\basic_dump_ex\basic_dump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "iflist"=.\iflist\iflist.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pcap_filter"=.\pcap_filter\pcap_filter.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pktdump_ex"=.\pktdump_ex\pktdump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile"=.\readfile\readfile.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile_ex"=.\readfile_ex\readfile_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "savedump"=.\savedump\savedump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sendpack"=.\sendpack\sendpack.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "UDPdump"=.\UDPdump\UDPdump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "basic_dump"=.\basic_dump\basic_dump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "basic_dump_ex"=.\basic_dump_ex\basic_dump_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "iflist"=.\iflist\iflist.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "pcap_filter"=.\pcap_filter\pcap_filter.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "pktdump_ex"=.\pktdump_ex\pktdump_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "readfile"=.\readfile\readfile.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "readfile_ex"=.\readfile_ex\readfile_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "savedump"=.\savedump\savedump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "sendpack"=.\sendpack\sendpack.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/MakeaAll.sln b/libs/WpdPack_4_1_2/Examples-pcap/MakeaAll.sln similarity index 98% rename from libs/WinPcap-413-173-b4/Examples-pcap/MakeaAll.sln rename to libs/WpdPack_4_1_2/Examples-pcap/MakeaAll.sln index b0d9f29d..9bef01eb 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/MakeaAll.sln +++ b/libs/WpdPack_4_1_2/Examples-pcap/MakeaAll.sln @@ -1,116 +1,116 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDPdump", "UDPdump\UDPdump.vcproj", "{B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "basic_dump\basic_dump.vcproj", "{80E57A40-2069-4261-8470-A56A94EA4D48}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "basic_dump_ex\basic_dump_ex.vcproj", "{6C124B8E-5310-4294-9148-0D62AF96A649}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iflist", "iflist\iflist.vcproj", "{AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_filter", "pcap_filter\pcap_filter.vcproj", "{1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pktdump_ex", "pktdump_ex\pktdump_ex.vcproj", "{E501F12B-2CAD-4B65-BFB9-E012553BE0A2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "readfile\readfile.vcproj", "{D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "readfile_ex\readfile_ex.vcproj", "{C34F10C8-A733-4D64-B1AF-2AAA53FA6506}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "savedump\savedump.vcproj", "{FC4AF1CF-72A5-4862-9F38-5063A588B2A6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "sendpack\sendpack.vcproj", "{58E5469B-4C43-43C5-9E63-86D92D870D19}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|Win32.ActiveCfg = Debug|Win32 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|Win32.Build.0 = Debug|Win32 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|x64.ActiveCfg = Debug|x64 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|x64.Build.0 = Debug|x64 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|Win32.ActiveCfg = Release|Win32 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|Win32.Build.0 = Release|Win32 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|x64.ActiveCfg = Release|x64 - {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|x64.Build.0 = Release|x64 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|Win32.ActiveCfg = Debug|Win32 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|Win32.Build.0 = Debug|Win32 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|x64.ActiveCfg = Debug|x64 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|x64.Build.0 = Debug|x64 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|Win32.ActiveCfg = Release|Win32 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|Win32.Build.0 = Release|Win32 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|x64.ActiveCfg = Release|x64 - {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|x64.Build.0 = Release|x64 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|Win32.ActiveCfg = Debug|Win32 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|Win32.Build.0 = Debug|Win32 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|x64.ActiveCfg = Debug|x64 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|x64.Build.0 = Debug|x64 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|Win32.ActiveCfg = Release|Win32 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|Win32.Build.0 = Release|Win32 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|x64.ActiveCfg = Release|x64 - {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|x64.Build.0 = Release|x64 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|Win32.ActiveCfg = Debug|Win32 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|Win32.Build.0 = Debug|Win32 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|x64.ActiveCfg = Debug|x64 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|x64.Build.0 = Debug|x64 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|Win32.ActiveCfg = Release|Win32 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|Win32.Build.0 = Release|Win32 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|x64.ActiveCfg = Release|x64 - {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|x64.Build.0 = Release|x64 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|Win32.ActiveCfg = Debug|Win32 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|Win32.Build.0 = Debug|Win32 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|x64.ActiveCfg = Debug|x64 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|x64.Build.0 = Debug|x64 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|Win32.ActiveCfg = Release|Win32 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|Win32.Build.0 = Release|Win32 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|x64.ActiveCfg = Release|x64 - {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|x64.Build.0 = Release|x64 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|Win32.ActiveCfg = Debug|Win32 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|Win32.Build.0 = Debug|Win32 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|x64.ActiveCfg = Debug|x64 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|x64.Build.0 = Debug|x64 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|Win32.ActiveCfg = Release|Win32 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|Win32.Build.0 = Release|Win32 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|x64.ActiveCfg = Release|x64 - {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|x64.Build.0 = Release|x64 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|Win32.ActiveCfg = Debug|Win32 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|Win32.Build.0 = Debug|Win32 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|x64.ActiveCfg = Debug|x64 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|x64.Build.0 = Debug|x64 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|Win32.ActiveCfg = Release|Win32 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|Win32.Build.0 = Release|Win32 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|x64.ActiveCfg = Release|x64 - {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|x64.Build.0 = Release|x64 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|Win32.ActiveCfg = Debug|Win32 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|Win32.Build.0 = Debug|Win32 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|x64.ActiveCfg = Debug|x64 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|x64.Build.0 = Debug|x64 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|Win32.ActiveCfg = Release|Win32 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|Win32.Build.0 = Release|Win32 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|x64.ActiveCfg = Release|x64 - {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|x64.Build.0 = Release|x64 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|Win32.ActiveCfg = Debug|Win32 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|Win32.Build.0 = Debug|Win32 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|x64.ActiveCfg = Debug|x64 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|x64.Build.0 = Debug|x64 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|Win32.ActiveCfg = Release|Win32 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|Win32.Build.0 = Release|Win32 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|x64.ActiveCfg = Release|x64 - {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|x64.Build.0 = Release|x64 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|Win32.ActiveCfg = Debug|Win32 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|Win32.Build.0 = Debug|Win32 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|x64.ActiveCfg = Debug|x64 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|x64.Build.0 = Debug|x64 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|Win32.ActiveCfg = Release|Win32 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|Win32.Build.0 = Release|Win32 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|x64.ActiveCfg = Release|x64 - {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDPdump", "UDPdump\UDPdump.vcproj", "{B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "basic_dump\basic_dump.vcproj", "{80E57A40-2069-4261-8470-A56A94EA4D48}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "basic_dump_ex\basic_dump_ex.vcproj", "{6C124B8E-5310-4294-9148-0D62AF96A649}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iflist", "iflist\iflist.vcproj", "{AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_filter", "pcap_filter\pcap_filter.vcproj", "{1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pktdump_ex", "pktdump_ex\pktdump_ex.vcproj", "{E501F12B-2CAD-4B65-BFB9-E012553BE0A2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "readfile\readfile.vcproj", "{D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "readfile_ex\readfile_ex.vcproj", "{C34F10C8-A733-4D64-B1AF-2AAA53FA6506}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "savedump\savedump.vcproj", "{FC4AF1CF-72A5-4862-9F38-5063A588B2A6}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "sendpack\sendpack.vcproj", "{58E5469B-4C43-43C5-9E63-86D92D870D19}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|Win32.ActiveCfg = Debug|Win32 + {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|Win32.Build.0 = Debug|Win32 + {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|x64.ActiveCfg = Debug|x64 + {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Debug|x64.Build.0 = Debug|x64 + {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|Win32.ActiveCfg = Release|Win32 + {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|Win32.Build.0 = Release|Win32 + {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|x64.ActiveCfg = Release|x64 + {B484FA1C-6508-4DDA-8DA7-EA14DB6585AE}.Release|x64.Build.0 = Release|x64 + {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|Win32.ActiveCfg = Debug|Win32 + {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|Win32.Build.0 = Debug|Win32 + {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|x64.ActiveCfg = Debug|x64 + {80E57A40-2069-4261-8470-A56A94EA4D48}.Debug|x64.Build.0 = Debug|x64 + {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|Win32.ActiveCfg = Release|Win32 + {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|Win32.Build.0 = Release|Win32 + {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|x64.ActiveCfg = Release|x64 + {80E57A40-2069-4261-8470-A56A94EA4D48}.Release|x64.Build.0 = Release|x64 + {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|Win32.ActiveCfg = Debug|Win32 + {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|Win32.Build.0 = Debug|Win32 + {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|x64.ActiveCfg = Debug|x64 + {6C124B8E-5310-4294-9148-0D62AF96A649}.Debug|x64.Build.0 = Debug|x64 + {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|Win32.ActiveCfg = Release|Win32 + {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|Win32.Build.0 = Release|Win32 + {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|x64.ActiveCfg = Release|x64 + {6C124B8E-5310-4294-9148-0D62AF96A649}.Release|x64.Build.0 = Release|x64 + {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|Win32.Build.0 = Debug|Win32 + {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|x64.ActiveCfg = Debug|x64 + {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Debug|x64.Build.0 = Debug|x64 + {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|Win32.ActiveCfg = Release|Win32 + {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|Win32.Build.0 = Release|Win32 + {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|x64.ActiveCfg = Release|x64 + {AD22E53E-6B36-4514-8F90-A92D2CFAAEBF}.Release|x64.Build.0 = Release|x64 + {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|Win32.ActiveCfg = Debug|Win32 + {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|Win32.Build.0 = Debug|Win32 + {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|x64.ActiveCfg = Debug|x64 + {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Debug|x64.Build.0 = Debug|x64 + {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|Win32.ActiveCfg = Release|Win32 + {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|Win32.Build.0 = Release|Win32 + {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|x64.ActiveCfg = Release|x64 + {1F9B464B-56FE-4649-BE0E-E0B9B3DDEB00}.Release|x64.Build.0 = Release|x64 + {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|Win32.ActiveCfg = Debug|Win32 + {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|Win32.Build.0 = Debug|Win32 + {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|x64.ActiveCfg = Debug|x64 + {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Debug|x64.Build.0 = Debug|x64 + {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|Win32.ActiveCfg = Release|Win32 + {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|Win32.Build.0 = Release|Win32 + {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|x64.ActiveCfg = Release|x64 + {E501F12B-2CAD-4B65-BFB9-E012553BE0A2}.Release|x64.Build.0 = Release|x64 + {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|Win32.ActiveCfg = Debug|Win32 + {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|Win32.Build.0 = Debug|Win32 + {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|x64.ActiveCfg = Debug|x64 + {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Debug|x64.Build.0 = Debug|x64 + {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|Win32.ActiveCfg = Release|Win32 + {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|Win32.Build.0 = Release|Win32 + {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|x64.ActiveCfg = Release|x64 + {D47AE2DA-FDC6-430E-AA6A-15290E3AA5B5}.Release|x64.Build.0 = Release|x64 + {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|Win32.ActiveCfg = Debug|Win32 + {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|Win32.Build.0 = Debug|Win32 + {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|x64.ActiveCfg = Debug|x64 + {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Debug|x64.Build.0 = Debug|x64 + {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|Win32.ActiveCfg = Release|Win32 + {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|Win32.Build.0 = Release|Win32 + {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|x64.ActiveCfg = Release|x64 + {C34F10C8-A733-4D64-B1AF-2AAA53FA6506}.Release|x64.Build.0 = Release|x64 + {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|Win32.ActiveCfg = Debug|Win32 + {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|Win32.Build.0 = Debug|Win32 + {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|x64.ActiveCfg = Debug|x64 + {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Debug|x64.Build.0 = Debug|x64 + {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|Win32.ActiveCfg = Release|Win32 + {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|Win32.Build.0 = Release|Win32 + {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|x64.ActiveCfg = Release|x64 + {FC4AF1CF-72A5-4862-9F38-5063A588B2A6}.Release|x64.Build.0 = Release|x64 + {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|Win32.ActiveCfg = Debug|Win32 + {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|Win32.Build.0 = Debug|Win32 + {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|x64.ActiveCfg = Debug|x64 + {58E5469B-4C43-43C5-9E63-86D92D870D19}.Debug|x64.Build.0 = Debug|x64 + {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|Win32.ActiveCfg = Release|Win32 + {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|Win32.Build.0 = Release|Win32 + {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|x64.ActiveCfg = Release|x64 + {58E5469B-4C43-43C5-9E63-86D92D870D19}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/GNUmakefile similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/UDPdump/GNUmakefile index 21f42ad9..d9e75f07 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Loris Degioanni - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = udpdump.o -LIBS = -L ${PCAP_PATH} -lwpcap -lwsock32 - -all: ${OBJS} - ${CC} ${CFLAGS} -o udpdump.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} udpdump.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Loris Degioanni + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = udpdump.o +LIBS = -L ${PCAP_PATH} -lwpcap -lwsock32 + +all: ${OBJS} + ${CC} ${CFLAGS} -o udpdump.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} udpdump.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.dsp b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsp index 40e38063..b9553123 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="UDPdump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=UDPdump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "UDPdump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "UDPdump.mak" CFG="UDPdump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "UDPdump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "UDPdump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "UDPdump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "UDPdump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "UDPdump - Win32 Release" -# Name "UDPdump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\udpdump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="UDPdump" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=UDPdump - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "UDPdump.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "UDPdump.mak" CFG="UDPdump - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "UDPdump - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "UDPdump - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "UDPdump - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "UDPdump - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "UDPdump - Win32 Release" +# Name "UDPdump - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\udpdump.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.dsw b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsw index 0def7090..8981cf43 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "UDPdump"=.\UDPdump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "UDPdump"=.\UDPdump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.vcproj index 40d42c0b..ae73936b 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/UDPdump.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/udpdump.c b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/udpdump.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/udpdump.c rename to libs/WpdPack_4_1_2/Examples-pcap/UDPdump/udpdump.c index 3bfcde15..e627addd 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/udpdump.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/UDPdump/udpdump.c @@ -1,242 +1,242 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -/* 4 bytes IP address */ -typedef struct ip_address -{ - u_char byte1; - u_char byte2; - u_char byte3; - u_char byte4; -}ip_address; - -/* IPv4 header */ -typedef struct ip_header -{ - u_char ver_ihl; // Version (4 bits) + Internet header length (4 bits) - u_char tos; // Type of service - u_short tlen; // Total length - u_short identification; // Identification - u_short flags_fo; // Flags (3 bits) + Fragment offset (13 bits) - u_char ttl; // Time to live - u_char proto; // Protocol - u_short crc; // Header checksum - ip_address saddr; // Source address - ip_address daddr; // Destination address - u_int op_pad; // Option + Padding -}ip_header; - -/* UDP header*/ -typedef struct udp_header -{ - u_short sport; // Source port - u_short dport; // Destination port - u_short len; // Datagram length - u_short crc; // Checksum -}udp_header; - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum; - int i=0; - pcap_t *adhandle; - char errbuf[PCAP_ERRBUF_SIZE]; - u_int netmask; - char packet_filter[] = "ip and udp"; - struct bpf_program fcode; - - /* Retrieve the device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - /* Check if the user specified a valid adapter */ - if(inum < 1 || inum > i) - { - printf("\nAdapter number out of range.\n"); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the adapter */ - if ((adhandle= pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Check the link layer. We support only Ethernet for simplicity. */ - if(pcap_datalink(adhandle) != DLT_EN10MB) - { - fprintf(stderr,"\nThis program works only on Ethernet networks.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(d->addresses != NULL) - /* Retrieve the mask of the first address of the interface */ - netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; - else - /* If the interface is without addresses we suppose to be in a C class network */ - netmask=0xffffff; - - - //compile the filter - if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - //set the filter - if (pcap_setfilter(adhandle, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, NULL); - - return 0; -} - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct tm *ltime; - char timestr[16]; - ip_header *ih; - udp_header *uh; - u_int ip_len; - u_short sport,dport; - time_t local_tv_sec; - - /* - * unused parameter - */ - (VOID)(param); - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - ltime=localtime(&local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); - - /* print timestamp and length of the packet */ - printf("%s.%.6d len:%d ", timestr, header->ts.tv_usec, header->len); - - /* retireve the position of the ip header */ - ih = (ip_header *) (pkt_data + - 14); //length of ethernet header - - /* retireve the position of the udp header */ - ip_len = (ih->ver_ihl & 0xf) * 4; - uh = (udp_header *) ((u_char*)ih + ip_len); - - /* convert from network byte order to host byte order */ - sport = ntohs( uh->sport ); - dport = ntohs( uh->dport ); - - /* print ip addresses and udp ports */ - printf("%d.%d.%d.%d.%d -> %d.%d.%d.%d.%d\n", - ih->saddr.byte1, - ih->saddr.byte2, - ih->saddr.byte3, - ih->saddr.byte4, - sport, - ih->daddr.byte1, - ih->daddr.byte2, - ih->daddr.byte3, - ih->daddr.byte4, - dport); -} +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifdef _MSC_VER +/* + * we do not want the warnings about the old deprecated and unsecure CRT functions + * since these examples can be compiled under *nix as well + */ +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include "pcap.h" + +/* 4 bytes IP address */ +typedef struct ip_address +{ + u_char byte1; + u_char byte2; + u_char byte3; + u_char byte4; +}ip_address; + +/* IPv4 header */ +typedef struct ip_header +{ + u_char ver_ihl; // Version (4 bits) + Internet header length (4 bits) + u_char tos; // Type of service + u_short tlen; // Total length + u_short identification; // Identification + u_short flags_fo; // Flags (3 bits) + Fragment offset (13 bits) + u_char ttl; // Time to live + u_char proto; // Protocol + u_short crc; // Header checksum + ip_address saddr; // Source address + ip_address daddr; // Destination address + u_int op_pad; // Option + Padding +}ip_header; + +/* UDP header*/ +typedef struct udp_header +{ + u_short sport; // Source port + u_short dport; // Destination port + u_short len; // Datagram length + u_short crc; // Checksum +}udp_header; + +/* prototype of the packet handler */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); + + +int main() +{ + pcap_if_t *alldevs; + pcap_if_t *d; + int inum; + int i=0; + pcap_t *adhandle; + char errbuf[PCAP_ERRBUF_SIZE]; + u_int netmask; + char packet_filter[] = "ip and udp"; + struct bpf_program fcode; + + /* Retrieve the device list */ + if(pcap_findalldevs(&alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf("%d", &inum); + + /* Check if the user specified a valid adapter */ + if(inum < 1 || inum > i) + { + printf("\nAdapter number out of range.\n"); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the adapter */ + if ((adhandle= pcap_open_live(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on all the MACs. + 1, // promiscuous mode (nonzero means promiscuous) + 1000, // read timeout + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Check the link layer. We support only Ethernet for simplicity. */ + if(pcap_datalink(adhandle) != DLT_EN10MB) + { + fprintf(stderr,"\nThis program works only on Ethernet networks.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + if(d->addresses != NULL) + /* Retrieve the mask of the first address of the interface */ + netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; + else + /* If the interface is without addresses we suppose to be in a C class network */ + netmask=0xffffff; + + + //compile the filter + if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 ) + { + fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + //set the filter + if (pcap_setfilter(adhandle, &fcode)<0) + { + fprintf(stderr,"\nError setting the filter.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + printf("\nlistening on %s...\n", d->description); + + /* At this point, we don't need any more the device list. Free it */ + pcap_freealldevs(alldevs); + + /* start the capture */ + pcap_loop(adhandle, 0, packet_handler, NULL); + + return 0; +} + +/* Callback function invoked by libpcap for every incoming packet */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) +{ + struct tm *ltime; + char timestr[16]; + ip_header *ih; + udp_header *uh; + u_int ip_len; + u_short sport,dport; + time_t local_tv_sec; + + /* + * unused parameter + */ + (VOID)(param); + + /* convert the timestamp to readable format */ + local_tv_sec = header->ts.tv_sec; + ltime=localtime(&local_tv_sec); + strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); + + /* print timestamp and length of the packet */ + printf("%s.%.6d len:%d ", timestr, header->ts.tv_usec, header->len); + + /* retireve the position of the ip header */ + ih = (ip_header *) (pkt_data + + 14); //length of ethernet header + + /* retireve the position of the udp header */ + ip_len = (ih->ver_ihl & 0xf) * 4; + uh = (udp_header *) ((u_char*)ih + ip_len); + + /* convert from network byte order to host byte order */ + sport = ntohs( uh->sport ); + dport = ntohs( uh->dport ); + + /* print ip addresses and udp ports */ + printf("%d.%d.%d.%d.%d -> %d.%d.%d.%d.%d\n", + ih->saddr.byte1, + ih->saddr.byte2, + ih->saddr.byte3, + ih->saddr.byte4, + sport, + ih->daddr.byte1, + ih->daddr.byte2, + ih->daddr.byte3, + ih->daddr.byte4, + dport); +} diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/GNUmakefile similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump/GNUmakefile index e10ff285..11951f4e 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = basic_dump.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o basic_dump.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} basic_dump.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Nate Lawson + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = basic_dump.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o basic_dump.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} basic_dump.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.c b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.c rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.c index 89fa6641..2980fd23 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.c @@ -1,109 +1,109 @@ -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum; - int i=0; - pcap_t *adhandle; - char errbuf[PCAP_ERRBUF_SIZE]; - - /* Retrieve the device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - /* Open the adapter */ - if ((adhandle= pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, NULL); - - pcap_close(adhandle); - return 0; -} - - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct tm *ltime; - char timestr[16]; - time_t local_tv_sec; - - /* - * unused parameters - */ - (VOID)(param); - (VOID)(pkt_data); - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - ltime=localtime(&local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); - - printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); - -} +#ifdef _MSC_VER +/* + * we do not want the warnings about the old deprecated and unsecure CRT functions + * since these examples can be compiled under *nix as well + */ +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include "pcap.h" + +/* prototype of the packet handler */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); + +int main() +{ + pcap_if_t *alldevs; + pcap_if_t *d; + int inum; + int i=0; + pcap_t *adhandle; + char errbuf[PCAP_ERRBUF_SIZE]; + + /* Retrieve the device list */ + if(pcap_findalldevs(&alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf("%d", &inum); + + if(inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the device */ + /* Open the adapter */ + if ((adhandle= pcap_open_live(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on all the MACs. + 1, // promiscuous mode (nonzero means promiscuous) + 1000, // read timeout + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + printf("\nlistening on %s...\n", d->description); + + /* At this point, we don't need any more the device list. Free it */ + pcap_freealldevs(alldevs); + + /* start the capture */ + pcap_loop(adhandle, 0, packet_handler, NULL); + + pcap_close(adhandle); + return 0; +} + + +/* Callback function invoked by libpcap for every incoming packet */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) +{ + struct tm *ltime; + char timestr[16]; + time_t local_tv_sec; + + /* + * unused parameters + */ + (VOID)(param); + (VOID)(pkt_data); + + /* convert the timestamp to readable format */ + local_tv_sec = header->ts.tv_sec; + ltime=localtime(&local_tv_sec); + strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); + + printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); + +} diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.dsp b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsp index 3e8bc029..7e74aaa0 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="basic_dump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=basic_dump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "basic_dump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "basic_dump.mak" CFG="basic_dump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "basic_dump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "basic_dump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "basic_dump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "basic_dump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "basic_dump - Win32 Release" -# Name "basic_dump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\basic_dump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="basic_dump" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=basic_dump - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "basic_dump.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "basic_dump.mak" CFG="basic_dump - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "basic_dump - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "basic_dump - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "basic_dump - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "basic_dump - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "basic_dump - Win32 Release" +# Name "basic_dump - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\basic_dump.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.dsw b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsw index 1f6a6ff4..34942091 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "basic_dump"=.\basic_dump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "basic_dump"=.\basic_dump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.vcproj index cf4907f4..6a3fe3da 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump/basic_dump.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/GNUmakefile similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/GNUmakefile index 708acd4b..aeeeea6a 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = basic_dump_ex.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o basic_dump_ex.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} basic_dump_ex.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Nate Lawson + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = basic_dump_ex.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o basic_dump_ex.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} basic_dump_ex.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.c b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.c rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.c index 4c109dcc..d4e6117d 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.c @@ -1,106 +1,106 @@ -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum; - int i=0; - pcap_t *adhandle; - int res; - char errbuf[PCAP_ERRBUF_SIZE]; - struct tm *ltime; - char timestr[16]; - struct pcap_pkthdr *header; - const u_char *pkt_data; - time_t local_tv_sec; - - - /* Retrieve the device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - return -1; - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the adapter */ - if ((adhandle= pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* Retrieve the packets */ - while((res = pcap_next_ex( adhandle, &header, &pkt_data)) >= 0){ - - if(res == 0) - /* Timeout elapsed */ - continue; - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - ltime=localtime(&local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); - - printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); - } - - if(res == -1){ - printf("Error reading the packets: %s\n", pcap_geterr(adhandle)); - return -1; - } - - pcap_close(adhandle); - return 0; -} +#ifdef _MSC_VER +/* + * we do not want the warnings about the old deprecated and unsecure CRT functions + * since these examples can be compiled under *nix as well + */ +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include "pcap.h" + +int main() +{ + pcap_if_t *alldevs; + pcap_if_t *d; + int inum; + int i=0; + pcap_t *adhandle; + int res; + char errbuf[PCAP_ERRBUF_SIZE]; + struct tm *ltime; + char timestr[16]; + struct pcap_pkthdr *header; + const u_char *pkt_data; + time_t local_tv_sec; + + + /* Retrieve the device list */ + if(pcap_findalldevs(&alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + return -1; + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf("%d", &inum); + + if(inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the adapter */ + if ((adhandle= pcap_open_live(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on all the MACs. + 1, // promiscuous mode (nonzero means promiscuous) + 1000, // read timeout + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + printf("\nlistening on %s...\n", d->description); + + /* At this point, we don't need any more the device list. Free it */ + pcap_freealldevs(alldevs); + + /* Retrieve the packets */ + while((res = pcap_next_ex( adhandle, &header, &pkt_data)) >= 0){ + + if(res == 0) + /* Timeout elapsed */ + continue; + + /* convert the timestamp to readable format */ + local_tv_sec = header->ts.tv_sec; + ltime=localtime(&local_tv_sec); + strftime( timestr, sizeof timestr, "%H:%M:%S", ltime); + + printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); + } + + if(res == -1){ + printf("Error reading the packets: %s\n", pcap_geterr(adhandle)); + return -1; + } + + pcap_close(adhandle); + return 0; +} diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp index e798f636..0405d292 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="basic_dump_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=basic_dump_ex - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "basic_dump_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "basic_dump_ex.mak" CFG="basic_dump_ex - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "basic_dump_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "basic_dump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "basic_dump_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "basic_dump_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "basic_dump_ex - Win32 Release" -# Name "basic_dump_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\basic_dump_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="basic_dump_ex" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=basic_dump_ex - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "basic_dump_ex.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "basic_dump_ex.mak" CFG="basic_dump_ex - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "basic_dump_ex - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "basic_dump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "basic_dump_ex - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "basic_dump_ex - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "basic_dump_ex - Win32 Release" +# Name "basic_dump_ex - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\basic_dump_ex.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw index e3364367..ff590dd5 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "basic_dump_ex"=.\basic_dump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "basic_dump_ex"=.\basic_dump_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj index 6c63b8e9..a8f42f25 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/basic_dump_ex/basic_dump_ex.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/iflist/GNUmakefile similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/iflist/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/iflist/GNUmakefile index 30c70138..01766bd3 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/iflist/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = iflist.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o iflist.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} iflist.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Nate Lawson + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = iflist.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o iflist.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} iflist.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.c b/libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.c similarity index 72% rename from libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.c rename to libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.c index 35f4c20b..d462afb1 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.c @@ -1,172 +1,172 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -#ifndef _WIN32 - #include - #include -#else - #include -#endif - - -// Function prototypes -void ifprint(pcap_if_t *d); -char *iptos(u_long in); -char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen); - - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - char errbuf[PCAP_ERRBUF_SIZE+1]; - - /* Retrieve the device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Scan the list printing every entry */ - for(d=alldevs;d;d=d->next) - { - ifprint(d); - } - - /* Free the device list */ - pcap_freealldevs(alldevs); - - return 1; -} - - - -/* Print all the available information on the given interface */ -void ifprint(pcap_if_t *d) -{ - pcap_addr_t *a; - char ip6str[128]; - - /* Name */ - printf("%s\n",d->name); - - /* Description */ - if (d->description) - printf("\tDescription: %s\n",d->description); - - /* Loopback Address*/ - printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no"); - - /* IP addresses */ - for(a=d->addresses;a;a=a->next) { - printf("\tAddress Family: #%d\n",a->addr->sa_family); - - switch(a->addr->sa_family) - { - case AF_INET: - printf("\tAddress Family Name: AF_INET\n"); - if (a->addr) - printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr)); - if (a->netmask) - printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr)); - if (a->broadaddr) - printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr)); - if (a->dstaddr) - printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr)); - break; - - case AF_INET6: - printf("\tAddress Family Name: AF_INET6\n"); -#ifndef __MINGW32__ /* Cygnus doesn't have IPv6 */ - if (a->addr) - printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str))); -#endif - break; - - default: - printf("\tAddress Family Name: Unknown\n"); - break; - } - } - printf("\n"); -} - -/* From tcptraceroute, convert a numeric IP address to a string */ -#define IPTOSBUFFERS 12 -char *iptos(u_long in) -{ - static char output[IPTOSBUFFERS][3*4+3+1]; - static short which; - u_char *p; - - p = (u_char *)∈ - which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); - sprintf(output[which], "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); - return output[which]; -} - -#ifndef __MINGW32__ /* Cygnus doesn't have IPv6 */ -char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen) -{ - socklen_t sockaddrlen; - - #ifdef _WIN32 - sockaddrlen = sizeof(struct sockaddr_in6); - #else - sockaddrlen = sizeof(struct sockaddr_storage); - #endif - - - if(getnameinfo(sockaddr, - sockaddrlen, - address, - addrlen, - NULL, - 0, - NI_NUMERICHOST) != 0) address = NULL; - - return address; -} -#endif /* __MINGW32__ */ - +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifdef _MSC_VER +/* + * we do not want the warnings about the old deprecated and unsecure CRT functions + * since these examples can be compiled under *nix as well + */ +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include "pcap.h" + +#ifndef WIN32 + #include + #include +#else + #include +#endif + + +// Function prototypes +void ifprint(pcap_if_t *d); +char *iptos(u_long in); +char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen); + + +int main() +{ + pcap_if_t *alldevs; + pcap_if_t *d; + char errbuf[PCAP_ERRBUF_SIZE+1]; + + /* Retrieve the device list */ + if(pcap_findalldevs(&alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Scan the list printing every entry */ + for(d=alldevs;d;d=d->next) + { + ifprint(d); + } + + /* Free the device list */ + pcap_freealldevs(alldevs); + + return 1; +} + + + +/* Print all the available information on the given interface */ +void ifprint(pcap_if_t *d) +{ + pcap_addr_t *a; + char ip6str[128]; + + /* Name */ + printf("%s\n",d->name); + + /* Description */ + if (d->description) + printf("\tDescription: %s\n",d->description); + + /* Loopback Address*/ + printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no"); + + /* IP addresses */ + for(a=d->addresses;a;a=a->next) { + printf("\tAddress Family: #%d\n",a->addr->sa_family); + + switch(a->addr->sa_family) + { + case AF_INET: + printf("\tAddress Family Name: AF_INET\n"); + if (a->addr) + printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr)); + if (a->netmask) + printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr)); + if (a->broadaddr) + printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr)); + if (a->dstaddr) + printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr)); + break; + + case AF_INET6: + printf("\tAddress Family Name: AF_INET6\n"); +#ifndef __MINGW32__ /* Cygnus doesn't have IPv6 */ + if (a->addr) + printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str))); +#endif + break; + + default: + printf("\tAddress Family Name: Unknown\n"); + break; + } + } + printf("\n"); +} + +/* From tcptraceroute, convert a numeric IP address to a string */ +#define IPTOSBUFFERS 12 +char *iptos(u_long in) +{ + static char output[IPTOSBUFFERS][3*4+3+1]; + static short which; + u_char *p; + + p = (u_char *)∈ + which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); + sprintf(output[which], "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); + return output[which]; +} + +#ifndef __MINGW32__ /* Cygnus doesn't have IPv6 */ +char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen) +{ + socklen_t sockaddrlen; + + #ifdef WIN32 + sockaddrlen = sizeof(struct sockaddr_in6); + #else + sockaddrlen = sizeof(struct sockaddr_storage); + #endif + + + if(getnameinfo(sockaddr, + sockaddrlen, + address, + addrlen, + NULL, + 0, + NI_NUMERICHOST) != 0) address = NULL; + + return address; +} +#endif /* __MINGW32__ */ + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.dsp b/libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsp index b1a8c8c3..41823644 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="iflist" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=iflist - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "iflist.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "iflist.mak" CFG="iflist - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "iflist - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "iflist - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "iflist - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "iflist - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "iflist - Win32 Release" -# Name "iflist - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\iflist.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="iflist" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=iflist - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "iflist.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "iflist.mak" CFG="iflist - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "iflist - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "iflist - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "iflist - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "iflist - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "iflist - Win32 Release" +# Name "iflist - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\iflist.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.dsw b/libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsw index 6bd686d0..1425db24 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "iflist"=.\iflist.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "iflist"=.\iflist.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.vcproj index 779c0012..709a8047 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/iflist/iflist.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/iflist/iflist.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/GNUmakefile similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/GNUmakefile index ca84d01a..22523930 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = pcap_filter.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o pf.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} pf.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Nate Lawson + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = pcap_filter.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o pf.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} pf.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/Makefile.unix b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/Makefile.unix new file mode 100644 index 00000000..f1997880 --- /dev/null +++ b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/Makefile.unix @@ -0,0 +1,9 @@ + +CC = gcc +INCLDIR = -I /usr/src/sys +LIBS = -lpcap + +pktdump: pcap_filter.o + $(CC) $(INCLDIR) pcap_filter.o $(LIBS) -o pf + rm *.o + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.c b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.c similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.c rename to libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.c index e910488e..d2f6e367 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.c @@ -1,179 +1,179 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - -#include - -#define MAX_PRINT 80 -#define MAX_LINE 16 - - -void usage(); - - -int main(int argc, char **argv) -{ - pcap_t *fp; - char errbuf[PCAP_ERRBUF_SIZE]; - char *source = NULL; - char *ofilename = NULL; - char *filter = NULL; - int i; - pcap_dumper_t *dumpfile; - struct bpf_program fcode; - bpf_u_int32 NetMask; - int res; - struct pcap_pkthdr *header; - const u_char *pkt_data; - - if (argc == 1) - { - usage(); - return -1; - } - - /* Parse parameters */ - for(i=1;i < argc; i+= 2) - { - switch (argv[i] [1]) - { - case 's': - { - source=argv[i+1]; - }; - break; - - case 'o': - { - ofilename=argv[i+1]; - }; - break; - - case 'f': - { - filter=argv[i+1]; - }; - break; - } - } - - // open a capture from the network - if (source != NULL) - { - if ((fp = pcap_open_live(source, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter.\n"); - return -2; - } - } - else usage(); - - if (filter != NULL) - { - // We should loop through the adapters returned by the pcap_findalldevs_ex() - // in order to locate the correct one. - // - // Let's do things simpler: we suppose to be in a C class network ;-) - NetMask=0xffffff; - - //compile the filter - if(pcap_compile(fp, &fcode, filter, 1, NetMask) < 0) - { - fprintf(stderr,"\nError compiling filter: wrong syntax.\n"); - - pcap_close(fp); - return -3; - } - - //set the filter - if(pcap_setfilter(fp, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter\n"); - - pcap_close(fp); - return -4; - } - - } - - //open the dump file - if (ofilename != NULL) - { - dumpfile= pcap_dump_open(fp, ofilename); - - if (dumpfile == NULL) - { - fprintf(stderr,"\nError opening output file\n"); - - pcap_close(fp); - return -5; - } - } - else usage(); - - //start the capture - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - - if(res == 0) - /* Timeout elapsed */ - continue; - - //save the packet on the dump file - pcap_dump((unsigned char *) dumpfile, header, pkt_data); - - } - - pcap_close(fp); - pcap_dump_close(dumpfile); - - return 0; -} - - -void usage() -{ - - printf("\npf - Generic Packet Filter.\n"); - printf("\nUsage:\npf -s source -o output_file_name [-f filter_string]\n\n"); - exit(0); -} +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include +#include + +#include + +#define MAX_PRINT 80 +#define MAX_LINE 16 + + +void usage(); + + +int main(int argc, char **argv) +{ + pcap_t *fp; + char errbuf[PCAP_ERRBUF_SIZE]; + char *source = NULL; + char *ofilename = NULL; + char *filter = NULL; + int i; + pcap_dumper_t *dumpfile; + struct bpf_program fcode; + bpf_u_int32 NetMask; + int res; + struct pcap_pkthdr *header; + const u_char *pkt_data; + + if (argc == 1) + { + usage(); + return -1; + } + + /* Parse parameters */ + for(i=1;i < argc; i+= 2) + { + switch (argv[i] [1]) + { + case 's': + { + source=argv[i+1]; + }; + break; + + case 'o': + { + ofilename=argv[i+1]; + }; + break; + + case 'f': + { + filter=argv[i+1]; + }; + break; + } + } + + // open a capture from the network + if (source != NULL) + { + if ((fp = pcap_open_live(source, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on all the MACs. + 1, // promiscuous mode (nonzero means promiscuous) + 1000, // read timeout + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter.\n"); + return -2; + } + } + else usage(); + + if (filter != NULL) + { + // We should loop through the adapters returned by the pcap_findalldevs_ex() + // in order to locate the correct one. + // + // Let's do things simpler: we suppose to be in a C class network ;-) + NetMask=0xffffff; + + //compile the filter + if(pcap_compile(fp, &fcode, filter, 1, NetMask) < 0) + { + fprintf(stderr,"\nError compiling filter: wrong syntax.\n"); + + pcap_close(fp); + return -3; + } + + //set the filter + if(pcap_setfilter(fp, &fcode)<0) + { + fprintf(stderr,"\nError setting the filter\n"); + + pcap_close(fp); + return -4; + } + + } + + //open the dump file + if (ofilename != NULL) + { + dumpfile= pcap_dump_open(fp, ofilename); + + if (dumpfile == NULL) + { + fprintf(stderr,"\nError opening output file\n"); + + pcap_close(fp); + return -5; + } + } + else usage(); + + //start the capture + while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) + { + + if(res == 0) + /* Timeout elapsed */ + continue; + + //save the packet on the dump file + pcap_dump((unsigned char *) dumpfile, header, pkt_data); + + } + + pcap_close(fp); + pcap_dump_close(dumpfile); + + return 0; +} + + +void usage() +{ + + printf("\npf - Generic Packet Filter.\n"); + printf("\nUsage:\npf -s source -o output_file_name [-f filter_string]\n\n"); + exit(0); +} diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.dsp b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsp index 5bd65b5b..c01d2e7e 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="pcap_filter" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pcap_filter - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pcap_filter.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pcap_filter.mak" CFG="pcap_filter - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pcap_filter - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pcap_filter - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pcap_filter - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 /out:"Release/pf.exe" - -!ELSEIF "$(CFG)" == "pcap_filter - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/pf.exe" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "pcap_filter - Win32 Release" -# Name "pcap_filter - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pcap_filter.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="pcap_filter" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=pcap_filter - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "pcap_filter.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "pcap_filter.mak" CFG="pcap_filter - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "pcap_filter - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "pcap_filter - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "pcap_filter - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 /out:"Release/pf.exe" + +!ELSEIF "$(CFG)" == "pcap_filter - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/pf.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "pcap_filter - Win32 Release" +# Name "pcap_filter - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\pcap_filter.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.dsw b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsw index a9031834..1d39119b 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pcap_filter"=.\pcap_filter.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "pcap_filter"=.\pcap_filter.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.vcproj index ec5450df..e6fe721c 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/pcap_filter/pcap_filter.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/GNUmakefile similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/GNUmakefile index f649ce3c..db276c59 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/GNUmakefile @@ -1,14 +1,14 @@ -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = pktdump_ex.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o pktdump_ex.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} pktdump_ex.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = pktdump_ex.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o pktdump_ex.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} pktdump_ex.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.c b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.c rename to libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.c index 6ff42cac..383eaa97 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.c @@ -1,166 +1,166 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include -#include - -#include - -#define LINE_LEN 16 - - -int main(int argc, char **argv) -{ - pcap_if_t *alldevs, *d; - pcap_t *fp; - u_int inum, i=0; - char errbuf[PCAP_ERRBUF_SIZE]; - int res; - struct pcap_pkthdr *header; - const u_char *pkt_data; - - printf("pktdump_ex: prints the packets of the network using WinPcap.\n"); - printf(" Usage: pktdump_ex [-s source]\n\n" - " Examples:\n" - " pktdump_ex -s file.acp\n" - " pktdump_ex -s \\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n"); - - if(argc < 3) - { - printf("\nNo adapter selected: printing the device list:\n"); - /* The user didn't provide a packet source: Retrieve the local device list */ - if(pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s\n ", ++i, d->name); - - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if (i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - if (inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the adapter */ - if ((fp = pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nError opening adapter\n"); - return -1; - } - } - else - { - /* Do not check for the switch type ('-s') */ - if ((fp = pcap_open_live(argv[2], // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nError opening adapter\n"); - return -1; - } - } - - /* Read the packets */ - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - - if(res == 0) - /* Timeout elapsed */ - continue; - - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - } - - if(res == -1) - { - printf("Error reading the packets: %s\n", pcap_geterr(fp)); - return -1; - } - - pcap_close(fp); - return 0; -} +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifdef _MSC_VER +/* + * we do not want the warnings about the old deprecated and unsecure CRT functions + * since these examples can be compiled under *nix as well + */ +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include +#include + +#include + +#define LINE_LEN 16 + + +int main(int argc, char **argv) +{ + pcap_if_t *alldevs, *d; + pcap_t *fp; + u_int inum, i=0; + char errbuf[PCAP_ERRBUF_SIZE]; + int res; + struct pcap_pkthdr *header; + const u_char *pkt_data; + + printf("pktdump_ex: prints the packets of the network using WinPcap.\n"); + printf(" Usage: pktdump_ex [-s source]\n\n" + " Examples:\n" + " pktdump_ex -s file.acp\n" + " pktdump_ex -s \\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n"); + + if(argc < 3) + { + printf("\nNo adapter selected: printing the device list:\n"); + /* The user didn't provide a packet source: Retrieve the local device list */ + if(pcap_findalldevs(&alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s\n ", ++i, d->name); + + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if (i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf("%d", &inum); + + if (inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the adapter */ + if ((fp = pcap_open_live(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on all the MACs. + 1, // promiscuous mode (nonzero means promiscuous) + 1000, // read timeout + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nError opening adapter\n"); + return -1; + } + } + else + { + /* Do not check for the switch type ('-s') */ + if ((fp = pcap_open_live(argv[2], // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on all the MACs. + 1, // promiscuous mode (nonzero means promiscuous) + 1000, // read timeout + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nError opening adapter\n"); + return -1; + } + } + + /* Read the packets */ + while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) + { + + if(res == 0) + /* Timeout elapsed */ + continue; + + /* print pkt timestamp and pkt len */ + printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); + + /* Print the packet */ + for (i=1; (i < header->caplen + 1 ) ; i++) + { + printf("%.2x ", pkt_data[i-1]); + if ( (i % LINE_LEN) == 0) printf("\n"); + } + + printf("\n\n"); + } + + if(res == -1) + { + printf("Error reading the packets: %s\n", pcap_geterr(fp)); + return -1; + } + + pcap_close(fp); + return 0; +} diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.dsp b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsp index 85c062da..a9800e6a 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="pktdump_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pktdump_ex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pktdump_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pktdump_ex.mak" CFG="pktdump_ex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pktdump_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pktdump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pktdump_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "pktdump_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "pktdump_ex - Win32 Release" -# Name "pktdump_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pktdump_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="pktdump_ex" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=pktdump_ex - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "pktdump_ex.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "pktdump_ex.mak" CFG="pktdump_ex - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "pktdump_ex - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "pktdump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "pktdump_ex - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "pktdump_ex - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "pktdump_ex - Win32 Release" +# Name "pktdump_ex - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\pktdump_ex.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.dsw b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsw index b0f6812f..ec247333 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pktdump_ex"=.\pktdump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "pktdump_ex"=.\pktdump_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.vcproj index 74b98e56..f477c047 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/pktdump_ex/pktdump_ex.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/readfile/GNUmakefile similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/readfile/GNUmakefile index fe4bae3a..967bc186 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = readfile.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o readfile.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} readfile.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Nate Lawson + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = readfile.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o readfile.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} readfile.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.c b/libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.c similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.c rename to libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.c index 187634f0..c62dc463 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.c @@ -1,61 +1,61 @@ -#include -#include - -#define LINE_LEN 16 - -void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); - -int main(int argc, char **argv) -{ - pcap_t *fp; - char errbuf[PCAP_ERRBUF_SIZE]; - - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - - } - - /* Open the capture file */ - if ((fp = pcap_open_offline(argv[1], // name of the device - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", argv[1]); - return -1; - } - - /* read and dispatch packets until EOF is reached */ - pcap_loop(fp, 0, dispatcher_handler, NULL); - - pcap_close(fp); - return 0; -} - - - -void dispatcher_handler(u_char *temp1, - const struct pcap_pkthdr *header, - const u_char *pkt_data) -{ - u_int i=0; - - /* - * unused variable - */ - (VOID*)temp1; - - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - -} +#include +#include + +#define LINE_LEN 16 + +void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); + +int main(int argc, char **argv) +{ + pcap_t *fp; + char errbuf[PCAP_ERRBUF_SIZE]; + + if(argc != 2) + { + printf("usage: %s filename", argv[0]); + return -1; + + } + + /* Open the capture file */ + if ((fp = pcap_open_offline(argv[1], // name of the device + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the file %s.\n", argv[1]); + return -1; + } + + /* read and dispatch packets until EOF is reached */ + pcap_loop(fp, 0, dispatcher_handler, NULL); + + pcap_close(fp); + return 0; +} + + + +void dispatcher_handler(u_char *temp1, + const struct pcap_pkthdr *header, + const u_char *pkt_data) +{ + u_int i=0; + + /* + * unused variable + */ + (VOID*)temp1; + + /* print pkt timestamp and pkt len */ + printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); + + /* Print the packet */ + for (i=1; (i < header->caplen + 1 ) ; i++) + { + printf("%.2x ", pkt_data[i-1]); + if ( (i % LINE_LEN) == 0) printf("\n"); + } + + printf("\n\n"); + +} diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.dsp b/libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsp index 88972bb5..5d45bde1 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="readfile" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readfile - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readfile.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readfile.mak" CFG="readfile - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readfile - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readfile - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readfile - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "readfile - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "readfile - Win32 Release" -# Name "readfile - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\readfile.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="readfile" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=readfile - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "readfile.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "readfile.mak" CFG="readfile - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "readfile - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "readfile - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "readfile - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "readfile - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "readfile - Win32 Release" +# Name "readfile - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\readfile.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.dsw b/libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsw index f971e0b6..7565dbde 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "readfile"=.\readfile.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "readfile"=.\readfile.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.vcproj index 46e9df92..20b30c3f 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile/readfile.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/GNUmakefile similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/GNUmakefile index 34087211..3eaba961 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = readfile_ex.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o readfile_ex.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} readfile_ex.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Nate Lawson + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = readfile_ex.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o readfile_ex.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} readfile_ex.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.c b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.c similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.c rename to libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.c index 2324c065..9b6e9ed2 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.c @@ -1,56 +1,56 @@ -#include -#include - -#define LINE_LEN 16 - -int main(int argc, char **argv) -{ - pcap_t *fp; - char errbuf[PCAP_ERRBUF_SIZE]; - struct pcap_pkthdr *header; - const u_char *pkt_data; - u_int i=0; - int res; - - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - - } - - /* Open the capture file */ - if ((fp = pcap_open_offline(argv[1], // name of the device - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", argv[1]); - return -1; - } - - /* Retrieve the packets from the file */ - while((res = pcap_next_ex(fp, &header, &pkt_data)) >= 0) - { - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - } - - - if (res == -1) - { - printf("Error reading the packets: %s\n", pcap_geterr(fp)); - } - - pcap_close(fp); - return 0; -} - +#include +#include + +#define LINE_LEN 16 + +int main(int argc, char **argv) +{ + pcap_t *fp; + char errbuf[PCAP_ERRBUF_SIZE]; + struct pcap_pkthdr *header; + const u_char *pkt_data; + u_int i=0; + int res; + + if(argc != 2) + { + printf("usage: %s filename", argv[0]); + return -1; + + } + + /* Open the capture file */ + if ((fp = pcap_open_offline(argv[1], // name of the device + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the file %s.\n", argv[1]); + return -1; + } + + /* Retrieve the packets from the file */ + while((res = pcap_next_ex(fp, &header, &pkt_data)) >= 0) + { + /* print pkt timestamp and pkt len */ + printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); + + /* Print the packet */ + for (i=1; (i < header->caplen + 1 ) ; i++) + { + printf("%.2x ", pkt_data[i-1]); + if ( (i % LINE_LEN) == 0) printf("\n"); + } + + printf("\n\n"); + } + + + if (res == -1) + { + printf("Error reading the packets: %s\n", pcap_geterr(fp)); + } + + pcap_close(fp); + return 0; +} + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.dsp b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsp index 2c1b4889..07dcf9ff 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="readfile_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readfile_ex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readfile_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readfile_ex.mak" CFG="readfile_ex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readfile_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readfile_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readfile_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "readfile_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "readfile_ex - Win32 Release" -# Name "readfile_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\readfile_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="readfile_ex" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=readfile_ex - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "readfile_ex.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "readfile_ex.mak" CFG="readfile_ex - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "readfile_ex - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "readfile_ex - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "readfile_ex - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "readfile_ex - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "readfile_ex - Win32 Release" +# Name "readfile_ex - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\readfile_ex.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.dsw b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsw index 2713b365..8e4c3065 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "readfile_ex"=.\readfile_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "readfile_ex"=.\readfile_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.vcproj index a75e0dd9..d7c16b41 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/readfile_ex/readfile_ex.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/savedump/GNUmakefile similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/savedump/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/savedump/GNUmakefile index fd98a3ab..86bbaa0a 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/savedump/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = savedump.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o savedump.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} savedump.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Nate Lawson + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = savedump.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o savedump.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} savedump.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.c b/libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.c rename to libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.c index 84273a7e..17456a77 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.c @@ -1,111 +1,111 @@ -#ifdef _MSC_VER -/* - * we do not want the warnings about the old deprecated and unsecure CRT functions - * since these examples can be compiled under *nix as well - */ -#define _CRT_SECURE_NO_WARNINGS -#endif - -#include "pcap.h" - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int main(int argc, char **argv) -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum; - int i=0; - pcap_t *adhandle; - char errbuf[PCAP_ERRBUF_SIZE]; - pcap_dumper_t *dumpfile; - - - /* Check command line */ - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - } - - /* Retrieve the device list on the local machine */ - if (pcap_findalldevs(&alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - - /* Open the adapter */ - if ((adhandle= pcap_open_live(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Open the dump file */ - dumpfile = pcap_dump_open(adhandle, argv[1]); - - if(dumpfile==NULL) - { - fprintf(stderr,"\nError opening output file\n"); - return -1; - } - - printf("\nlistening on %s... Press Ctrl+C to stop...\n", d->description); - - /* At this point, we no longer need the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile); - - pcap_close(adhandle); - return 0; -} - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *dumpfile, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - /* save the packet on the dump file */ - pcap_dump(dumpfile, header, pkt_data); -} +#ifdef _MSC_VER +/* + * we do not want the warnings about the old deprecated and unsecure CRT functions + * since these examples can be compiled under *nix as well + */ +#define _CRT_SECURE_NO_WARNINGS +#endif + +#include "pcap.h" + +/* prototype of the packet handler */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); + +int main(int argc, char **argv) +{ + pcap_if_t *alldevs; + pcap_if_t *d; + int inum; + int i=0; + pcap_t *adhandle; + char errbuf[PCAP_ERRBUF_SIZE]; + pcap_dumper_t *dumpfile; + + + /* Check command line */ + if(argc != 2) + { + printf("usage: %s filename", argv[0]); + return -1; + } + + /* Retrieve the device list on the local machine */ + if (pcap_findalldevs(&alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf("%d", &inum); + + if(inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + + /* Open the adapter */ + if ((adhandle= pcap_open_live(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on all the MACs. + 1, // promiscuous mode (nonzero means promiscuous) + 1000, // read timeout + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Open the dump file */ + dumpfile = pcap_dump_open(adhandle, argv[1]); + + if(dumpfile==NULL) + { + fprintf(stderr,"\nError opening output file\n"); + return -1; + } + + printf("\nlistening on %s... Press Ctrl+C to stop...\n", d->description); + + /* At this point, we no longer need the device list. Free it */ + pcap_freealldevs(alldevs); + + /* start the capture */ + pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile); + + pcap_close(adhandle); + return 0; +} + +/* Callback function invoked by libpcap for every incoming packet */ +void packet_handler(u_char *dumpfile, const struct pcap_pkthdr *header, const u_char *pkt_data) +{ + /* save the packet on the dump file */ + pcap_dump(dumpfile, header, pkt_data); +} diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.dsp b/libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsp index 7d2e366b..22d5d399 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="savedump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=savedump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "savedump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "savedump.mak" CFG="savedump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "savedump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "savedump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "savedump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "savedump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "savedump - Win32 Release" -# Name "savedump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\savedump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="savedump" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=savedump - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "savedump.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "savedump.mak" CFG="savedump - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "savedump - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "savedump - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "savedump - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "savedump - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "savedump - Win32 Release" +# Name "savedump - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\savedump.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.dsw b/libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsw index 32473951..b0e9fc64 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "savedump"=.\savedump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "savedump"=.\savedump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.vcproj index 79f6b461..00873281 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/savedump/savedump.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/GNUmakefile b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/GNUmakefile similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/sendpack/GNUmakefile rename to libs/WpdPack_4_1_2/Examples-pcap/sendpack/GNUmakefile index 54939a6f..60fd211d 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/GNUmakefile +++ b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/GNUmakefile @@ -1,17 +1,17 @@ -# Makefile for cygwin gcc -# Nate Lawson - -PCAP_PATH = ../../lib -CFLAGS = -g -O -mno-cygwin -I ../../include - -OBJS = sendpack.o -LIBS = -L ${PCAP_PATH} -lwpcap - -all: ${OBJS} - ${CC} ${CFLAGS} -o sendpack.exe ${OBJS} ${LIBS} - -clean: - rm -f ${OBJS} sendpack.exe - -.c.o: - ${CC} ${CFLAGS} -c -o $*.o $< +# Makefile for cygwin gcc +# Nate Lawson + +PCAP_PATH = ../../lib +CFLAGS = -g -O -mno-cygwin -I ../../include + +OBJS = sendpack.o +LIBS = -L ${PCAP_PATH} -lwpcap + +all: ${OBJS} + ${CC} ${CFLAGS} -o sendpack.exe ${OBJS} ${LIBS} + +clean: + rm -f ${OBJS} sendpack.exe + +.c.o: + ${CC} ${CFLAGS} -c -o $*.o $< diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.c b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.c similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.c rename to libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.c index 28af84cf..7c68c910 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.c +++ b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.c @@ -1,68 +1,68 @@ -#include -#include - -#include - - -int main(int argc, char **argv) -{ - pcap_t *fp; - char errbuf[PCAP_ERRBUF_SIZE]; - u_char packet[100]; - int i; - - /* Check the validity of the command line */ - if (argc != 2) - { - printf("usage: %s interface", argv[0]); - return 1; - } - - /* Open the adapter */ - if ((fp = pcap_open_live(argv[1], // name of the device - 65536, // portion of the packet to capture. It doesn't matter in this case - 1, // promiscuous mode (nonzero means promiscuous) - 1000, // read timeout - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]); - return 2; - } - - /* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */ - packet[0]=1; - packet[1]=1; - packet[2]=1; - packet[3]=1; - packet[4]=1; - packet[5]=1; - - /* set mac source to 2:2:2:2:2:2 */ - packet[6]=2; - packet[7]=2; - packet[8]=2; - packet[9]=2; - packet[10]=2; - packet[11]=2; - - /* Fill the rest of the packet */ - for(i=12;i<100;i++) - { - packet[i]= (u_char)i; - } - - /* Send down the packet */ - if (pcap_sendpacket(fp, // Adapter - packet, // buffer with the packet - 100 // size - ) != 0) - { - fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp)); - return 3; - } - - pcap_close(fp); - return 0; -} - +#include +#include + +#include + + +int main(int argc, char **argv) +{ + pcap_t *fp; + char errbuf[PCAP_ERRBUF_SIZE]; + u_char packet[100]; + int i; + + /* Check the validity of the command line */ + if (argc != 2) + { + printf("usage: %s interface", argv[0]); + return 1; + } + + /* Open the adapter */ + if ((fp = pcap_open_live(argv[1], // name of the device + 65536, // portion of the packet to capture. It doesn't matter in this case + 1, // promiscuous mode (nonzero means promiscuous) + 1000, // read timeout + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]); + return 2; + } + + /* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */ + packet[0]=1; + packet[1]=1; + packet[2]=1; + packet[3]=1; + packet[4]=1; + packet[5]=1; + + /* set mac source to 2:2:2:2:2:2 */ + packet[6]=2; + packet[7]=2; + packet[8]=2; + packet[9]=2; + packet[10]=2; + packet[11]=2; + + /* Fill the rest of the packet */ + for(i=12;i<100;i++) + { + packet[i]= (u_char)i; + } + + /* Send down the packet */ + if (pcap_sendpacket(fp, // Adapter + packet, // buffer with the packet + 100 // size + ) != 0) + { + fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp)); + return 3; + } + + pcap_close(fp); + return 0; +} + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.dsp b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.dsp rename to libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsp index 982ce670..95022e37 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.dsp +++ b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="sendpack" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sendpack - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sendpack.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sendpack.mak" CFG="sendpack - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sendpack - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sendpack - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sendpack - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "sendpack - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "sendpack - Win32 Release" -# Name "sendpack - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sendpack.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="sendpack" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=sendpack - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "sendpack.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "sendpack.mak" CFG="sendpack - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "sendpack - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "sendpack - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "sendpack - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "sendpack - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "sendpack - Win32 Release" +# Name "sendpack - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\sendpack.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.dsw b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.dsw rename to libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsw index 3e0424d3..1ccadc7f 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.dsw +++ b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "sendpack"=.\sendpack.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "sendpack"=.\sendpack.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.vcproj b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.vcproj rename to libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.vcproj index 1a48c44c..6a6b1c22 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.vcproj +++ b/libs/WpdPack_4_1_2/Examples-pcap/sendpack/sendpack.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/MakeAll.sln b/libs/WpdPack_4_1_2/Examples-remote/MakeAll.sln similarity index 98% rename from libs/WinPcap-413-173-b4/Examples-remote/MakeAll.sln rename to libs/WpdPack_4_1_2/Examples-remote/MakeAll.sln index fde1f41b..f22bc478 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/MakeAll.sln +++ b/libs/WpdPack_4_1_2/Examples-remote/MakeAll.sln @@ -1,196 +1,196 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iflist", "iflist\iflist.vcproj", "{B0C740E1-73A3-43C7-B0CB-B715A4E691DD}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "misc\basic_dump.vcproj", "{66297062-96A0-4F0E-B147-3C8384031232}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "misc\basic_dump_ex.vcproj", "{92849630-6B09-409C-A7AD-E91E682558B1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "misc\readfile.vcproj", "{161E7606-F4CD-4A04-AB6B-5837F7818EE1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "misc\readfile_ex.vcproj", "{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "misc\savedump.vcproj", "{1B8791CB-DD15-46BF-B0A2-879892085538}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "misc\sendpack.vcproj", "{1C376689-5F61-48E7-AE83-0DED9EE9E458}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_filter", "pcap_filter\pcap_filter.vcproj", "{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pktdump_ex", "pktdump_ex\pktdump_ex.vcproj", "{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendcap", "sendcap\sendcap.vcproj", "{C6712171-F9B8-4A1E-A774-5D93C9116CEE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smp_1", "smp_1\smp_1.vcproj", "{21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcptop", "tcptop\tcptop.vcproj", "{B671D5DF-3A80-4A21-BC01-79E3FB73D372}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDPdump", "UDPdump\UDPdump.vcproj", "{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserBridge", "UserLevelBridge\UserBridge.vcproj", "{BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetMacAddress", "PacketDriver\GetMacAddress\GetMacAddress.vcproj", "{0E6A3C08-86E8-495B-976B-2666AB16501C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPacketCapture", "PacketDriver\TestPacketCapture\TestPacketCapture.vcproj", "{79942922-E02C-486D-9EE3-A13C0876C4C2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPacketSend", "PacketDriver\TestPacketSend\TestPacketSend.vcproj", "{1E3BED58-2F2C-463A-B9FD-9A55235C6840}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_fopen", "pcap_fopen\pcap_fopen.vcproj", "{DD317CB5-6337-498F-A560-553B5558E133}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|Win32.ActiveCfg = Debug|Win32 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|Win32.Build.0 = Debug|Win32 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|x64.ActiveCfg = Debug|x64 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|x64.Build.0 = Debug|x64 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|Win32.ActiveCfg = Release|Win32 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|Win32.Build.0 = Release|Win32 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|x64.ActiveCfg = Release|x64 - {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|x64.Build.0 = Release|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.ActiveCfg = Debug|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.Build.0 = Debug|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.ActiveCfg = Debug|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.Build.0 = Debug|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.ActiveCfg = Release|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.Build.0 = Release|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.ActiveCfg = Release|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.Build.0 = Release|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.ActiveCfg = Debug|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.Build.0 = Debug|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.ActiveCfg = Debug|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.Build.0 = Debug|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.ActiveCfg = Release|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.Build.0 = Release|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.ActiveCfg = Release|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.Build.0 = Release|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.ActiveCfg = Debug|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.Build.0 = Debug|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.ActiveCfg = Debug|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.Build.0 = Debug|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.ActiveCfg = Release|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.Build.0 = Release|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.ActiveCfg = Release|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.Build.0 = Release|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.ActiveCfg = Debug|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.Build.0 = Debug|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.ActiveCfg = Debug|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.Build.0 = Debug|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.ActiveCfg = Release|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.Build.0 = Release|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.ActiveCfg = Release|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.Build.0 = Release|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.ActiveCfg = Debug|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.Build.0 = Debug|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.ActiveCfg = Debug|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.Build.0 = Debug|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.ActiveCfg = Release|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.Build.0 = Release|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.ActiveCfg = Release|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.Build.0 = Release|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.ActiveCfg = Debug|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.Build.0 = Debug|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.ActiveCfg = Debug|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.Build.0 = Debug|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.ActiveCfg = Release|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.Build.0 = Release|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.ActiveCfg = Release|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.Build.0 = Release|x64 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|Win32.ActiveCfg = Debug|Win32 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|Win32.Build.0 = Debug|Win32 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x64.ActiveCfg = Debug|x64 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x64.Build.0 = Debug|x64 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|Win32.ActiveCfg = Release|Win32 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|Win32.Build.0 = Release|Win32 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x64.ActiveCfg = Release|x64 - {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x64.Build.0 = Release|x64 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|Win32.ActiveCfg = Debug|Win32 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|Win32.Build.0 = Debug|Win32 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x64.ActiveCfg = Debug|x64 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x64.Build.0 = Debug|x64 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|Win32.ActiveCfg = Release|Win32 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|Win32.Build.0 = Release|Win32 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x64.ActiveCfg = Release|x64 - {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x64.Build.0 = Release|x64 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|Win32.ActiveCfg = Debug|Win32 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|Win32.Build.0 = Debug|Win32 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|x64.ActiveCfg = Debug|x64 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|x64.Build.0 = Debug|x64 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|Win32.ActiveCfg = Release|Win32 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|Win32.Build.0 = Release|Win32 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|x64.ActiveCfg = Release|x64 - {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|x64.Build.0 = Release|x64 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|Win32.ActiveCfg = Debug|Win32 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|Win32.Build.0 = Debug|Win32 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|x64.ActiveCfg = Debug|x64 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|x64.Build.0 = Debug|x64 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|Win32.ActiveCfg = Release|Win32 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|Win32.Build.0 = Release|Win32 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|x64.ActiveCfg = Release|x64 - {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|x64.Build.0 = Release|x64 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|Win32.ActiveCfg = Debug|Win32 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|Win32.Build.0 = Debug|Win32 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|x64.ActiveCfg = Debug|x64 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|x64.Build.0 = Debug|x64 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|Win32.ActiveCfg = Release|Win32 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|Win32.Build.0 = Release|Win32 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|x64.ActiveCfg = Release|x64 - {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|x64.Build.0 = Release|x64 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|Win32.ActiveCfg = Debug|Win32 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|Win32.Build.0 = Debug|Win32 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x64.ActiveCfg = Debug|x64 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x64.Build.0 = Debug|x64 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|Win32.ActiveCfg = Release|Win32 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|Win32.Build.0 = Release|Win32 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x64.ActiveCfg = Release|x64 - {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x64.Build.0 = Release|x64 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|Win32.ActiveCfg = Debug|Win32 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|Win32.Build.0 = Debug|Win32 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|x64.ActiveCfg = Debug|x64 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|x64.Build.0 = Debug|x64 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|Win32.ActiveCfg = Release|Win32 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|Win32.Build.0 = Release|Win32 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|x64.ActiveCfg = Release|x64 - {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|x64.Build.0 = Release|x64 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|Win32.ActiveCfg = Debug|Win32 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|Win32.Build.0 = Debug|Win32 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|x64.ActiveCfg = Debug|x64 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|x64.Build.0 = Debug|x64 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|Win32.ActiveCfg = Release|Win32 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|Win32.Build.0 = Release|Win32 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|x64.ActiveCfg = Release|x64 - {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|x64.Build.0 = Release|x64 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|Win32.ActiveCfg = Debug|Win32 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|Win32.Build.0 = Debug|Win32 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|x64.ActiveCfg = Debug|x64 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|x64.Build.0 = Debug|x64 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|Win32.ActiveCfg = Release|Win32 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|Win32.Build.0 = Release|Win32 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|x64.ActiveCfg = Release|x64 - {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|x64.Build.0 = Release|x64 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|Win32.ActiveCfg = Debug|Win32 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|Win32.Build.0 = Debug|Win32 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|x64.ActiveCfg = Debug|x64 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|x64.Build.0 = Debug|x64 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|Win32.ActiveCfg = Release|Win32 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|Win32.Build.0 = Release|Win32 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|x64.ActiveCfg = Release|x64 - {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|x64.Build.0 = Release|x64 - {DD317CB5-6337-498F-A560-553B5558E133}.Debug|Win32.ActiveCfg = Debug|Win32 - {DD317CB5-6337-498F-A560-553B5558E133}.Debug|Win32.Build.0 = Debug|Win32 - {DD317CB5-6337-498F-A560-553B5558E133}.Debug|x64.ActiveCfg = Debug|x64 - {DD317CB5-6337-498F-A560-553B5558E133}.Debug|x64.Build.0 = Debug|x64 - {DD317CB5-6337-498F-A560-553B5558E133}.Release|Win32.ActiveCfg = Release|Win32 - {DD317CB5-6337-498F-A560-553B5558E133}.Release|Win32.Build.0 = Release|Win32 - {DD317CB5-6337-498F-A560-553B5558E133}.Release|x64.ActiveCfg = Release|x64 - {DD317CB5-6337-498F-A560-553B5558E133}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iflist", "iflist\iflist.vcproj", "{B0C740E1-73A3-43C7-B0CB-B715A4E691DD}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "misc\basic_dump.vcproj", "{66297062-96A0-4F0E-B147-3C8384031232}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "misc\basic_dump_ex.vcproj", "{92849630-6B09-409C-A7AD-E91E682558B1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "misc\readfile.vcproj", "{161E7606-F4CD-4A04-AB6B-5837F7818EE1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "misc\readfile_ex.vcproj", "{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "misc\savedump.vcproj", "{1B8791CB-DD15-46BF-B0A2-879892085538}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "misc\sendpack.vcproj", "{1C376689-5F61-48E7-AE83-0DED9EE9E458}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_filter", "pcap_filter\pcap_filter.vcproj", "{B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pktdump_ex", "pktdump_ex\pktdump_ex.vcproj", "{3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendcap", "sendcap\sendcap.vcproj", "{C6712171-F9B8-4A1E-A774-5D93C9116CEE}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smp_1", "smp_1\smp_1.vcproj", "{21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcptop", "tcptop\tcptop.vcproj", "{B671D5DF-3A80-4A21-BC01-79E3FB73D372}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UDPdump", "UDPdump\UDPdump.vcproj", "{42E5F1D6-6E83-4C13-83CC-C6CD83478C58}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UserBridge", "UserLevelBridge\UserBridge.vcproj", "{BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetMacAddress", "PacketDriver\GetMacAddress\GetMacAddress.vcproj", "{0E6A3C08-86E8-495B-976B-2666AB16501C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPacketCapture", "PacketDriver\TestPacketCapture\TestPacketCapture.vcproj", "{79942922-E02C-486D-9EE3-A13C0876C4C2}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPacketSend", "PacketDriver\TestPacketSend\TestPacketSend.vcproj", "{1E3BED58-2F2C-463A-B9FD-9A55235C6840}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcap_fopen", "pcap_fopen\pcap_fopen.vcproj", "{DD317CB5-6337-498F-A560-553B5558E133}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|Win32.ActiveCfg = Debug|Win32 + {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|Win32.Build.0 = Debug|Win32 + {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|x64.ActiveCfg = Debug|x64 + {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Debug|x64.Build.0 = Debug|x64 + {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|Win32.ActiveCfg = Release|Win32 + {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|Win32.Build.0 = Release|Win32 + {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|x64.ActiveCfg = Release|x64 + {B0C740E1-73A3-43C7-B0CB-B715A4E691DD}.Release|x64.Build.0 = Release|x64 + {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.ActiveCfg = Debug|Win32 + {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.Build.0 = Debug|Win32 + {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.ActiveCfg = Debug|x64 + {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.Build.0 = Debug|x64 + {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.ActiveCfg = Release|Win32 + {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.Build.0 = Release|Win32 + {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.ActiveCfg = Release|x64 + {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.Build.0 = Release|x64 + {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.ActiveCfg = Debug|Win32 + {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.Build.0 = Debug|Win32 + {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.ActiveCfg = Debug|x64 + {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.Build.0 = Debug|x64 + {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.ActiveCfg = Release|Win32 + {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.Build.0 = Release|Win32 + {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.ActiveCfg = Release|x64 + {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.Build.0 = Release|x64 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.ActiveCfg = Debug|Win32 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.Build.0 = Debug|Win32 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.ActiveCfg = Debug|x64 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.Build.0 = Debug|x64 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.ActiveCfg = Release|Win32 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.Build.0 = Release|Win32 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.ActiveCfg = Release|x64 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.Build.0 = Release|x64 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.ActiveCfg = Debug|Win32 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.Build.0 = Debug|Win32 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.ActiveCfg = Debug|x64 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.Build.0 = Debug|x64 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.ActiveCfg = Release|Win32 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.Build.0 = Release|Win32 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.ActiveCfg = Release|x64 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.Build.0 = Release|x64 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.ActiveCfg = Debug|Win32 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.Build.0 = Debug|Win32 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.ActiveCfg = Debug|x64 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.Build.0 = Debug|x64 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.ActiveCfg = Release|Win32 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.Build.0 = Release|Win32 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.ActiveCfg = Release|x64 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.Build.0 = Release|x64 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.ActiveCfg = Debug|Win32 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.Build.0 = Debug|Win32 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.ActiveCfg = Debug|x64 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.Build.0 = Debug|x64 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.ActiveCfg = Release|Win32 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.Build.0 = Release|Win32 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.ActiveCfg = Release|x64 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.Build.0 = Release|x64 + {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|Win32.ActiveCfg = Debug|Win32 + {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|Win32.Build.0 = Debug|Win32 + {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x64.ActiveCfg = Debug|x64 + {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Debug|x64.Build.0 = Debug|x64 + {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|Win32.ActiveCfg = Release|Win32 + {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|Win32.Build.0 = Release|Win32 + {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x64.ActiveCfg = Release|x64 + {B9F68F6F-22AE-47A2-A3A3-1212831AF9FF}.Release|x64.Build.0 = Release|x64 + {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|Win32.Build.0 = Debug|Win32 + {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x64.ActiveCfg = Debug|x64 + {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Debug|x64.Build.0 = Debug|x64 + {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|Win32.ActiveCfg = Release|Win32 + {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|Win32.Build.0 = Release|Win32 + {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x64.ActiveCfg = Release|x64 + {3D62DEB4-3536-44AE-8E4B-AD6DFF1B795E}.Release|x64.Build.0 = Release|x64 + {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|Win32.ActiveCfg = Debug|Win32 + {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|Win32.Build.0 = Debug|Win32 + {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|x64.ActiveCfg = Debug|x64 + {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Debug|x64.Build.0 = Debug|x64 + {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|Win32.ActiveCfg = Release|Win32 + {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|Win32.Build.0 = Release|Win32 + {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|x64.ActiveCfg = Release|x64 + {C6712171-F9B8-4A1E-A774-5D93C9116CEE}.Release|x64.Build.0 = Release|x64 + {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|Win32.ActiveCfg = Debug|Win32 + {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|Win32.Build.0 = Debug|Win32 + {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|x64.ActiveCfg = Debug|x64 + {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Debug|x64.Build.0 = Debug|x64 + {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|Win32.ActiveCfg = Release|Win32 + {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|Win32.Build.0 = Release|Win32 + {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|x64.ActiveCfg = Release|x64 + {21F49E7F-6C58-4DA5-ABE5-A9DFB6165C83}.Release|x64.Build.0 = Release|x64 + {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|Win32.ActiveCfg = Debug|Win32 + {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|Win32.Build.0 = Debug|Win32 + {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|x64.ActiveCfg = Debug|x64 + {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Debug|x64.Build.0 = Debug|x64 + {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|Win32.ActiveCfg = Release|Win32 + {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|Win32.Build.0 = Release|Win32 + {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|x64.ActiveCfg = Release|x64 + {B671D5DF-3A80-4A21-BC01-79E3FB73D372}.Release|x64.Build.0 = Release|x64 + {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|Win32.ActiveCfg = Debug|Win32 + {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|Win32.Build.0 = Debug|Win32 + {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x64.ActiveCfg = Debug|x64 + {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Debug|x64.Build.0 = Debug|x64 + {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|Win32.ActiveCfg = Release|Win32 + {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|Win32.Build.0 = Release|Win32 + {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x64.ActiveCfg = Release|x64 + {42E5F1D6-6E83-4C13-83CC-C6CD83478C58}.Release|x64.Build.0 = Release|x64 + {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|Win32.Build.0 = Debug|Win32 + {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|x64.ActiveCfg = Debug|x64 + {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Debug|x64.Build.0 = Debug|x64 + {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|Win32.ActiveCfg = Release|Win32 + {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|Win32.Build.0 = Release|Win32 + {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|x64.ActiveCfg = Release|x64 + {BB73BFD4-454F-42C8-AFE6-FA890A8BD8FC}.Release|x64.Build.0 = Release|x64 + {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|Win32.ActiveCfg = Debug|Win32 + {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|Win32.Build.0 = Debug|Win32 + {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|x64.ActiveCfg = Debug|x64 + {0E6A3C08-86E8-495B-976B-2666AB16501C}.Debug|x64.Build.0 = Debug|x64 + {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|Win32.ActiveCfg = Release|Win32 + {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|Win32.Build.0 = Release|Win32 + {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|x64.ActiveCfg = Release|x64 + {0E6A3C08-86E8-495B-976B-2666AB16501C}.Release|x64.Build.0 = Release|x64 + {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|Win32.ActiveCfg = Debug|Win32 + {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|Win32.Build.0 = Debug|Win32 + {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|x64.ActiveCfg = Debug|x64 + {79942922-E02C-486D-9EE3-A13C0876C4C2}.Debug|x64.Build.0 = Debug|x64 + {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|Win32.ActiveCfg = Release|Win32 + {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|Win32.Build.0 = Release|Win32 + {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|x64.ActiveCfg = Release|x64 + {79942922-E02C-486D-9EE3-A13C0876C4C2}.Release|x64.Build.0 = Release|x64 + {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|Win32.ActiveCfg = Debug|Win32 + {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|Win32.Build.0 = Debug|Win32 + {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|x64.ActiveCfg = Debug|x64 + {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Debug|x64.Build.0 = Debug|x64 + {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|Win32.ActiveCfg = Release|Win32 + {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|Win32.Build.0 = Release|Win32 + {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|x64.ActiveCfg = Release|x64 + {1E3BED58-2F2C-463A-B9FD-9A55235C6840}.Release|x64.Build.0 = Release|x64 + {DD317CB5-6337-498F-A560-553B5558E133}.Debug|Win32.ActiveCfg = Debug|Win32 + {DD317CB5-6337-498F-A560-553B5558E133}.Debug|Win32.Build.0 = Debug|Win32 + {DD317CB5-6337-498F-A560-553B5558E133}.Debug|x64.ActiveCfg = Debug|x64 + {DD317CB5-6337-498F-A560-553B5558E133}.Debug|x64.Build.0 = Debug|x64 + {DD317CB5-6337-498F-A560-553B5558E133}.Release|Win32.ActiveCfg = Release|Win32 + {DD317CB5-6337-498F-A560-553B5558E133}.Release|Win32.Build.0 = Release|Win32 + {DD317CB5-6337-498F-A560-553B5558E133}.Release|x64.ActiveCfg = Release|x64 + {DD317CB5-6337-498F-A560-553B5558E133}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/WinPcap-413-173-b4/Examples-remote/MakeaAll.dsw b/libs/WpdPack_4_1_2/Examples-remote/MakeaAll.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/MakeaAll.dsw rename to libs/WpdPack_4_1_2/Examples-remote/MakeaAll.dsw index 1772c2aa..3236b641 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/MakeaAll.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/MakeaAll.dsw @@ -1,221 +1,221 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "GetMacAddress"=".\PacketDriver\GetMacAddress\GetMacAddress.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "TestPacketCapture"=".\PacketDriver\TestPacketCapture\TestPacketCapture.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "TestPacketSend"=".\PacketDriver\TestPacketSend\TestPacketSend.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "UDPdump"=".\UDPdump\UDPdump.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "UserBridge"=".\UserLevelBridge\UserBridge.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump"=".\misc\basic_dump.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump_ex"=".\misc\basic_dump_ex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "iflist"=".\iflist\iflist.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pcap_filter"=".\pcap_filter\pcap_filter.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "pktdump_ex"=".\pktdump_ex\pktdump_ex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile"=".\misc\readfile.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile_ex"=".\misc\readfile_ex.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "savedump"=".\misc\savedump.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sendcap"=".\sendcap\sendcap.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sendpack"=".\misc\sendpack.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "smp_1"=".\smp_1\smp_1.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "tcptop"=".\tcptop\tcptop.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "GetMacAddress"=".\PacketDriver\GetMacAddress\GetMacAddress.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TestPacketCapture"=".\PacketDriver\TestPacketCapture\TestPacketCapture.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "TestPacketSend"=".\PacketDriver\TestPacketSend\TestPacketSend.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "UDPdump"=".\UDPdump\UDPdump.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "UserBridge"=".\UserLevelBridge\UserBridge.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "basic_dump"=".\misc\basic_dump.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "basic_dump_ex"=".\misc\basic_dump_ex.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "iflist"=".\iflist\iflist.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "pcap_filter"=".\pcap_filter\pcap_filter.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "pktdump_ex"=".\pktdump_ex\pktdump_ex.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "readfile"=".\misc\readfile.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "readfile_ex"=".\misc\readfile_ex.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "savedump"=".\misc\savedump.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "sendcap"=".\sendcap\sendcap.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "sendpack"=".\misc\sendpack.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "smp_1"=".\smp_1\smp_1.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "tcptop"=".\tcptop\tcptop.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c index 4cb6c0c5..014da74f 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.c @@ -1,152 +1,152 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include "..\..\..\Include\packet32.h" -#include - -#define Max_Num_Adapter 10 -char AdapterList[Max_Num_Adapter][1024]; - -int main() -{ - LPADAPTER lpAdapter = 0; - int i; - DWORD dwErrorCode; - char AdapterName[8192]; - char *temp,*temp1; - int AdapterNum=0,Open; - ULONG AdapterLength; - PPACKET_OID_DATA OidData; - BOOLEAN Status; - - // - // Obtain the name of the adapters installed on this machine - // - - printf("Packet.dll test application. Library version:%s\n", PacketGetVersion()); - - printf("Adapters installed:\n"); - i=0; - - AdapterLength = sizeof(AdapterName); - - if(PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE){ - printf("Unable to retrieve the list of the adapters!\n"); - return -1; - } - temp=AdapterName; - temp1=AdapterName; - - while ((*temp!='\0')||(*(temp-1)!='\0')) - { - if (*temp=='\0') - { - memcpy(AdapterList[i],temp1,temp-temp1); - temp1=temp+1; - i++; - } - temp++; - } - - AdapterNum=i; - for (i=0;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); - } while (Open>AdapterNum); - - - // - // Open the selected adapter - // - - lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); - - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) - { - dwErrorCode=GetLastError(); - printf("Unable to open the adapter, Error Code : %lx\n",dwErrorCode); - - return -1; - } - - // - // Allocate a buffer to get the MAC adress - // - - OidData = malloc(6 + sizeof(PACKET_OID_DATA)); - if (OidData == NULL) - { - printf("error allocating memory!\n"); - PacketCloseAdapter(lpAdapter); - return -1; - } - - // - // Retrieve the adapter MAC querying the NIC driver - // - - OidData->Oid = OID_802_3_CURRENT_ADDRESS; - - OidData->Length = 6; - ZeroMemory(OidData->Data, 6); - - Status = PacketRequest(lpAdapter, FALSE, OidData); - if(Status) - { - printf("The MAC address of the adapter is %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", - (OidData->Data)[0], - (OidData->Data)[1], - (OidData->Data)[2], - (OidData->Data)[3], - (OidData->Data)[4], - (OidData->Data)[5]); - } - else - { - printf("error retrieving the MAC address of the adapter!\n"); - } - - free(OidData); - PacketCloseAdapter(lpAdapter); - return (0); -} - +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include "..\..\..\Include\packet32.h" +#include + +#define Max_Num_Adapter 10 +char AdapterList[Max_Num_Adapter][1024]; + +int main() +{ + LPADAPTER lpAdapter = 0; + int i; + DWORD dwErrorCode; + char AdapterName[8192]; + char *temp,*temp1; + int AdapterNum=0,Open; + ULONG AdapterLength; + PPACKET_OID_DATA OidData; + BOOLEAN Status; + + // + // Obtain the name of the adapters installed on this machine + // + + printf("Packet.dll test application. Library version:%s\n", PacketGetVersion()); + + printf("Adapters installed:\n"); + i=0; + + AdapterLength = sizeof(AdapterName); + + if(PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE){ + printf("Unable to retrieve the list of the adapters!\n"); + return -1; + } + temp=AdapterName; + temp1=AdapterName; + + while ((*temp!='\0')||(*(temp-1)!='\0')) + { + if (*temp=='\0') + { + memcpy(AdapterList[i],temp1,temp-temp1); + temp1=temp+1; + i++; + } + temp++; + } + + AdapterNum=i; + for (i=0;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); + } while (Open>AdapterNum); + + + // + // Open the selected adapter + // + + lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); + + if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) + { + dwErrorCode=GetLastError(); + printf("Unable to open the adapter, Error Code : %lx\n",dwErrorCode); + + return -1; + } + + // + // Allocate a buffer to get the MAC adress + // + + OidData = malloc(6 + sizeof(PACKET_OID_DATA)); + if (OidData == NULL) + { + printf("error allocating memory!\n"); + PacketCloseAdapter(lpAdapter); + return -1; + } + + // + // Retrieve the adapter MAC querying the NIC driver + // + + OidData->Oid = OID_802_3_CURRENT_ADDRESS; + + OidData->Length = 6; + ZeroMemory(OidData->Data, 6); + + Status = PacketRequest(lpAdapter, FALSE, OidData); + if(Status) + { + printf("The MAC address of the adapter is %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", + (OidData->Data)[0], + (OidData->Data)[1], + (OidData->Data)[2], + (OidData->Data)[3], + (OidData->Data)[4], + (OidData->Data)[5]); + } + else + { + printf("error retrieving the MAC address of the adapter!\n"); + } + + free(OidData); + PacketCloseAdapter(lpAdapter); + return (0); +} + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp index 1f3210e5..d7012902 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.dsp @@ -1,105 +1,105 @@ -# Microsoft Developer Studio Project File - Name="GetMacAddress" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=GetMacAddress - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "GetMacAddress.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "GetMacAddress.mak" CFG="GetMacAddress - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "GetMacAddress - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "GetMacAddress - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "GetMacAddress - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "GetMacAddress - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "GetMacAddress - Win32 Release" -# Name "GetMacAddress - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\GetMacAddress.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\lib\Packet.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="GetMacAddress" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=GetMacAddress - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "GetMacAddress.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "GetMacAddress.mak" CFG="GetMacAddress - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "GetMacAddress - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "GetMacAddress - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "GetMacAddress - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "GetMacAddress - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "GetMacAddress - Win32 Release" +# Name "GetMacAddress - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\GetMacAddress.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\..\lib\Packet.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj index 2ec3cbd5..4130c3f9 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/GetMacAddress/GetMacAddress.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c index ce8ef754..4bc676dc 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.c @@ -1,244 +1,244 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - - -#include "..\..\..\Include\packet32.h" -#include - -#define Max_Num_Adapter 10 - -// Prototypes - -void PrintPackets(LPPACKET lpPacket); - -char AdapterList[Max_Num_Adapter][1024]; - -int main() -{ -//define a pointer to an ADAPTER structure - -LPADAPTER lpAdapter = 0; - -//define a pointer to a PACKET structure - -LPPACKET lpPacket; - -int i; -DWORD dwErrorCode; - -//ascii strings -char AdapterName[8192]; // string that contains a list of the network adapters -char *temp,*temp1; - - -int AdapterNum=0,Open; -ULONG AdapterLength; - -char buffer[256000]; // buffer to hold the data coming from the driver - -struct bpf_stat stat; - - // - // Obtain the name of the adapters installed on this machine - // - printf("Packet.dll test application. Library version:%s\n", PacketGetVersion()); - - printf("Adapters installed:\n"); - i=0; - - AdapterLength = sizeof(AdapterName); - - if(PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE){ - printf("Unable to retrieve the list of the adapters!\n"); - return -1; - } - temp=AdapterName; - temp1=AdapterName; - - while ((*temp!='\0')||(*(temp-1)!='\0')) - { - if (*temp=='\0') - { - memcpy(AdapterList[i],temp1,temp-temp1); - temp1=temp+1; - i++; - } - temp++; - } - - AdapterNum=i; - for (i=0;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); - } while (Open>AdapterNum); - - - - - lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); - - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) - { - dwErrorCode=GetLastError(); - printf("Unable to open the adapter, Error Code : %lx\n",dwErrorCode); - - return -1; - } - - // set the network adapter in promiscuous mode - - if(PacketSetHwFilter(lpAdapter,NDIS_PACKET_TYPE_PROMISCUOUS)==FALSE){ - printf("Warning: unable to set promiscuous mode!\n"); - } - - // set a 512K buffer in the driver - if(PacketSetBuff(lpAdapter,512000)==FALSE){ - printf("Unable to set the kernel buffer!\n"); - return -1; - } - - // set a 1 second read timeout - if(PacketSetReadTimeout(lpAdapter,1000)==FALSE){ - printf("Warning: unable to set the read tiemout!\n"); - } - - //allocate and initialize a packet structure that will be used to - //receive the packets. - if((lpPacket = PacketAllocatePacket())==NULL){ - printf("\nError: failed to allocate the LPPACKET structure."); - return (-1); - } - PacketInitPacket(lpPacket,(char*)buffer,256000); - - //main capture loop - while(!_kbhit()) - { - // capture the packets - if(PacketReceivePacket(lpAdapter,lpPacket,TRUE)==FALSE){ - printf("Error: PacketReceivePacket failed"); - return (-1); - } - - PrintPackets(lpPacket); - } - - - //print the capture statistics - if(PacketGetStats(lpAdapter,&stat)==FALSE){ - printf("Warning: unable to get stats from the kernel!\n"); - } - else - printf("\n\n%d packets received.\n%d Packets lost",stat.bs_recv,stat.bs_drop); - - PacketFreePacket(lpPacket); - - // close the adapter and exit - - PacketCloseAdapter(lpAdapter); - return (0); -} - -// this function prints the content of a block of packets received from the driver - -void PrintPackets(LPPACKET lpPacket) -{ - - ULONG i, j, ulLines, ulen, ulBytesReceived; - char *pChar, *pLine, *base; - char *buf; - u_int off=0; - u_int tlen,tlen1; - struct bpf_hdr *hdr; - - ulBytesReceived = lpPacket->ulBytesReceived; - - - buf = lpPacket->Buffer; - - off=0; - - while(offbh_datalen; - tlen=hdr->bh_caplen; - printf("Packet length, captured portion: %ld, %ld\n", tlen1, tlen); - off+=hdr->bh_hdrlen; - - ulLines = (tlen + 15) / 16; - - pChar =(char*)(buf+off); - base=pChar; - off=Packet_WORDALIGN(off+tlen); - - for ( i=0; i 16 ) ? 16 : ulen; - tlen -= ulen; - - for ( j=0; j +#include + + +#include "..\..\..\Include\packet32.h" +#include + +#define Max_Num_Adapter 10 + +// Prototypes + +void PrintPackets(LPPACKET lpPacket); + +char AdapterList[Max_Num_Adapter][1024]; + +int main() +{ +//define a pointer to an ADAPTER structure + +LPADAPTER lpAdapter = 0; + +//define a pointer to a PACKET structure + +LPPACKET lpPacket; + +int i; +DWORD dwErrorCode; + +//ascii strings +char AdapterName[8192]; // string that contains a list of the network adapters +char *temp,*temp1; + + +int AdapterNum=0,Open; +ULONG AdapterLength; + +char buffer[256000]; // buffer to hold the data coming from the driver + +struct bpf_stat stat; + + // + // Obtain the name of the adapters installed on this machine + // + printf("Packet.dll test application. Library version:%s\n", PacketGetVersion()); + + printf("Adapters installed:\n"); + i=0; + + AdapterLength = sizeof(AdapterName); + + if(PacketGetAdapterNames(AdapterName,&AdapterLength)==FALSE){ + printf("Unable to retrieve the list of the adapters!\n"); + return -1; + } + temp=AdapterName; + temp1=AdapterName; + + while ((*temp!='\0')||(*(temp-1)!='\0')) + { + if (*temp=='\0') + { + memcpy(AdapterList[i],temp1,temp-temp1); + temp1=temp+1; + i++; + } + temp++; + } + + AdapterNum=i; + for (i=0;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); + } while (Open>AdapterNum); + + + + + lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); + + if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) + { + dwErrorCode=GetLastError(); + printf("Unable to open the adapter, Error Code : %lx\n",dwErrorCode); + + return -1; + } + + // set the network adapter in promiscuous mode + + if(PacketSetHwFilter(lpAdapter,NDIS_PACKET_TYPE_PROMISCUOUS)==FALSE){ + printf("Warning: unable to set promiscuous mode!\n"); + } + + // set a 512K buffer in the driver + if(PacketSetBuff(lpAdapter,512000)==FALSE){ + printf("Unable to set the kernel buffer!\n"); + return -1; + } + + // set a 1 second read timeout + if(PacketSetReadTimeout(lpAdapter,1000)==FALSE){ + printf("Warning: unable to set the read tiemout!\n"); + } + + //allocate and initialize a packet structure that will be used to + //receive the packets. + if((lpPacket = PacketAllocatePacket())==NULL){ + printf("\nError: failed to allocate the LPPACKET structure."); + return (-1); + } + PacketInitPacket(lpPacket,(char*)buffer,256000); + + //main capture loop + while(!_kbhit()) + { + // capture the packets + if(PacketReceivePacket(lpAdapter,lpPacket,TRUE)==FALSE){ + printf("Error: PacketReceivePacket failed"); + return (-1); + } + + PrintPackets(lpPacket); + } + + + //print the capture statistics + if(PacketGetStats(lpAdapter,&stat)==FALSE){ + printf("Warning: unable to get stats from the kernel!\n"); + } + else + printf("\n\n%d packets received.\n%d Packets lost",stat.bs_recv,stat.bs_drop); + + PacketFreePacket(lpPacket); + + // close the adapter and exit + + PacketCloseAdapter(lpAdapter); + return (0); +} + +// this function prints the content of a block of packets received from the driver + +void PrintPackets(LPPACKET lpPacket) +{ + + ULONG i, j, ulLines, ulen, ulBytesReceived; + char *pChar, *pLine, *base; + char *buf; + u_int off=0; + u_int tlen,tlen1; + struct bpf_hdr *hdr; + + ulBytesReceived = lpPacket->ulBytesReceived; + + + buf = lpPacket->Buffer; + + off=0; + + while(offbh_datalen; + tlen=hdr->bh_caplen; + printf("Packet length, captured portion: %ld, %ld\n", tlen1, tlen); + off+=hdr->bh_hdrlen; + + ulLines = (tlen + 15) / 16; + + pChar =(char*)(buf+off); + base=pChar; + off=Packet_WORDALIGN(off+tlen); + + for ( i=0; i 16 ) ? 16 : ulen; + tlen -= ulen; + + for ( j=0; j -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=TestPacketCapture - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "TestPacketCapture.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "TestPacketCapture.mak" CFG="TestPacketCapture - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "TestPacketCapture - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "TestPacketCapture - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "TestPacketCapture - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "TestPacketCapture - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "TestPacketCapture - Win32 Release" -# Name "TestPacketCapture - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\TestPacketCapture.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\lib\Packet.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="TestPacketCapture" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=TestPacketCapture - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TestPacketCapture.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TestPacketCapture.mak" CFG="TestPacketCapture - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TestPacketCapture - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "TestPacketCapture - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TestPacketCapture - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "TestPacketCapture - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "TestPacketCapture - Win32 Release" +# Name "TestPacketCapture - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\TestPacketCapture.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\..\lib\Packet.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj index 40e38570..ab5783cd 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketCapture/TestPacketCapture.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c index cc86510f..b4a73bce 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.c @@ -1,235 +1,235 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include - -#include "..\..\..\Include\packet32.h" - - -#define Max_Num_Adapter 10 - -// Prototypes - -void PrintPackets(LPPACKET lpPacket); - -char AdapterList[Max_Num_Adapter][8192]; - - - -int main(int argc, char **argv) -{ -char packetbuff[5000]; - -// define a pointer to a ADAPTER structure - -LPADAPTER lpAdapter = 0; - -// define a pointer to a PACKET structure - -LPPACKET lpPacket; - -int i,npacks,Snaplen; -DWORD dwErrorCode; - -//ascii strings -char AdapterName[8192]; // string that contains a list of the network adapters -char *temp,*temp1; - -int AdapterNum=0,Open; -ULONG AdapterLength; - -float cpu_time; - - printf("Traffic Generator v 0.9999\nCopyright 1999 Loris Degioanni (loris@netgroup-serv.polito.it)"); - printf("\nSends a set of packets to the network using packet.dll API.\n"); - - if (argc == 1){ - printf("\n\n Usage: TestpacketSend [-i adapter] -n npacks -s size"); - printf("\n size is between 60 and 1514\n\n"); - return -1; - } - - - AdapterName[0]=0; - - //get the command line parameters - for(i=1;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); - } while (Open>AdapterNum); - - - - - lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); - - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) - { - dwErrorCode=GetLastError(); - printf("Unable to open the driver, Error Code : %lx\n",dwErrorCode); - - return(-1); - } - - } - else{ - - lpAdapter = PacketOpenAdapter(AdapterName); - - if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) - { - dwErrorCode=GetLastError(); - printf("Unable to open the driver, Error Code : %lx\n",dwErrorCode); - - return(-1); - } - - } - - if((lpPacket = PacketAllocatePacket())==NULL){ - printf("\nError:failed to allocate the LPPACKET structure."); - return (-1); - } - - packetbuff[0]=1; - packetbuff[1]=1; - packetbuff[2]=1; - packetbuff[3]=1; - packetbuff[4]=1; - packetbuff[5]=1; - - packetbuff[6]=2; - packetbuff[7]=2; - packetbuff[8]=2; - packetbuff[9]=2; - packetbuff[10]=2; - packetbuff[11]=2; - - for(i=12;i<1514;i++){ - packetbuff[i]= (char)i; - } - - PacketInitPacket(lpPacket,packetbuff,Snaplen); - // capture the packet - - - if(PacketSetNumWrites(lpAdapter,npacks)==FALSE){ - printf("warning: Unable to send more than one packet in a single write!\n"); - } - - printf("\n\nGenerating %d packets...",npacks); - - cpu_time = (float)clock (); - - if(PacketSendPacket(lpAdapter,lpPacket,TRUE)==FALSE){ - printf("Error sending the packets!\n"); - return -1; - } - - cpu_time = (clock() - cpu_time)/CLK_TCK; - - printf ("\n\nElapsed time: %5.3f\n", cpu_time); - printf ("\nTotal packets generated = %d", npacks); - printf ("\nTotal bytes generated = %d", (Snaplen+24)*npacks); - printf ("\nTotal bits generated = %d", (Snaplen+24)*npacks*8); - printf ("\nAverage packets per second = %d", (int)((double)npacks/cpu_time)); - printf ("\nAverage bytes per second = %d", (int)((double)((Snaplen+24)*npacks)/cpu_time)); - printf ("\nAverage bits per second = %d", (int)((double)((Snaplen+24)*npacks*8)/cpu_time)); - printf ("\n"); - - PacketFreePacket(lpPacket); - - // close the adapter and exit - - PacketCloseAdapter(lpAdapter); - return (0); -} +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include + +#include "..\..\..\Include\packet32.h" + + +#define Max_Num_Adapter 10 + +// Prototypes + +void PrintPackets(LPPACKET lpPacket); + +char AdapterList[Max_Num_Adapter][8192]; + + + +int main(int argc, char **argv) +{ +char packetbuff[5000]; + +// define a pointer to a ADAPTER structure + +LPADAPTER lpAdapter = 0; + +// define a pointer to a PACKET structure + +LPPACKET lpPacket; + +int i,npacks,Snaplen; +DWORD dwErrorCode; + +//ascii strings +char AdapterName[8192]; // string that contains a list of the network adapters +char *temp,*temp1; + +int AdapterNum=0,Open; +ULONG AdapterLength; + +float cpu_time; + + printf("Traffic Generator v 0.9999\nCopyright 1999 Loris Degioanni (loris@netgroup-serv.polito.it)"); + printf("\nSends a set of packets to the network using packet.dll API.\n"); + + if (argc == 1){ + printf("\n\n Usage: TestpacketSend [-i adapter] -n npacks -s size"); + printf("\n size is between 60 and 1514\n\n"); + return -1; + } + + + AdapterName[0]=0; + + //get the command line parameters + for(i=1;iAdapterNum) printf("\nThe number must be smaller than %d",AdapterNum); + } while (Open>AdapterNum); + + + + + lpAdapter = PacketOpenAdapter(AdapterList[Open-1]); + + if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) + { + dwErrorCode=GetLastError(); + printf("Unable to open the driver, Error Code : %lx\n",dwErrorCode); + + return(-1); + } + + } + else{ + + lpAdapter = PacketOpenAdapter(AdapterName); + + if (!lpAdapter || (lpAdapter->hFile == INVALID_HANDLE_VALUE)) + { + dwErrorCode=GetLastError(); + printf("Unable to open the driver, Error Code : %lx\n",dwErrorCode); + + return(-1); + } + + } + + if((lpPacket = PacketAllocatePacket())==NULL){ + printf("\nError:failed to allocate the LPPACKET structure."); + return (-1); + } + + packetbuff[0]=1; + packetbuff[1]=1; + packetbuff[2]=1; + packetbuff[3]=1; + packetbuff[4]=1; + packetbuff[5]=1; + + packetbuff[6]=2; + packetbuff[7]=2; + packetbuff[8]=2; + packetbuff[9]=2; + packetbuff[10]=2; + packetbuff[11]=2; + + for(i=12;i<1514;i++){ + packetbuff[i]= (char)i; + } + + PacketInitPacket(lpPacket,packetbuff,Snaplen); + // capture the packet + + + if(PacketSetNumWrites(lpAdapter,npacks)==FALSE){ + printf("warning: Unable to send more than one packet in a single write!\n"); + } + + printf("\n\nGenerating %d packets...",npacks); + + cpu_time = (float)clock (); + + if(PacketSendPacket(lpAdapter,lpPacket,TRUE)==FALSE){ + printf("Error sending the packets!\n"); + return -1; + } + + cpu_time = (clock() - cpu_time)/CLK_TCK; + + printf ("\n\nElapsed time: %5.3f\n", cpu_time); + printf ("\nTotal packets generated = %d", npacks); + printf ("\nTotal bytes generated = %d", (Snaplen+24)*npacks); + printf ("\nTotal bits generated = %d", (Snaplen+24)*npacks*8); + printf ("\nAverage packets per second = %d", (int)((double)npacks/cpu_time)); + printf ("\nAverage bytes per second = %d", (int)((double)((Snaplen+24)*npacks)/cpu_time)); + printf ("\nAverage bits per second = %d", (int)((double)((Snaplen+24)*npacks*8)/cpu_time)); + printf ("\n"); + + PacketFreePacket(lpPacket); + + // close the adapter and exit + + PacketCloseAdapter(lpAdapter); + return (0); +} diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp index 7228a8de..ee2c6f4b 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.dsp @@ -1,107 +1,107 @@ -# Microsoft Developer Studio Project File - Name="TestPacketSend" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=TestPacketSend - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "TestPacketSend.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "TestPacketSend.mak" CFG="TestPacketSend - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "TestPacketSend - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "TestPacketSend - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "TestPacketSend - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"Release/TestPacketSend.exe" /machine:I386 -# SUBTRACT LINK32 /pdb:none - -!ELSEIF "$(CFG)" == "TestPacketSend - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "TestPacketSend - Win32 Release" -# Name "TestPacketSend - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\TestPacketSend.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\..\lib\Packet.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="TestPacketSend" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=TestPacketSend - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "TestPacketSend.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "TestPacketSend.mak" CFG="TestPacketSend - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "TestPacketSend - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "TestPacketSend - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "TestPacketSend - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:"Release/TestPacketSend.exe" /machine:I386 +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "TestPacketSend - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "TestPacketSend - Win32 Release" +# Name "TestPacketSend - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\TestPacketSend.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\..\lib\Packet.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj index 1eb9ddfb..35feca2f 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/TestPacketSend/TestPacketSend.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/readme.txt b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/readme.txt similarity index 98% rename from libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/readme.txt rename to libs/WpdPack_4_1_2/Examples-remote/PacketDriver/readme.txt index 8937c434..e64371ea 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/PacketDriver/readme.txt +++ b/libs/WpdPack_4_1_2/Examples-remote/PacketDriver/readme.txt @@ -1,2 +1,2 @@ -These files use the packet.dll API instead of wpcap.dll. -The use of packet.dll API is strongly discouraged. +These files use the packet.dll API instead of wpcap.dll. +The use of packet.dll API is strongly discouraged. diff --git a/libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.dsp b/libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.dsp rename to libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsp index 40e38063..b9553123 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="UDPdump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=UDPdump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "UDPdump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "UDPdump.mak" CFG="UDPdump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "UDPdump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "UDPdump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "UDPdump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "UDPdump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "UDPdump - Win32 Release" -# Name "UDPdump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\udpdump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="UDPdump" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=UDPdump - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "UDPdump.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "UDPdump.mak" CFG="UDPdump - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "UDPdump - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "UDPdump - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "UDPdump - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "UDPdump - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "UDPdump - Win32 Release" +# Name "UDPdump - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\udpdump.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.dsw b/libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.dsw rename to libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsw index 0def7090..8981cf43 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/UDPdump/UDPdump.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "UDPdump"=.\UDPdump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "UDPdump"=.\UDPdump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.vcproj b/libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.vcproj index 09b44594..4b12a25d 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/UDPdump/UDPdump.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/UDPdump/UDPdump.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/UDPdump/udpdump.c b/libs/WpdPack_4_1_2/Examples-remote/UDPdump/udpdump.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/UDPdump/udpdump.c rename to libs/WpdPack_4_1_2/Examples-remote/UDPdump/udpdump.c index bccd3aec..f6479ead 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/UDPdump/udpdump.c +++ b/libs/WpdPack_4_1_2/Examples-remote/UDPdump/udpdump.c @@ -1,230 +1,230 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "pcap.h" - -/* 4 bytes IP address */ -typedef struct ip_address{ - u_char byte1; - u_char byte2; - u_char byte3; - u_char byte4; -}ip_address; - -/* IPv4 header */ -typedef struct ip_header{ - u_char ver_ihl; // Version (4 bits) + Internet header length (4 bits) - u_char tos; // Type of service - u_short tlen; // Total length - u_short identification; // Identification - u_short flags_fo; // Flags (3 bits) + Fragment offset (13 bits) - u_char ttl; // Time to live - u_char proto; // Protocol - u_short crc; // Header checksum - ip_address saddr; // Source address - ip_address daddr; // Destination address - u_int op_pad; // Option + Padding -}ip_header; - -/* UDP header*/ -typedef struct udp_header{ - u_short sport; // Source port - u_short dport; // Destination port - u_short len; // Datagram length - u_short crc; // Checksum -}udp_header; - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - - -int main() -{ -pcap_if_t *alldevs; -pcap_if_t *d; -int inum; -int i=0; -pcap_t *adhandle; -char errbuf[PCAP_ERRBUF_SIZE]; -u_int netmask; -char packet_filter[] = "ip and udp"; -struct bpf_program fcode; - - /* Retrieve the device list */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the adapter */ - if ( (adhandle= pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on all the MACs. - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // remote authentication - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Check the link layer. We support only Ethernet for simplicity. */ - if(pcap_datalink(adhandle) != DLT_EN10MB) - { - fprintf(stderr,"\nThis program works only on Ethernet networks.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(d->addresses != NULL) - /* Retrieve the mask of the first address of the interface */ - netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; - else - /* If the interface is without addresses we suppose to be in a C class network */ - netmask=0xffffff; - - - //compile the filter - if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - //set the filter - if (pcap_setfilter(adhandle, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, NULL); - - return 0; -} - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct tm ltime; - char timestr[16]; - ip_header *ih; - udp_header *uh; - u_int ip_len; - u_short sport,dport; - time_t local_tv_sec; - - /* - * Unused variable - */ - (VOID)(param); - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - localtime_s(<ime, &local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); - - /* print timestamp and length of the packet */ - printf("%s.%.6d len:%d ", timestr, header->ts.tv_usec, header->len); - - /* retireve the position of the ip header */ - ih = (ip_header *) (pkt_data + - 14); //length of ethernet header - - /* retireve the position of the udp header */ - ip_len = (ih->ver_ihl & 0xf) * 4; - uh = (udp_header *) ((u_char*)ih + ip_len); - - /* convert from network byte order to host byte order */ - sport = ntohs( uh->sport ); - dport = ntohs( uh->dport ); - - /* print ip addresses and udp ports */ - printf("%d.%d.%d.%d.%d -> %d.%d.%d.%d.%d\n", - ih->saddr.byte1, - ih->saddr.byte2, - ih->saddr.byte3, - ih->saddr.byte4, - sport, - ih->daddr.byte1, - ih->daddr.byte2, - ih->daddr.byte3, - ih->daddr.byte4, - dport); +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "pcap.h" + +/* 4 bytes IP address */ +typedef struct ip_address{ + u_char byte1; + u_char byte2; + u_char byte3; + u_char byte4; +}ip_address; + +/* IPv4 header */ +typedef struct ip_header{ + u_char ver_ihl; // Version (4 bits) + Internet header length (4 bits) + u_char tos; // Type of service + u_short tlen; // Total length + u_short identification; // Identification + u_short flags_fo; // Flags (3 bits) + Fragment offset (13 bits) + u_char ttl; // Time to live + u_char proto; // Protocol + u_short crc; // Header checksum + ip_address saddr; // Source address + ip_address daddr; // Destination address + u_int op_pad; // Option + Padding +}ip_header; + +/* UDP header*/ +typedef struct udp_header{ + u_short sport; // Source port + u_short dport; // Destination port + u_short len; // Datagram length + u_short crc; // Checksum +}udp_header; + +/* prototype of the packet handler */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); + + +int main() +{ +pcap_if_t *alldevs; +pcap_if_t *d; +int inum; +int i=0; +pcap_t *adhandle; +char errbuf[PCAP_ERRBUF_SIZE]; +u_int netmask; +char packet_filter[] = "ip and udp"; +struct bpf_program fcode; + + /* Retrieve the device list */ + if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf_s("%d", &inum); + + if(inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the adapter */ + if ( (adhandle= pcap_open(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on all the MACs. + PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode + 1000, // read timeout + NULL, // remote authentication + errbuf // error buffer + ) ) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Check the link layer. We support only Ethernet for simplicity. */ + if(pcap_datalink(adhandle) != DLT_EN10MB) + { + fprintf(stderr,"\nThis program works only on Ethernet networks.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + if(d->addresses != NULL) + /* Retrieve the mask of the first address of the interface */ + netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; + else + /* If the interface is without addresses we suppose to be in a C class network */ + netmask=0xffffff; + + + //compile the filter + if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 ) + { + fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + //set the filter + if (pcap_setfilter(adhandle, &fcode)<0) + { + fprintf(stderr,"\nError setting the filter.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + printf("\nlistening on %s...\n", d->description); + + /* At this point, we don't need any more the device list. Free it */ + pcap_freealldevs(alldevs); + + /* start the capture */ + pcap_loop(adhandle, 0, packet_handler, NULL); + + return 0; +} + +/* Callback function invoked by libpcap for every incoming packet */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) +{ + struct tm ltime; + char timestr[16]; + ip_header *ih; + udp_header *uh; + u_int ip_len; + u_short sport,dport; + time_t local_tv_sec; + + /* + * Unused variable + */ + (VOID)(param); + + /* convert the timestamp to readable format */ + local_tv_sec = header->ts.tv_sec; + localtime_s(<ime, &local_tv_sec); + strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); + + /* print timestamp and length of the packet */ + printf("%s.%.6d len:%d ", timestr, header->ts.tv_usec, header->len); + + /* retireve the position of the ip header */ + ih = (ip_header *) (pkt_data + + 14); //length of ethernet header + + /* retireve the position of the udp header */ + ip_len = (ih->ver_ihl & 0xf) * 4; + uh = (udp_header *) ((u_char*)ih + ip_len); + + /* convert from network byte order to host byte order */ + sport = ntohs( uh->sport ); + dport = ntohs( uh->dport ); + + /* print ip addresses and udp ports */ + printf("%d.%d.%d.%d.%d -> %d.%d.%d.%d.%d\n", + ih->saddr.byte1, + ih->saddr.byte2, + ih->saddr.byte3, + ih->saddr.byte4, + sport, + ih->daddr.byte1, + ih->daddr.byte2, + ih->daddr.byte3, + ih->daddr.byte4, + dport); } \ No newline at end of file diff --git a/libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.c b/libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.c rename to libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.c index f7a372ef..471f8503 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.c +++ b/libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.c @@ -1,467 +1,467 @@ -/* - * Copyright (c) 2005 - 2006 - * CACE Technologies, Davis, CA - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* - * This simple program implements a user-level bridge. - * It opens two adapters specified by the user and starts two threads. - * The first thread receives packets from adapter 1 and sends them down to - * adapter 2. The second thread does the same, but in the opposite - * direction. - */ - -#include -#include "pcap.h" - -/* Storage data structure used to pass parameters to the threads */ -typedef struct _in_out_adapters -{ - unsigned int state; /* Some simple state information */ - pcap_t *input_adapter; - pcap_t *output_adapter; -}in_out_adapters; - -/* Prototypes */ -DWORD WINAPI CaptureAndForwardThread(LPVOID lpParameter); -void ctrlc_handler(int sig); - -/* This prevents the two threads to mess-up when they do printfs */ -CRITICAL_SECTION print_cs; - -/* Thread handlers. Global because we wait on the threads from the CTRL+C handler */ -HANDLE threads[2]; - -/* This global variable tells the forwarder threads they must terminate */ -volatile int kill_forwaders = 0; - - -/*******************************************************************/ - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - int inum1, inum2; - int i=0; - pcap_t *adhandle1, *adhandle2; - char errbuf[PCAP_ERRBUF_SIZE]; - u_int netmask1, netmask2; - char packet_filter[256]; - struct bpf_program fcode; - in_out_adapters couple0, couple1; - - /* - * Retrieve the device list - */ - - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. ", ++i); - if (d->description) - printf("%s\n", d->description); - else - printf("\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - - /* - * Get input from the user - */ - - /* Get the filter*/ - printf("\nSpecify filter (hit return for no filter):"); - - fgets(packet_filter, sizeof(packet_filter), stdin); - - /* Get the first interface number*/ - printf("\nEnter the number of the first interface to use (1-%d):",i); - scanf_s("%d", &inum1); - - if(inum1 < 1 || inum1 > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Get the second interface number*/ - printf("Enter the number of the first interface to use (1-%d):",i); - scanf_s("%d", &inum2); - - if(inum2 < 1 || inum2 > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(inum1 == inum2 ) - { - printf("\nCannot bridge packets on the same interface.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - - /* - * Open the specified couple of adapters - */ - - /* Jump to the first selected adapter */ - for(d = alldevs, i = 0; i< inum1 - 1 ;d = d->next, i++); - - /* - * Open the first adapter. - * *NOTICE* the flags we are using, they are important for the behavior of the prgram: - * - PCAP_OPENFLAG_PROMISCUOUS: tells the adapter to go in promiscuous mode. - * This means that we are capturing all the traffic, not only the one to or from - * this machine. - * - PCAP_OPENFLAG_NOCAPTURE_LOCAL: prevents the adapter from capturing again the packets - * transmitted by itself. This avoids annoying loops. - * - PCAP_OPENFLAG_MAX_RESPONSIVENESS: configures the adapter to provide minimum latency, - * at the cost of higher CPU usage. - */ - if((adhandle1 = pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on every link layer. - PCAP_OPENFLAG_PROMISCUOUS | // flags. We specify that we don't want to capture loopback packets, and that the driver should deliver us the packets as fast as possible - PCAP_OPENFLAG_NOCAPTURE_LOCAL | - PCAP_OPENFLAG_MAX_RESPONSIVENESS, - 500, // read timeout - NULL, // remote authentication - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->description); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(d->addresses != NULL) - { - /* Retrieve the mask of the first address of the interface */ - netmask1 = ((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; - } - else - { - /* If the interface is without addresses we suppose to be in a C class network */ - netmask1 = 0xffffff; - } - - /* Jump to the second selected adapter */ - for(d = alldevs, i = 0; i< inum2 - 1 ;d = d->next, i++); - - /* Open the second adapter */ - if((adhandle2 = pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 grants that the whole packet will be captured on every link layer. - PCAP_OPENFLAG_PROMISCUOUS | // flags. We specify that we don't want to capture loopback packets, and that the driver should deliver us the packets as fast as possible - PCAP_OPENFLAG_NOCAPTURE_LOCAL | - PCAP_OPENFLAG_MAX_RESPONSIVENESS, - 500, // read timeout - NULL, // remote authentication - errbuf // error buffer - )) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->description); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - if(d->addresses != NULL) - { - /* Retrieve the mask of the first address of the interface */ - netmask2 = ((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; - } - else - { - /* If the interface is without addresses we suppose to be in a C class network */ - netmask2 = 0xffffff; - } - - - /* - * Compile and set the filters - */ - - /* compile the filter for the first adapter */ - if (pcap_compile(adhandle1, &fcode, packet_filter, 1, netmask1) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* set the filter for the first adapter*/ - if (pcap_setfilter(adhandle1, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* compile the filter for the second adapter */ - if (pcap_compile(adhandle2, &fcode, packet_filter, 1, netmask2) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* set the filter for the second adapter*/ - if (pcap_setfilter(adhandle2, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* At this point, we don't need the device list any more. Free it */ - pcap_freealldevs(alldevs); - - /* - * Start the threads that will forward the packets - */ - - /* Initialize the critical section that will be used by the threads for console output */ - InitializeCriticalSection(&print_cs); - - /* Init input parameters of the threads */ - couple0.state = 0; - couple0.input_adapter = adhandle1; - couple0.output_adapter = adhandle2; - couple1.state = 1; - couple1.input_adapter = adhandle2; - couple1.output_adapter = adhandle1; - - /* Start first thread */ - if((threads[0] = CreateThread( - NULL, - 0, - CaptureAndForwardThread, - &couple0, - 0, - NULL)) == NULL) - { - fprintf(stderr, "error creating the first forward thread"); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Start second thread */ - if((threads[1] = CreateThread( - NULL, - 0, - CaptureAndForwardThread, - &couple1, - 0, - NULL)) == NULL) - { - fprintf(stderr, "error creating the second forward thread"); - - /* Kill the first thread. Not very gentle at all...*/ - TerminateThread(threads[0], 0); - - /* Close the adapters */ - pcap_close(adhandle1); - pcap_close(adhandle2); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* - * Install a CTRL+C handler that will do the cleanups on exit - */ - signal(SIGINT, ctrlc_handler); - - /* - * Done! - * Wait for the Greek calends... - */ - printf("\nStart bridging the two adapters...\n", d->description); - Sleep(INFINITE); - return 0; -} - -/******************************************************************* - * Forwarding thread. - * Gets the packets from the input adapter and sends them to the output one. - *******************************************************************/ -DWORD WINAPI CaptureAndForwardThread(LPVOID lpParameter) -{ - struct pcap_pkthdr *header; - const u_char *pkt_data; - int res = 0; - in_out_adapters* ad_couple = lpParameter; - unsigned int n_fwd = 0; - - /* - * Loop receiving packets from the first input adapter - */ - - while((!kill_forwaders) && (res = pcap_next_ex(ad_couple->input_adapter, &header, &pkt_data)) >= 0) - { - if(res != 0) /* Note: res=0 means "read timeout elapsed"*/ - { - /* - * Print something, just to show when we have activity. - * BEWARE: acquiring a critical section and printing strings with printf - * is something inefficient that you seriously want to avoid in your packet loop! - * However, since this is a *sample program*, we privilege visual output to efficiency. - */ - EnterCriticalSection(&print_cs); - - if(ad_couple->state == 0) - printf(">> Len: %u\n", header->caplen); - else - printf("<< Len: %u\n", header->caplen); - - LeaveCriticalSection(&print_cs); - - /* - * Send the just received packet to the output adaper - */ - if(pcap_sendpacket(ad_couple->output_adapter, pkt_data, header->caplen) != 0) - { - EnterCriticalSection(&print_cs); - - printf("Error sending a %u bytes packets on interface %u: %s\n", - header->caplen, - ad_couple->state, - pcap_geterr(ad_couple->output_adapter)); - - LeaveCriticalSection(&print_cs); - } - else - { - n_fwd++; - } - } - } - - /* - * We're out of the main loop. Check the reason. - */ - if(res < 0) - { - EnterCriticalSection(&print_cs); - - printf("Error capturing the packets: %s\n", pcap_geterr(ad_couple->input_adapter)); - fflush(stdout); - - LeaveCriticalSection(&print_cs); - } - else - { - EnterCriticalSection(&print_cs); - - printf("End of bridging on interface %u. Forwarded packets:%u\n", - ad_couple->state, - n_fwd); - fflush(stdout); - - LeaveCriticalSection(&print_cs); - } - - return 0; -} - -/******************************************************************* - * CTRL+C hanlder. - * We order the threads to die and then we patiently wait for their - * suicide. - *******************************************************************/ -void ctrlc_handler(int sig) -{ - /* - * unused variable - */ - (VOID)(sig); - - kill_forwaders = 1; - - WaitForMultipleObjects(2, - threads, - TRUE, /* Wait for all the handles */ - 5000); /* Timeout */ - - exit(0); +/* + * Copyright (c) 2005 - 2006 + * CACE Technologies, Davis, CA + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + * This simple program implements a user-level bridge. + * It opens two adapters specified by the user and starts two threads. + * The first thread receives packets from adapter 1 and sends them down to + * adapter 2. The second thread does the same, but in the opposite + * direction. + */ + +#include +#include "pcap.h" + +/* Storage data structure used to pass parameters to the threads */ +typedef struct _in_out_adapters +{ + unsigned int state; /* Some simple state information */ + pcap_t *input_adapter; + pcap_t *output_adapter; +}in_out_adapters; + +/* Prototypes */ +DWORD WINAPI CaptureAndForwardThread(LPVOID lpParameter); +void ctrlc_handler(int sig); + +/* This prevents the two threads to mess-up when they do printfs */ +CRITICAL_SECTION print_cs; + +/* Thread handlers. Global because we wait on the threads from the CTRL+C handler */ +HANDLE threads[2]; + +/* This global variable tells the forwarder threads they must terminate */ +volatile int kill_forwaders = 0; + + +/*******************************************************************/ + +int main() +{ + pcap_if_t *alldevs; + pcap_if_t *d; + int inum1, inum2; + int i=0; + pcap_t *adhandle1, *adhandle2; + char errbuf[PCAP_ERRBUF_SIZE]; + u_int netmask1, netmask2; + char packet_filter[256]; + struct bpf_program fcode; + in_out_adapters couple0, couple1; + + /* + * Retrieve the device list + */ + + if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. ", ++i); + if (d->description) + printf("%s\n", d->description); + else + printf("\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + + /* + * Get input from the user + */ + + /* Get the filter*/ + printf("\nSpecify filter (hit return for no filter):"); + + fgets(packet_filter, sizeof(packet_filter), stdin); + + /* Get the first interface number*/ + printf("\nEnter the number of the first interface to use (1-%d):",i); + scanf_s("%d", &inum1); + + if(inum1 < 1 || inum1 > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Get the second interface number*/ + printf("Enter the number of the first interface to use (1-%d):",i); + scanf_s("%d", &inum2); + + if(inum2 < 1 || inum2 > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + if(inum1 == inum2 ) + { + printf("\nCannot bridge packets on the same interface.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + + /* + * Open the specified couple of adapters + */ + + /* Jump to the first selected adapter */ + for(d = alldevs, i = 0; i< inum1 - 1 ;d = d->next, i++); + + /* + * Open the first adapter. + * *NOTICE* the flags we are using, they are important for the behavior of the prgram: + * - PCAP_OPENFLAG_PROMISCUOUS: tells the adapter to go in promiscuous mode. + * This means that we are capturing all the traffic, not only the one to or from + * this machine. + * - PCAP_OPENFLAG_NOCAPTURE_LOCAL: prevents the adapter from capturing again the packets + * transmitted by itself. This avoids annoying loops. + * - PCAP_OPENFLAG_MAX_RESPONSIVENESS: configures the adapter to provide minimum latency, + * at the cost of higher CPU usage. + */ + if((adhandle1 = pcap_open(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on every link layer. + PCAP_OPENFLAG_PROMISCUOUS | // flags. We specify that we don't want to capture loopback packets, and that the driver should deliver us the packets as fast as possible + PCAP_OPENFLAG_NOCAPTURE_LOCAL | + PCAP_OPENFLAG_MAX_RESPONSIVENESS, + 500, // read timeout + NULL, // remote authentication + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->description); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + if(d->addresses != NULL) + { + /* Retrieve the mask of the first address of the interface */ + netmask1 = ((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; + } + else + { + /* If the interface is without addresses we suppose to be in a C class network */ + netmask1 = 0xffffff; + } + + /* Jump to the second selected adapter */ + for(d = alldevs, i = 0; i< inum2 - 1 ;d = d->next, i++); + + /* Open the second adapter */ + if((adhandle2 = pcap_open(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 grants that the whole packet will be captured on every link layer. + PCAP_OPENFLAG_PROMISCUOUS | // flags. We specify that we don't want to capture loopback packets, and that the driver should deliver us the packets as fast as possible + PCAP_OPENFLAG_NOCAPTURE_LOCAL | + PCAP_OPENFLAG_MAX_RESPONSIVENESS, + 500, // read timeout + NULL, // remote authentication + errbuf // error buffer + )) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->description); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + if(d->addresses != NULL) + { + /* Retrieve the mask of the first address of the interface */ + netmask2 = ((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr; + } + else + { + /* If the interface is without addresses we suppose to be in a C class network */ + netmask2 = 0xffffff; + } + + + /* + * Compile and set the filters + */ + + /* compile the filter for the first adapter */ + if (pcap_compile(adhandle1, &fcode, packet_filter, 1, netmask1) <0 ) + { + fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); + + /* Close the adapters */ + pcap_close(adhandle1); + pcap_close(adhandle2); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* set the filter for the first adapter*/ + if (pcap_setfilter(adhandle1, &fcode)<0) + { + fprintf(stderr,"\nError setting the filter.\n"); + + /* Close the adapters */ + pcap_close(adhandle1); + pcap_close(adhandle2); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* compile the filter for the second adapter */ + if (pcap_compile(adhandle2, &fcode, packet_filter, 1, netmask2) <0 ) + { + fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); + + /* Close the adapters */ + pcap_close(adhandle1); + pcap_close(adhandle2); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* set the filter for the second adapter*/ + if (pcap_setfilter(adhandle2, &fcode)<0) + { + fprintf(stderr,"\nError setting the filter.\n"); + + /* Close the adapters */ + pcap_close(adhandle1); + pcap_close(adhandle2); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* At this point, we don't need the device list any more. Free it */ + pcap_freealldevs(alldevs); + + /* + * Start the threads that will forward the packets + */ + + /* Initialize the critical section that will be used by the threads for console output */ + InitializeCriticalSection(&print_cs); + + /* Init input parameters of the threads */ + couple0.state = 0; + couple0.input_adapter = adhandle1; + couple0.output_adapter = adhandle2; + couple1.state = 1; + couple1.input_adapter = adhandle2; + couple1.output_adapter = adhandle1; + + /* Start first thread */ + if((threads[0] = CreateThread( + NULL, + 0, + CaptureAndForwardThread, + &couple0, + 0, + NULL)) == NULL) + { + fprintf(stderr, "error creating the first forward thread"); + + /* Close the adapters */ + pcap_close(adhandle1); + pcap_close(adhandle2); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Start second thread */ + if((threads[1] = CreateThread( + NULL, + 0, + CaptureAndForwardThread, + &couple1, + 0, + NULL)) == NULL) + { + fprintf(stderr, "error creating the second forward thread"); + + /* Kill the first thread. Not very gentle at all...*/ + TerminateThread(threads[0], 0); + + /* Close the adapters */ + pcap_close(adhandle1); + pcap_close(adhandle2); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* + * Install a CTRL+C handler that will do the cleanups on exit + */ + signal(SIGINT, ctrlc_handler); + + /* + * Done! + * Wait for the Greek calends... + */ + printf("\nStart bridging the two adapters...\n", d->description); + Sleep(INFINITE); + return 0; +} + +/******************************************************************* + * Forwarding thread. + * Gets the packets from the input adapter and sends them to the output one. + *******************************************************************/ +DWORD WINAPI CaptureAndForwardThread(LPVOID lpParameter) +{ + struct pcap_pkthdr *header; + const u_char *pkt_data; + int res = 0; + in_out_adapters* ad_couple = lpParameter; + unsigned int n_fwd = 0; + + /* + * Loop receiving packets from the first input adapter + */ + + while((!kill_forwaders) && (res = pcap_next_ex(ad_couple->input_adapter, &header, &pkt_data)) >= 0) + { + if(res != 0) /* Note: res=0 means "read timeout elapsed"*/ + { + /* + * Print something, just to show when we have activity. + * BEWARE: acquiring a critical section and printing strings with printf + * is something inefficient that you seriously want to avoid in your packet loop! + * However, since this is a *sample program*, we privilege visual output to efficiency. + */ + EnterCriticalSection(&print_cs); + + if(ad_couple->state == 0) + printf(">> Len: %u\n", header->caplen); + else + printf("<< Len: %u\n", header->caplen); + + LeaveCriticalSection(&print_cs); + + /* + * Send the just received packet to the output adaper + */ + if(pcap_sendpacket(ad_couple->output_adapter, pkt_data, header->caplen) != 0) + { + EnterCriticalSection(&print_cs); + + printf("Error sending a %u bytes packets on interface %u: %s\n", + header->caplen, + ad_couple->state, + pcap_geterr(ad_couple->output_adapter)); + + LeaveCriticalSection(&print_cs); + } + else + { + n_fwd++; + } + } + } + + /* + * We're out of the main loop. Check the reason. + */ + if(res < 0) + { + EnterCriticalSection(&print_cs); + + printf("Error capturing the packets: %s\n", pcap_geterr(ad_couple->input_adapter)); + fflush(stdout); + + LeaveCriticalSection(&print_cs); + } + else + { + EnterCriticalSection(&print_cs); + + printf("End of bridging on interface %u. Forwarded packets:%u\n", + ad_couple->state, + n_fwd); + fflush(stdout); + + LeaveCriticalSection(&print_cs); + } + + return 0; +} + +/******************************************************************* + * CTRL+C hanlder. + * We order the threads to die and then we patiently wait for their + * suicide. + *******************************************************************/ +void ctrlc_handler(int sig) +{ + /* + * unused variable + */ + (VOID)(sig); + + kill_forwaders = 1; + + WaitForMultipleObjects(2, + threads, + TRUE, /* Wait for all the handles */ + 5000); /* Timeout */ + + exit(0); } \ No newline at end of file diff --git a/libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.dsp b/libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.dsp rename to libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsp index da652d7b..f8ef34a5 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsp @@ -1,106 +1,106 @@ -# Microsoft Developer Studio Project File - Name="UserBridge" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=UserBridge - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "UserBridge.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "UserBridge.mak" CFG="UserBridge - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "UserBridge - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "UserBridge - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "UserBridge - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "UserBridge - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "UserBridge - Win32 Release" -# Name "UserBridge - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\UserBridge.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="UserBridge" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=UserBridge - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "UserBridge.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "UserBridge.mak" CFG="UserBridge - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "UserBridge - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "UserBridge - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "UserBridge - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "UserBridge - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "UserBridge - Win32 Release" +# Name "UserBridge - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\UserBridge.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.dsw b/libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.dsw rename to libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsw index d656a867..7104a543 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "UserBridge"=.\UserBridge.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "UserBridge"=.\UserBridge.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.vcproj b/libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.vcproj index 6b5e2492..06e00b2a 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/UserLevelBridge/UserBridge.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/UserLevelBridge/UserBridge.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.c b/libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.c similarity index 73% rename from libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.c rename to libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.c index 755c1104..391dda17 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.c +++ b/libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.c @@ -1,176 +1,176 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include "pcap.h" - -#ifndef _WIN32 - #include - #include -#else - #include -#endif - - -// Function prototypes -void ifprint(pcap_if_t *d); -char *iptos(u_long in); -char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen); - - -int main() -{ - pcap_if_t *alldevs; - pcap_if_t *d; - char errbuf[PCAP_ERRBUF_SIZE+1]; - char source[PCAP_ERRBUF_SIZE+1]; - - printf("Enter the device you want to list:\n" - "rpcap:// ==> lists interfaces in the local machine\n" - "rpcap://hostname:port ==> lists interfaces in a remote machine\n" - " (rpcapd daemon must be up and running\n" - " and it must accept 'null' authentication)\n" - "file://foldername ==> lists all pcap files in the give folder\n\n" - "Enter your choice: "); - - fgets(source, PCAP_ERRBUF_SIZE, stdin); - source[PCAP_ERRBUF_SIZE] = '\0'; - - /* Retrieve the interfaces list */ - if (pcap_findalldevs_ex(source, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n",errbuf); - exit(1); - } - - /* Scan the list printing every entry */ - for(d=alldevs;d;d=d->next) - { - ifprint(d); - } - - pcap_freealldevs(alldevs); - - return 1; -} - - - -/* Print all the available information on the given interface */ -void ifprint(pcap_if_t *d) -{ - pcap_addr_t *a; - char ip6str[128]; - - /* Name */ - printf("%s\n",d->name); - - /* Description */ - if (d->description) - printf("\tDescription: %s\n",d->description); - - /* Loopback Address*/ - printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no"); - - /* IP addresses */ - for(a=d->addresses;a;a=a->next) { - printf("\tAddress Family: #%d\n",a->addr->sa_family); - - switch(a->addr->sa_family) - { - case AF_INET: - printf("\tAddress Family Name: AF_INET\n"); - if (a->addr) - printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr)); - if (a->netmask) - printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr)); - if (a->broadaddr) - printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr)); - if (a->dstaddr) - printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr)); - break; - - case AF_INET6: - printf("\tAddress Family Name: AF_INET6\n"); - if (a->addr) - printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str))); - break; - - default: - printf("\tAddress Family Name: Unknown\n"); - break; - } - } - printf("\n"); -} - - - -/* From tcptraceroute, convert a numeric IP address to a string */ -#define IPTOSBUFFERS 12 -char *iptos(u_long in) -{ - static char output[IPTOSBUFFERS][3*4+3+1]; - static short which; - u_char *p; - - p = (u_char *)∈ - which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); - _snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]); - return output[which]; -} - -char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen) -{ - socklen_t sockaddrlen; - - #ifdef _WIN32 - sockaddrlen = sizeof(struct sockaddr_in6); - #else - sockaddrlen = sizeof(struct sockaddr_storage); - #endif - - - if(getnameinfo(sockaddr, - sockaddrlen, - address, - addrlen, - NULL, - 0, - NI_NUMERICHOST) != 0) address = NULL; - - return address; -} - - +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include "pcap.h" + +#ifndef WIN32 + #include + #include +#else + #include +#endif + + +// Function prototypes +void ifprint(pcap_if_t *d); +char *iptos(u_long in); +char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen); + + +int main() +{ + pcap_if_t *alldevs; + pcap_if_t *d; + char errbuf[PCAP_ERRBUF_SIZE+1]; + char source[PCAP_ERRBUF_SIZE+1]; + + printf("Enter the device you want to list:\n" + "rpcap:// ==> lists interfaces in the local machine\n" + "rpcap://hostname:port ==> lists interfaces in a remote machine\n" + " (rpcapd daemon must be up and running\n" + " and it must accept 'null' authentication)\n" + "file://foldername ==> lists all pcap files in the give folder\n\n" + "Enter your choice: "); + + fgets(source, PCAP_ERRBUF_SIZE, stdin); + source[PCAP_ERRBUF_SIZE] = '\0'; + + /* Retrieve the interfaces list */ + if (pcap_findalldevs_ex(source, NULL, &alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n",errbuf); + exit(1); + } + + /* Scan the list printing every entry */ + for(d=alldevs;d;d=d->next) + { + ifprint(d); + } + + pcap_freealldevs(alldevs); + + return 1; +} + + + +/* Print all the available information on the given interface */ +void ifprint(pcap_if_t *d) +{ + pcap_addr_t *a; + char ip6str[128]; + + /* Name */ + printf("%s\n",d->name); + + /* Description */ + if (d->description) + printf("\tDescription: %s\n",d->description); + + /* Loopback Address*/ + printf("\tLoopback: %s\n",(d->flags & PCAP_IF_LOOPBACK)?"yes":"no"); + + /* IP addresses */ + for(a=d->addresses;a;a=a->next) { + printf("\tAddress Family: #%d\n",a->addr->sa_family); + + switch(a->addr->sa_family) + { + case AF_INET: + printf("\tAddress Family Name: AF_INET\n"); + if (a->addr) + printf("\tAddress: %s\n",iptos(((struct sockaddr_in *)a->addr)->sin_addr.s_addr)); + if (a->netmask) + printf("\tNetmask: %s\n",iptos(((struct sockaddr_in *)a->netmask)->sin_addr.s_addr)); + if (a->broadaddr) + printf("\tBroadcast Address: %s\n",iptos(((struct sockaddr_in *)a->broadaddr)->sin_addr.s_addr)); + if (a->dstaddr) + printf("\tDestination Address: %s\n",iptos(((struct sockaddr_in *)a->dstaddr)->sin_addr.s_addr)); + break; + + case AF_INET6: + printf("\tAddress Family Name: AF_INET6\n"); + if (a->addr) + printf("\tAddress: %s\n", ip6tos(a->addr, ip6str, sizeof(ip6str))); + break; + + default: + printf("\tAddress Family Name: Unknown\n"); + break; + } + } + printf("\n"); +} + + + +/* From tcptraceroute, convert a numeric IP address to a string */ +#define IPTOSBUFFERS 12 +char *iptos(u_long in) +{ + static char output[IPTOSBUFFERS][3*4+3+1]; + static short which; + u_char *p; + + p = (u_char *)∈ + which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); + _snprintf_s(output[which], sizeof(output[which]), sizeof(output[which]),"%d.%d.%d.%d", p[0], p[1], p[2], p[3]); + return output[which]; +} + +char* ip6tos(struct sockaddr *sockaddr, char *address, int addrlen) +{ + socklen_t sockaddrlen; + + #ifdef WIN32 + sockaddrlen = sizeof(struct sockaddr_in6); + #else + sockaddrlen = sizeof(struct sockaddr_storage); + #endif + + + if(getnameinfo(sockaddr, + sockaddrlen, + address, + addrlen, + NULL, + 0, + NI_NUMERICHOST) != 0) address = NULL; + + return address; +} + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.dsp b/libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.dsp rename to libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsp index b1a8c8c3..41823644 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="iflist" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=iflist - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "iflist.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "iflist.mak" CFG="iflist - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "iflist - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "iflist - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "iflist - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "iflist - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "iflist - Win32 Release" -# Name "iflist - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\iflist.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="iflist" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=iflist - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "iflist.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "iflist.mak" CFG="iflist - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "iflist - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "iflist - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "iflist - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "iflist - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "iflist - Win32 Release" +# Name "iflist - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\iflist.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.dsw b/libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.dsw rename to libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsw index 6bd686d0..1425db24 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "iflist"=.\iflist.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "iflist"=.\iflist.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.vcproj b/libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.vcproj index 2b60f453..2b41203f 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/iflist/iflist.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/iflist/iflist.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/MakeAll.sln b/libs/WpdPack_4_1_2/Examples-remote/misc/MakeAll.sln similarity index 98% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/MakeAll.sln rename to libs/WpdPack_4_1_2/Examples-remote/misc/MakeAll.sln index 284d1b3e..8984e0fe 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/MakeAll.sln +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/MakeAll.sln @@ -1,76 +1,76 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "basic_dump.vcproj", "{66297062-96A0-4F0E-B147-3C8384031232}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "basic_dump_ex.vcproj", "{92849630-6B09-409C-A7AD-E91E682558B1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "readfile.vcproj", "{161E7606-F4CD-4A04-AB6B-5837F7818EE1}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "readfile_ex.vcproj", "{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "savedump.vcproj", "{1B8791CB-DD15-46BF-B0A2-879892085538}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "sendpack.vcproj", "{1C376689-5F61-48E7-AE83-0DED9EE9E458}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.ActiveCfg = Debug|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.Build.0 = Debug|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.ActiveCfg = Debug|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.Build.0 = Debug|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.ActiveCfg = Release|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.Build.0 = Release|Win32 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.ActiveCfg = Release|x64 - {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.Build.0 = Release|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.ActiveCfg = Debug|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.Build.0 = Debug|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.ActiveCfg = Debug|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.Build.0 = Debug|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.ActiveCfg = Release|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.Build.0 = Release|Win32 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.ActiveCfg = Release|x64 - {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.Build.0 = Release|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.ActiveCfg = Debug|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.Build.0 = Debug|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.ActiveCfg = Debug|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.Build.0 = Debug|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.ActiveCfg = Release|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.Build.0 = Release|Win32 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.ActiveCfg = Release|x64 - {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.Build.0 = Release|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.ActiveCfg = Debug|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.Build.0 = Debug|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.ActiveCfg = Debug|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.Build.0 = Debug|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.ActiveCfg = Release|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.Build.0 = Release|Win32 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.ActiveCfg = Release|x64 - {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.Build.0 = Release|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.ActiveCfg = Debug|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.Build.0 = Debug|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.ActiveCfg = Debug|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.Build.0 = Debug|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.ActiveCfg = Release|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.Build.0 = Release|Win32 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.ActiveCfg = Release|x64 - {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.Build.0 = Release|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.ActiveCfg = Debug|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.Build.0 = Debug|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.ActiveCfg = Debug|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.Build.0 = Debug|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.ActiveCfg = Release|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.Build.0 = Release|Win32 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.ActiveCfg = Release|x64 - {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump", "basic_dump.vcproj", "{66297062-96A0-4F0E-B147-3C8384031232}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "basic_dump_ex", "basic_dump_ex.vcproj", "{92849630-6B09-409C-A7AD-E91E682558B1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile", "readfile.vcproj", "{161E7606-F4CD-4A04-AB6B-5837F7818EE1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readfile_ex", "readfile_ex.vcproj", "{3071DFB6-68F8-41EF-A56C-0C7A71B6967C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "savedump", "savedump.vcproj", "{1B8791CB-DD15-46BF-B0A2-879892085538}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sendpack", "sendpack.vcproj", "{1C376689-5F61-48E7-AE83-0DED9EE9E458}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.ActiveCfg = Debug|Win32 + {66297062-96A0-4F0E-B147-3C8384031232}.Debug|Win32.Build.0 = Debug|Win32 + {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.ActiveCfg = Debug|x64 + {66297062-96A0-4F0E-B147-3C8384031232}.Debug|x64.Build.0 = Debug|x64 + {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.ActiveCfg = Release|Win32 + {66297062-96A0-4F0E-B147-3C8384031232}.Release|Win32.Build.0 = Release|Win32 + {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.ActiveCfg = Release|x64 + {66297062-96A0-4F0E-B147-3C8384031232}.Release|x64.Build.0 = Release|x64 + {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.ActiveCfg = Debug|Win32 + {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|Win32.Build.0 = Debug|Win32 + {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.ActiveCfg = Debug|x64 + {92849630-6B09-409C-A7AD-E91E682558B1}.Debug|x64.Build.0 = Debug|x64 + {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.ActiveCfg = Release|Win32 + {92849630-6B09-409C-A7AD-E91E682558B1}.Release|Win32.Build.0 = Release|Win32 + {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.ActiveCfg = Release|x64 + {92849630-6B09-409C-A7AD-E91E682558B1}.Release|x64.Build.0 = Release|x64 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.ActiveCfg = Debug|Win32 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|Win32.Build.0 = Debug|Win32 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.ActiveCfg = Debug|x64 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Debug|x64.Build.0 = Debug|x64 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.ActiveCfg = Release|Win32 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|Win32.Build.0 = Release|Win32 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.ActiveCfg = Release|x64 + {161E7606-F4CD-4A04-AB6B-5837F7818EE1}.Release|x64.Build.0 = Release|x64 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.ActiveCfg = Debug|Win32 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|Win32.Build.0 = Debug|Win32 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.ActiveCfg = Debug|x64 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Debug|x64.Build.0 = Debug|x64 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.ActiveCfg = Release|Win32 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|Win32.Build.0 = Release|Win32 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.ActiveCfg = Release|x64 + {3071DFB6-68F8-41EF-A56C-0C7A71B6967C}.Release|x64.Build.0 = Release|x64 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.ActiveCfg = Debug|Win32 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|Win32.Build.0 = Debug|Win32 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.ActiveCfg = Debug|x64 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Debug|x64.Build.0 = Debug|x64 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.ActiveCfg = Release|Win32 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|Win32.Build.0 = Release|Win32 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.ActiveCfg = Release|x64 + {1B8791CB-DD15-46BF-B0A2-879892085538}.Release|x64.Build.0 = Release|x64 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.ActiveCfg = Debug|Win32 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|Win32.Build.0 = Debug|Win32 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.ActiveCfg = Debug|x64 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Debug|x64.Build.0 = Debug|x64 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.ActiveCfg = Release|Win32 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|Win32.Build.0 = Release|Win32 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.ActiveCfg = Release|x64 + {1C376689-5F61-48E7-AE83-0DED9EE9E458}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/MakeaAll.dsw b/libs/WpdPack_4_1_2/Examples-remote/misc/MakeaAll.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/MakeaAll.dsw rename to libs/WpdPack_4_1_2/Examples-remote/misc/MakeaAll.dsw index 6f06f47e..8223f54d 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/MakeaAll.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/MakeaAll.dsw @@ -1,89 +1,89 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "basic_dump"=.\basic_dump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "basic_dump_ex"=.\basic_dump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile"=.\readfile.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "readfile_ex"=.\readfile_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "savedump"=.\savedump.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "sendpack"=.\sendpack.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "basic_dump"=.\basic_dump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "basic_dump_ex"=.\basic_dump_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "readfile"=.\readfile.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "readfile_ex"=.\readfile_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "savedump"=.\savedump.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "sendpack"=.\sendpack.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.c b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.c rename to libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.c index e5a18e54..8c660f3e 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.c +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.c @@ -1,100 +1,100 @@ -#include "pcap.h" - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int main() -{ -pcap_if_t *alldevs; -pcap_if_t *d; -int inum; -int i=0; -pcap_t *adhandle; -char errbuf[PCAP_ERRBUF_SIZE]; - - /* Retrieve the device list on the local machine */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - if ( (adhandle= pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, NULL); - - return 0; -} - - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct tm ltime; - char timestr[16]; - time_t local_tv_sec; - - /* - * unused variables - */ - (VOID)(param); - (VOID)(pkt_data); - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - localtime_s(<ime, &local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); - - printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); - -} +#include "pcap.h" + +/* prototype of the packet handler */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); + +int main() +{ +pcap_if_t *alldevs; +pcap_if_t *d; +int inum; +int i=0; +pcap_t *adhandle; +char errbuf[PCAP_ERRBUF_SIZE]; + + /* Retrieve the device list on the local machine */ + if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf_s("%d", &inum); + + if(inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the device */ + if ( (adhandle= pcap_open(d->name, // name of the device + 65536, // portion of the packet to capture + // 65536 guarantees that the whole packet will be captured on all the link layers + PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode + 1000, // read timeout + NULL, // authentication on the remote machine + errbuf // error buffer + ) ) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + printf("\nlistening on %s...\n", d->description); + + /* At this point, we don't need any more the device list. Free it */ + pcap_freealldevs(alldevs); + + /* start the capture */ + pcap_loop(adhandle, 0, packet_handler, NULL); + + return 0; +} + + +/* Callback function invoked by libpcap for every incoming packet */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data) +{ + struct tm ltime; + char timestr[16]; + time_t local_tv_sec; + + /* + * unused variables + */ + (VOID)(param); + (VOID)(pkt_data); + + /* convert the timestamp to readable format */ + local_tv_sec = header->ts.tv_sec; + localtime_s(<ime, &local_tv_sec); + strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); + + printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); + +} diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.dsp b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.dsp rename to libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.dsp index 3e8bc029..7e74aaa0 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/basic_dump/basic_dump.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="basic_dump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=basic_dump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "basic_dump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "basic_dump.mak" CFG="basic_dump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "basic_dump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "basic_dump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "basic_dump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "basic_dump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "basic_dump - Win32 Release" -# Name "basic_dump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\basic_dump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="basic_dump" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=basic_dump - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "basic_dump.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "basic_dump.mak" CFG="basic_dump - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "basic_dump - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "basic_dump - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "basic_dump - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "basic_dump - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "basic_dump - Win32 Release" +# Name "basic_dump - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\basic_dump.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.vcproj b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.vcproj index fc6a36af..6fb00fe2 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.c b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.c rename to libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.c index 2a90d61e..ec047b3b 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.c +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.c @@ -1,99 +1,99 @@ -#include "pcap.h" - - -int main() -{ -pcap_if_t *alldevs; -pcap_if_t *d; -int inum; -int i=0; -pcap_t *adhandle; -int res; -char errbuf[PCAP_ERRBUF_SIZE]; -struct tm ltime; -char timestr[16]; -struct pcap_pkthdr *header; -const u_char *pkt_data; -time_t local_tv_sec; - - - /* Retrieve the device list on the local machine */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - if ( (adhandle= pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture. - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - printf("\nlistening on %s...\n", d->description); - - /* At this point, we don't need any more the device list. Free it */ - pcap_freealldevs(alldevs); - - /* Retrieve the packets */ - while((res = pcap_next_ex( adhandle, &header, &pkt_data)) >= 0){ - - if(res == 0) - /* Timeout elapsed */ - continue; - - /* convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - localtime_s(<ime, &local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); - - printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); - } - - if(res == -1){ - printf("Error reading the packets: %s\n", pcap_geterr(adhandle)); - return -1; - } - - return 0; +#include "pcap.h" + + +int main() +{ +pcap_if_t *alldevs; +pcap_if_t *d; +int inum; +int i=0; +pcap_t *adhandle; +int res; +char errbuf[PCAP_ERRBUF_SIZE]; +struct tm ltime; +char timestr[16]; +struct pcap_pkthdr *header; +const u_char *pkt_data; +time_t local_tv_sec; + + + /* Retrieve the device list on the local machine */ + if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf_s("%d", &inum); + + if(inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the device */ + if ( (adhandle= pcap_open(d->name, // name of the device + 65536, // portion of the packet to capture. + // 65536 guarantees that the whole packet will be captured on all the link layers + PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode + 1000, // read timeout + NULL, // authentication on the remote machine + errbuf // error buffer + ) ) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + printf("\nlistening on %s...\n", d->description); + + /* At this point, we don't need any more the device list. Free it */ + pcap_freealldevs(alldevs); + + /* Retrieve the packets */ + while((res = pcap_next_ex( adhandle, &header, &pkt_data)) >= 0){ + + if(res == 0) + /* Timeout elapsed */ + continue; + + /* convert the timestamp to readable format */ + local_tv_sec = header->ts.tv_sec; + localtime_s(<ime, &local_tv_sec); + strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); + + printf("%s,%.6d len:%d\n", timestr, header->ts.tv_usec, header->len); + } + + if(res == -1){ + printf("Error reading the packets: %s\n", pcap_geterr(adhandle)); + return -1; + } + + return 0; } \ No newline at end of file diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.dsp b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.dsp rename to libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.dsp index e798f636..0405d292 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="basic_dump_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=basic_dump_ex - Win32 Release -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "basic_dump_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "basic_dump_ex.mak" CFG="basic_dump_ex - Win32 Release" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "basic_dump_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "basic_dump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "basic_dump_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "basic_dump_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "basic_dump_ex - Win32 Release" -# Name "basic_dump_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\basic_dump_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="basic_dump_ex" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=basic_dump_ex - Win32 Release +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "basic_dump_ex.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "basic_dump_ex.mak" CFG="basic_dump_ex - Win32 Release" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "basic_dump_ex - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "basic_dump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "basic_dump_ex - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "basic_dump_ex - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "basic_dump_ex - Win32 Release" +# Name "basic_dump_ex - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\basic_dump_ex.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.vcproj b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.vcproj index 18ae092a..58152036 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/basic_dump_ex.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/basic_dump_ex.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.c b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile.c similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.c rename to libs/WpdPack_4_1_2/Examples-remote/misc/readfile.c index 50f8767f..7db43b43 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.c +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile.c @@ -1,78 +1,78 @@ -#include -#include - -#define LINE_LEN 16 - -void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); - -int main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -char source[PCAP_BUF_SIZE]; - - if(argc != 2){ - - printf("usage: %s filename", argv[0]); - return -1; - - } - - /* Create the source string according to the new WinPcap syntax */ - if ( pcap_createsrcstr( source, // variable that will keep the source string - PCAP_SRC_FILE, // we want to open a file - NULL, // remote host - NULL, // port on the remote host - argv[1], // name of the file we want to open - errbuf // error buffer - ) != 0) - { - fprintf(stderr,"\nError creating a source string\n"); - return -1; - } - - /* Open the capture file */ - if ( (fp= pcap_open(source, // name of the device - 65536, // portion of the packet to capture - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", source); - return -1; - } - - // read and dispatch packets until EOF is reached - pcap_loop(fp, 0, dispatcher_handler, NULL); - - return 0; -} - - - -void dispatcher_handler(u_char *temp1, - const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - u_int i=0; - - /* - * Unused variable - */ - (VOID)temp1; - - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - -} +#include +#include + +#define LINE_LEN 16 + +void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); + +int main(int argc, char **argv) +{ +pcap_t *fp; +char errbuf[PCAP_ERRBUF_SIZE]; +char source[PCAP_BUF_SIZE]; + + if(argc != 2){ + + printf("usage: %s filename", argv[0]); + return -1; + + } + + /* Create the source string according to the new WinPcap syntax */ + if ( pcap_createsrcstr( source, // variable that will keep the source string + PCAP_SRC_FILE, // we want to open a file + NULL, // remote host + NULL, // port on the remote host + argv[1], // name of the file we want to open + errbuf // error buffer + ) != 0) + { + fprintf(stderr,"\nError creating a source string\n"); + return -1; + } + + /* Open the capture file */ + if ( (fp= pcap_open(source, // name of the device + 65536, // portion of the packet to capture + // 65536 guarantees that the whole packet will be captured on all the link layers + PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode + 1000, // read timeout + NULL, // authentication on the remote machine + errbuf // error buffer + ) ) == NULL) + { + fprintf(stderr,"\nUnable to open the file %s.\n", source); + return -1; + } + + // read and dispatch packets until EOF is reached + pcap_loop(fp, 0, dispatcher_handler, NULL); + + return 0; +} + + + +void dispatcher_handler(u_char *temp1, + const struct pcap_pkthdr *header, const u_char *pkt_data) +{ + u_int i=0; + + /* + * Unused variable + */ + (VOID)temp1; + + /* print pkt timestamp and pkt len */ + printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); + + /* Print the packet */ + for (i=1; (i < header->caplen + 1 ) ; i++) + { + printf("%.2x ", pkt_data[i-1]); + if ( (i % LINE_LEN) == 0) printf("\n"); + } + + printf("\n\n"); + +} diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.dsp b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.dsp rename to libs/WpdPack_4_1_2/Examples-remote/misc/readfile.dsp index 88972bb5..5d45bde1 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile/readfile.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="readfile" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readfile - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readfile.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readfile.mak" CFG="readfile - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readfile - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readfile - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readfile - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "readfile - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "readfile - Win32 Release" -# Name "readfile - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\readfile.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="readfile" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=readfile - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "readfile.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "readfile.mak" CFG="readfile - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "readfile - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "readfile - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "readfile - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "readfile - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "readfile - Win32 Release" +# Name "readfile - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\readfile.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.vcproj b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/misc/readfile.vcproj index 9644ca01..34f7c1af 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.c b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.c rename to libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.c index 2ac24923..622bc9e7 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.c +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.c @@ -1,73 +1,73 @@ -#include -#include - -#define LINE_LEN 16 - -int main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -char source[PCAP_BUF_SIZE]; -struct pcap_pkthdr *header; -const u_char *pkt_data; -u_int i=0; -int res; - - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - } - - /* Create the source string according to the new WinPcap syntax */ - if ( pcap_createsrcstr( source, // variable that will keep the source string - PCAP_SRC_FILE, // we want to open a file - NULL, // remote host - NULL, // port on the remote host - argv[1], // name of the file we want to open - errbuf // error buffer - ) != 0) - { - fprintf(stderr,"\nError creating a source string\n"); - return -1; - } - - /* Open the capture file */ - if ( (fp= pcap_open(source, // name of the device - 65536, // portion of the packet to capture - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", source); - return -1; - } - - /* Retrieve the packets from the file */ - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - } - - - if (res == -1) - { - printf("Error reading the packets: %s\n", pcap_geterr(fp)); - } - - return 0; -} - +#include +#include + +#define LINE_LEN 16 + +int main(int argc, char **argv) +{ +pcap_t *fp; +char errbuf[PCAP_ERRBUF_SIZE]; +char source[PCAP_BUF_SIZE]; +struct pcap_pkthdr *header; +const u_char *pkt_data; +u_int i=0; +int res; + + if(argc != 2) + { + printf("usage: %s filename", argv[0]); + return -1; + } + + /* Create the source string according to the new WinPcap syntax */ + if ( pcap_createsrcstr( source, // variable that will keep the source string + PCAP_SRC_FILE, // we want to open a file + NULL, // remote host + NULL, // port on the remote host + argv[1], // name of the file we want to open + errbuf // error buffer + ) != 0) + { + fprintf(stderr,"\nError creating a source string\n"); + return -1; + } + + /* Open the capture file */ + if ( (fp= pcap_open(source, // name of the device + 65536, // portion of the packet to capture + // 65536 guarantees that the whole packet will be captured on all the link layers + PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode + 1000, // read timeout + NULL, // authentication on the remote machine + errbuf // error buffer + ) ) == NULL) + { + fprintf(stderr,"\nUnable to open the file %s.\n", source); + return -1; + } + + /* Retrieve the packets from the file */ + while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) + { + /* print pkt timestamp and pkt len */ + printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); + + /* Print the packet */ + for (i=1; (i < header->caplen + 1 ) ; i++) + { + printf("%.2x ", pkt_data[i-1]); + if ( (i % LINE_LEN) == 0) printf("\n"); + } + + printf("\n\n"); + } + + + if (res == -1) + { + printf("Error reading the packets: %s\n", pcap_geterr(fp)); + } + + return 0; +} + diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.dsp b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.dsp rename to libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.dsp index 2c1b4889..07dcf9ff 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/readfile_ex/readfile_ex.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="readfile_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=readfile_ex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "readfile_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "readfile_ex.mak" CFG="readfile_ex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "readfile_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "readfile_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "readfile_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "readfile_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "readfile_ex - Win32 Release" -# Name "readfile_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\readfile_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="readfile_ex" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=readfile_ex - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "readfile_ex.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "readfile_ex.mak" CFG="readfile_ex - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "readfile_ex - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "readfile_ex - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "readfile_ex - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "readfile_ex - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "readfile_ex - Win32 Release" +# Name "readfile_ex - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\readfile_ex.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.vcproj b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.vcproj index 78a7fc7e..b194a625 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/readfile_ex.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/readfile_ex.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.c b/libs/WpdPack_4_1_2/Examples-remote/misc/savedump.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.c rename to libs/WpdPack_4_1_2/Examples-remote/misc/savedump.c index 3bbb3de2..6316939b 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.c +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/savedump.c @@ -1,104 +1,104 @@ -#include "pcap.h" - -/* prototype of the packet handler */ -void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int main(int argc, char **argv) -{ -pcap_if_t *alldevs; -pcap_if_t *d; -int inum; -int i=0; -pcap_t *adhandle; -char errbuf[PCAP_ERRBUF_SIZE]; -pcap_dumper_t *dumpfile; - - - - /* Check command line */ - if(argc != 2) - { - printf("usage: %s filename", argv[0]); - return -1; - } - - /* Retrieve the device list on the local machine */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - - /* Open the device */ - if ( (adhandle= pcap_open(d->name, // name of the device - 65536, // portion of the packet to capture - // 65536 guarantees that the whole packet will be captured on all the link layers - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Open the dump file */ - dumpfile = pcap_dump_open(adhandle, argv[1]); - - if(dumpfile==NULL) - { - fprintf(stderr,"\nError opening output file\n"); - return -1; - } - - printf("\nlistening on %s... Press Ctrl+C to stop...\n", d->description); - - /* At this point, we no longer need the device list. Free it */ - pcap_freealldevs(alldevs); - - /* start the capture */ - pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile); - - return 0; -} - -/* Callback function invoked by libpcap for every incoming packet */ -void packet_handler(u_char *dumpfile, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - /* save the packet on the dump file */ - pcap_dump(dumpfile, header, pkt_data); -} +#include "pcap.h" + +/* prototype of the packet handler */ +void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data); + +int main(int argc, char **argv) +{ +pcap_if_t *alldevs; +pcap_if_t *d; +int inum; +int i=0; +pcap_t *adhandle; +char errbuf[PCAP_ERRBUF_SIZE]; +pcap_dumper_t *dumpfile; + + + + /* Check command line */ + if(argc != 2) + { + printf("usage: %s filename", argv[0]); + return -1; + } + + /* Retrieve the device list on the local machine */ + if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf_s("%d", &inum); + + if(inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + + /* Open the device */ + if ( (adhandle= pcap_open(d->name, // name of the device + 65536, // portion of the packet to capture + // 65536 guarantees that the whole packet will be captured on all the link layers + PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode + 1000, // read timeout + NULL, // authentication on the remote machine + errbuf // error buffer + ) ) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Open the dump file */ + dumpfile = pcap_dump_open(adhandle, argv[1]); + + if(dumpfile==NULL) + { + fprintf(stderr,"\nError opening output file\n"); + return -1; + } + + printf("\nlistening on %s... Press Ctrl+C to stop...\n", d->description); + + /* At this point, we no longer need the device list. Free it */ + pcap_freealldevs(alldevs); + + /* start the capture */ + pcap_loop(adhandle, 0, packet_handler, (unsigned char *)dumpfile); + + return 0; +} + +/* Callback function invoked by libpcap for every incoming packet */ +void packet_handler(u_char *dumpfile, const struct pcap_pkthdr *header, const u_char *pkt_data) +{ + /* save the packet on the dump file */ + pcap_dump(dumpfile, header, pkt_data); +} diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.dsp b/libs/WpdPack_4_1_2/Examples-remote/misc/savedump.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.dsp rename to libs/WpdPack_4_1_2/Examples-remote/misc/savedump.dsp index 7d2e366b..22d5d399 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/savedump/savedump.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/savedump.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="savedump" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=savedump - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "savedump.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "savedump.mak" CFG="savedump - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "savedump - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "savedump - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "savedump - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "savedump - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "savedump - Win32 Release" -# Name "savedump - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\savedump.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="savedump" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=savedump - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "savedump.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "savedump.mak" CFG="savedump - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "savedump - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "savedump - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "savedump - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "savedump - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "savedump - Win32 Release" +# Name "savedump - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\savedump.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.vcproj b/libs/WpdPack_4_1_2/Examples-remote/misc/savedump.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/misc/savedump.vcproj index 5a05aada..fd4c12a8 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/savedump.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/savedump.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.c b/libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.c similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.c rename to libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.c index 3a95a355..55b1a5b3 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.c +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.c @@ -1,64 +1,64 @@ -#include -#include - -#include - - -void main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -u_char packet[100]; -int i; - - /* Check the validity of the command line */ - if (argc != 2) - { - printf("usage: %s interface (e.g. 'rpcap://eth0')", argv[0]); - return; - } - - /* Open the output device */ - if ( (fp= pcap_open(argv[1], // name of the device - 100, // portion of the packet to capture (only the first 100 bytes) - PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode - 1000, // read timeout - NULL, // authentication on the remote machine - errbuf // error buffer - ) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]); - return; - } - - /* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */ - packet[0]=1; - packet[1]=1; - packet[2]=1; - packet[3]=1; - packet[4]=1; - packet[5]=1; - - /* set mac source to 2:2:2:2:2:2 */ - packet[6]=2; - packet[7]=2; - packet[8]=2; - packet[9]=2; - packet[10]=2; - packet[11]=2; - - /* Fill the rest of the packet */ - for(i=12;i<100;i++) - { - packet[i]=(u_char)i; - } - - /* Send down the packet */ - if (pcap_sendpacket(fp, packet, 100 /* size */) != 0) - { - fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp)); - return; - } - - return; -} +#include +#include + +#include + + +void main(int argc, char **argv) +{ +pcap_t *fp; +char errbuf[PCAP_ERRBUF_SIZE]; +u_char packet[100]; +int i; + + /* Check the validity of the command line */ + if (argc != 2) + { + printf("usage: %s interface (e.g. 'rpcap://eth0')", argv[0]); + return; + } + + /* Open the output device */ + if ( (fp= pcap_open(argv[1], // name of the device + 100, // portion of the packet to capture (only the first 100 bytes) + PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode + 1000, // read timeout + NULL, // authentication on the remote machine + errbuf // error buffer + ) ) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", argv[1]); + return; + } + + /* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */ + packet[0]=1; + packet[1]=1; + packet[2]=1; + packet[3]=1; + packet[4]=1; + packet[5]=1; + + /* set mac source to 2:2:2:2:2:2 */ + packet[6]=2; + packet[7]=2; + packet[8]=2; + packet[9]=2; + packet[10]=2; + packet[11]=2; + + /* Fill the rest of the packet */ + for(i=12;i<100;i++) + { + packet[i]=(u_char)i; + } + + /* Send down the packet */ + if (pcap_sendpacket(fp, packet, 100 /* size */) != 0) + { + fprintf(stderr,"\nError sending the packet: %s\n", pcap_geterr(fp)); + return; + } + + return; +} diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.dsp b/libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.dsp rename to libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.dsp index 982ce670..95022e37 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/sendpack/sendpack.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="sendpack" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sendpack - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sendpack.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sendpack.mak" CFG="sendpack - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sendpack - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sendpack - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sendpack - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "sendpack - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "sendpack - Win32 Release" -# Name "sendpack - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sendpack.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="sendpack" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=sendpack - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "sendpack.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "sendpack.mak" CFG="sendpack - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "sendpack - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "sendpack - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "sendpack - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "sendpack - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /I "D:/Program Files/Microsoft Platform SDK/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib ws2_32.lib Iphlpapi.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "sendpack - Win32 Release" +# Name "sendpack - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\sendpack.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.vcproj b/libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.vcproj index 04a99b17..ee5d3ae7 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/misc/sendpack.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/misc/sendpack.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.c b/libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.c similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.c rename to libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.c index 9c1c3f69..ad83a16e 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.c +++ b/libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.c @@ -1,169 +1,169 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - -#include - -#define MAX_PRINT 80 -#define MAX_LINE 16 - - -void usage(); - - -void main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -char *source=NULL; -char *ofilename=NULL; -char *filter=NULL; -int i; -pcap_dumper_t *dumpfile; -struct bpf_program fcode; -bpf_u_int32 NetMask; -int res; -struct pcap_pkthdr *header; -const u_char *pkt_data; - - if (argc == 1) - { - usage(); - return; - } - - for(i=1;i < argc; i+= 2) - { - - switch (argv[i] [1]) - { - case 's': - { - source=argv[i+1]; - }; - break; - - case 'o': - { - ofilename=argv[i+1]; - }; - break; - - case 'f': - { - filter=argv[i+1]; - }; - break; - } - } - - // open a capture from the network - if (source != NULL) - { - if ( (fp= pcap_open(source, - 1514 /*snaplen*/, - PCAP_OPENFLAG_PROMISCUOUS /*flags*/, - 20 /*read timeout*/, - NULL /* remote authentication */, - errbuf) - ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter.\n"); - return; - } - } - - else usage(); - - if (filter != NULL) - { - // We should loop through the adapters returned by the pcap_findalldevs_ex() - // in order to locate the correct one. - // - // Let's do things simpler: we suppose to be in a C class network ;-) - NetMask=0xffffff; - - //compile the filter - if(pcap_compile(fp, &fcode, filter, 1, NetMask) < 0) - { - fprintf(stderr,"\nError compiling filter: wrong syntax.\n"); - return; - } - - //set the filter - if(pcap_setfilter(fp, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter\n"); - return; - } - - } - - //open the dump file - if (ofilename != NULL) - { - dumpfile= pcap_dump_open(fp, ofilename); - - if (dumpfile == NULL) - { - fprintf(stderr,"\nError opening output file\n"); - return; - } - } - else usage(); - - //start the capture - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - - if(res == 0) - /* Timeout elapsed */ - continue; - - //save the packet on the dump file - pcap_dump((unsigned char *) dumpfile, header, pkt_data); - - } -} - - -void usage() -{ - - printf("\npf - Generic Packet Filter.\n"); - printf("\nUsage:\npf -s source -o output_file_name [-f filter_string]\n\n"); - exit(0); +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include +#include + +#include + +#define MAX_PRINT 80 +#define MAX_LINE 16 + + +void usage(); + + +void main(int argc, char **argv) +{ +pcap_t *fp; +char errbuf[PCAP_ERRBUF_SIZE]; +char *source=NULL; +char *ofilename=NULL; +char *filter=NULL; +int i; +pcap_dumper_t *dumpfile; +struct bpf_program fcode; +bpf_u_int32 NetMask; +int res; +struct pcap_pkthdr *header; +const u_char *pkt_data; + + if (argc == 1) + { + usage(); + return; + } + + for(i=1;i < argc; i+= 2) + { + + switch (argv[i] [1]) + { + case 's': + { + source=argv[i+1]; + }; + break; + + case 'o': + { + ofilename=argv[i+1]; + }; + break; + + case 'f': + { + filter=argv[i+1]; + }; + break; + } + } + + // open a capture from the network + if (source != NULL) + { + if ( (fp= pcap_open(source, + 1514 /*snaplen*/, + PCAP_OPENFLAG_PROMISCUOUS /*flags*/, + 20 /*read timeout*/, + NULL /* remote authentication */, + errbuf) + ) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter.\n"); + return; + } + } + + else usage(); + + if (filter != NULL) + { + // We should loop through the adapters returned by the pcap_findalldevs_ex() + // in order to locate the correct one. + // + // Let's do things simpler: we suppose to be in a C class network ;-) + NetMask=0xffffff; + + //compile the filter + if(pcap_compile(fp, &fcode, filter, 1, NetMask) < 0) + { + fprintf(stderr,"\nError compiling filter: wrong syntax.\n"); + return; + } + + //set the filter + if(pcap_setfilter(fp, &fcode)<0) + { + fprintf(stderr,"\nError setting the filter\n"); + return; + } + + } + + //open the dump file + if (ofilename != NULL) + { + dumpfile= pcap_dump_open(fp, ofilename); + + if (dumpfile == NULL) + { + fprintf(stderr,"\nError opening output file\n"); + return; + } + } + else usage(); + + //start the capture + while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) + { + + if(res == 0) + /* Timeout elapsed */ + continue; + + //save the packet on the dump file + pcap_dump((unsigned char *) dumpfile, header, pkt_data); + + } +} + + +void usage() +{ + + printf("\npf - Generic Packet Filter.\n"); + printf("\nUsage:\npf -s source -o output_file_name [-f filter_string]\n\n"); + exit(0); } \ No newline at end of file diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.dsp b/libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.dsp rename to libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsp index 5bd65b5b..c01d2e7e 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pcap_filter/pcap_filter.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="pcap_filter" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pcap_filter - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pcap_filter.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pcap_filter.mak" CFG="pcap_filter - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pcap_filter - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pcap_filter - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pcap_filter - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 /out:"Release/pf.exe" - -!ELSEIF "$(CFG)" == "pcap_filter - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/pf.exe" /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "pcap_filter - Win32 Release" -# Name "pcap_filter - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pcap_filter.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="pcap_filter" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=pcap_filter - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "pcap_filter.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "pcap_filter.mak" CFG="pcap_filter - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "pcap_filter - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "pcap_filter - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "pcap_filter - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 /out:"Release/pf.exe" + +!ELSEIF "$(CFG)" == "pcap_filter - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /out:"Debug/pf.exe" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "pcap_filter - Win32 Release" +# Name "pcap_filter - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\pcap_filter.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.dsw b/libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.dsw rename to libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsw index a9031834..1d39119b 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pcap_filter"=.\pcap_filter.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "pcap_filter"=.\pcap_filter.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.vcproj b/libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.vcproj index c89a2980..ff322b54 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pcap_filter/pcap_filter.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/pcap_filter/pcap_filter.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pcap_fopen/pcap_fopen.cpp b/libs/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.cpp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/pcap_fopen/pcap_fopen.cpp rename to libs/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.cpp index 18785796..0476e40e 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pcap_fopen/pcap_fopen.cpp +++ b/libs/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.cpp @@ -1,94 +1,94 @@ -/* - * Copyright (c) 2008 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This sample was contributed by - * Marcin Okraszewski (Marcin.OkraszewskiATpl.compuware.com) - * - */ - -#include -#include -#include - -/** Prints packet timestaps regardless of format*/ -int _tmain(int argc, _TCHAR* argv[]) -{ - char errbuf[PCAP_ERRBUF_SIZE]; - wchar_t cmd[1024]; - wchar_t tshark_path[MAX_PATH]; - wchar_t file_path[MAX_PATH]; - - if ( argc != 3 ) { - wprintf(L"Prints packet timestaps regardless of format.\n"); - wprintf(L"Usage:\n\t%ls \n", argv[0]); - return 1; - } - - // conversion to short path name in case there are spaces - if ( ! GetShortPathNameW(argv[1], tshark_path, MAX_PATH) || - ! GetShortPathNameW(argv[2], file_path, MAX_PATH) ) - { - printf("Failed to convert paths to short form."); - return 1; - } - - // create tshark command, which will make the trace conversion and print in libpcap format to stdout - if ( swprintf_s(cmd, 1024, L"%ls -r %ls -w - -F libpcap", tshark_path, file_path) < 0 ) { - wprintf(L"Failed to create command\n"); - return 1; - } - - // start tshark - FILE *tshark_out = _wpopen(cmd, L"rb"); - if ( tshark_out == NULL ) { - strerror_s(errbuf, PCAP_ERRBUF_SIZE, errno); - printf("Failed run tshark: %s\n", errbuf); - wprintf(L"Command: %ls", cmd); - return 1; - } - - // open stdout from tshark - pcap_t *pcap = pcap_fopen_offline(tshark_out, errbuf); - if ( pcap == NULL ) { - printf("Error opening stream from tshark: %s\n", errbuf); - return 1; - } - - // print information about every packet int trace - struct pcap_pkthdr hdr; - while ( pcap_next(pcap, &hdr) ) { - printf("packet: ts: %u.%06u, len: %4u, caplen: %4u\n", hdr.ts.tv_sec, hdr.ts.tv_usec, hdr.len, hdr.caplen); - } - - // clean up - pcap_close(pcap); - _pclose(tshark_out); - return 0; -} - +/* + * Copyright (c) 2008 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * This sample was contributed by + * Marcin Okraszewski (Marcin.OkraszewskiATpl.compuware.com) + * + */ + +#include +#include +#include + +/** Prints packet timestaps regardless of format*/ +int _tmain(int argc, _TCHAR* argv[]) +{ + char errbuf[PCAP_ERRBUF_SIZE]; + wchar_t cmd[1024]; + wchar_t tshark_path[MAX_PATH]; + wchar_t file_path[MAX_PATH]; + + if ( argc != 3 ) { + wprintf(L"Prints packet timestaps regardless of format.\n"); + wprintf(L"Usage:\n\t%ls \n", argv[0]); + return 1; + } + + // conversion to short path name in case there are spaces + if ( ! GetShortPathNameW(argv[1], tshark_path, MAX_PATH) || + ! GetShortPathNameW(argv[2], file_path, MAX_PATH) ) + { + printf("Failed to convert paths to short form."); + return 1; + } + + // create tshark command, which will make the trace conversion and print in libpcap format to stdout + if ( swprintf_s(cmd, 1024, L"%ls -r %ls -w - -F libpcap", tshark_path, file_path) < 0 ) { + wprintf(L"Failed to create command\n"); + return 1; + } + + // start tshark + FILE *tshark_out = _wpopen(cmd, L"rb"); + if ( tshark_out == NULL ) { + strerror_s(errbuf, PCAP_ERRBUF_SIZE, errno); + printf("Failed run tshark: %s\n", errbuf); + wprintf(L"Command: %ls", cmd); + return 1; + } + + // open stdout from tshark + pcap_t *pcap = pcap_fopen_offline(tshark_out, errbuf); + if ( pcap == NULL ) { + printf("Error opening stream from tshark: %s\n", errbuf); + return 1; + } + + // print information about every packet int trace + struct pcap_pkthdr hdr; + while ( pcap_next(pcap, &hdr) ) { + printf("packet: ts: %u.%06u, len: %4u, caplen: %4u\n", hdr.ts.tv_sec, hdr.ts.tv_usec, hdr.len, hdr.caplen); + } + + // clean up + pcap_close(pcap); + _pclose(tshark_out); + return 0; +} + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pcap_fopen/pcap_fopen.vcproj b/libs/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/pcap_fopen/pcap_fopen.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.vcproj index 7ac70a46..73f4c6e0 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pcap_fopen/pcap_fopen.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/pcap_fopen/pcap_fopen.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.c b/libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.c rename to libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.c index a68baa88..6198e7dd 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.c +++ b/libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.c @@ -1,163 +1,163 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - -// -// NOTE: remember to include WPCAP and HAVE_REMOTE among your -// preprocessor definitions. -// - -#include - -#define LINE_LEN 16 - -int main(int argc, char **argv) -{ -pcap_if_t *alldevs, *d; -pcap_t *fp; -u_int inum, i=0; -char errbuf[PCAP_ERRBUF_SIZE]; -int res; -struct pcap_pkthdr *header; -const u_char *pkt_data; - - printf("pktdump_ex: prints the packets of the network using WinPcap.\n"); - printf(" Usage: pktdump_ex [-s source]\n\n" - " Examples:\n" - " pktdump_ex -s file://c:/temp/file.acp\n" - " pktdump_ex -s rpcap://\\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n"); - - if(argc < 3) - { - - printf("\nNo adapter selected: printing the device list:\n"); - /* The user didn't provide a packet source: Retrieve the local device list */ - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf); - return -1; - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s\n ", ++i, d->name); - - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if (i==0) - { - fprintf(stderr,"No interfaces found! Exiting.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if (inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - if ( (fp= pcap_open(d->name, - 100 /*snaplen*/, - PCAP_OPENFLAG_PROMISCUOUS /*flags*/, - 20 /*read timeout*/, - NULL /* remote authentication */, - errbuf) - ) == NULL) - { - fprintf(stderr,"\nError opening adapter\n"); - return -1; - } - } - else - { - // Do not check for the switch type ('-s') - if ( (fp= pcap_open(argv[2], - 100 /*snaplen*/, - PCAP_OPENFLAG_PROMISCUOUS /*flags*/, - 20 /*read timeout*/, - NULL /* remote authentication */, - errbuf) - ) == NULL) - { - fprintf(stderr,"\nError opening source: %s\n", errbuf); - return -1; - } - } - - /* Read the packets */ - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) - { - - if(res == 0) - /* Timeout elapsed */ - continue; - - /* print pkt timestamp and pkt len */ - printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); - - /* Print the packet */ - for (i=1; (i < header->caplen + 1 ) ; i++) - { - printf("%.2x ", pkt_data[i-1]); - if ( (i % LINE_LEN) == 0) printf("\n"); - } - - printf("\n\n"); - } - - if(res == -1) - { - fprintf(stderr, "Error reading the packets: %s\n", pcap_geterr(fp)); - return -1; - } - - return 0; -} +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include +#include + +// +// NOTE: remember to include WPCAP and HAVE_REMOTE among your +// preprocessor definitions. +// + +#include + +#define LINE_LEN 16 + +int main(int argc, char **argv) +{ +pcap_if_t *alldevs, *d; +pcap_t *fp; +u_int inum, i=0; +char errbuf[PCAP_ERRBUF_SIZE]; +int res; +struct pcap_pkthdr *header; +const u_char *pkt_data; + + printf("pktdump_ex: prints the packets of the network using WinPcap.\n"); + printf(" Usage: pktdump_ex [-s source]\n\n" + " Examples:\n" + " pktdump_ex -s file://c:/temp/file.acp\n" + " pktdump_ex -s rpcap://\\Device\\NPF_{C8736017-F3C3-4373-94AC-9A34B7DAD998}\n\n"); + + if(argc < 3) + { + + printf("\nNo adapter selected: printing the device list:\n"); + /* The user didn't provide a packet source: Retrieve the local device list */ + if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf); + return -1; + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s\n ", ++i, d->name); + + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if (i==0) + { + fprintf(stderr,"No interfaces found! Exiting.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf_s("%d", &inum); + + if (inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for (d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the device */ + if ( (fp= pcap_open(d->name, + 100 /*snaplen*/, + PCAP_OPENFLAG_PROMISCUOUS /*flags*/, + 20 /*read timeout*/, + NULL /* remote authentication */, + errbuf) + ) == NULL) + { + fprintf(stderr,"\nError opening adapter\n"); + return -1; + } + } + else + { + // Do not check for the switch type ('-s') + if ( (fp= pcap_open(argv[2], + 100 /*snaplen*/, + PCAP_OPENFLAG_PROMISCUOUS /*flags*/, + 20 /*read timeout*/, + NULL /* remote authentication */, + errbuf) + ) == NULL) + { + fprintf(stderr,"\nError opening source: %s\n", errbuf); + return -1; + } + } + + /* Read the packets */ + while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0) + { + + if(res == 0) + /* Timeout elapsed */ + continue; + + /* print pkt timestamp and pkt len */ + printf("%ld:%ld (%ld)\n", header->ts.tv_sec, header->ts.tv_usec, header->len); + + /* Print the packet */ + for (i=1; (i < header->caplen + 1 ) ; i++) + { + printf("%.2x ", pkt_data[i-1]); + if ( (i % LINE_LEN) == 0) printf("\n"); + } + + printf("\n\n"); + } + + if(res == -1) + { + fprintf(stderr, "Error reading the packets: %s\n", pcap_geterr(fp)); + return -1; + } + + return 0; +} diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.dsp b/libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.dsp rename to libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsp index 85c062da..a9800e6a 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="pktdump_ex" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=pktdump_ex - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "pktdump_ex.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "pktdump_ex.mak" CFG="pktdump_ex - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "pktdump_ex - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "pktdump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "pktdump_ex - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "pktdump_ex - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "pktdump_ex - Win32 Release" -# Name "pktdump_ex - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\pktdump_ex.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="pktdump_ex" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=pktdump_ex - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "pktdump_ex.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "pktdump_ex.mak" CFG="pktdump_ex - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "pktdump_ex - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "pktdump_ex - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "pktdump_ex - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "pktdump_ex - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "pktdump_ex - Win32 Release" +# Name "pktdump_ex - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\pktdump_ex.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.dsw b/libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.dsw rename to libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsw index b0f6812f..ec247333 100644 --- a/libs/WinPcap-413-173-b4/Examples-pcap/pktdump_ex/pktdump_ex.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "pktdump_ex"=.\pktdump_ex.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "pktdump_ex"=.\pktdump_ex.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.vcproj b/libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.vcproj index b1fa198a..d99862f4 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/pktdump_ex/pktdump_ex.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/pktdump_ex/pktdump_ex.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/sendcap/sencap.dsw b/libs/WpdPack_4_1_2/Examples-remote/sendcap/sencap.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/sendcap/sencap.dsw rename to libs/WpdPack_4_1_2/Examples-remote/sendcap/sencap.dsw index 5c40d67a..eae0bc2c 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/sendcap/sencap.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/sendcap/sencap.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "sendcap"=.\sendcap.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "sendcap"=.\sendcap.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.c b/libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.c rename to libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.c index aed5c146..876c6d80 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.c +++ b/libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.c @@ -1,184 +1,184 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include - -#include - -void usage(); - -void main(int argc, char **argv) -{ - pcap_t *indesc,*outdesc; - char errbuf[PCAP_ERRBUF_SIZE]; - char source[PCAP_BUF_SIZE]; - FILE *capfile; - int caplen, sync; - u_int res; - pcap_send_queue *squeue; - struct pcap_pkthdr *pktheader; - u_char *pktdata; - float cpu_time; - u_int npacks = 0; - errno_t fopen_error; - - /* Check the validity of the command line */ - if (argc <= 2 || argc >= 5) - { - usage(); - return; - } - - /* Retrieve the length of the capture file */ - fopen_error = fopen_s(&capfile, argv[1],"rb"); - if(fopen_error != 0){ - printf("Error opening the file, errno %d.\n", fopen_error); - return; - } - - fseek(capfile , 0, SEEK_END); - caplen= ftell(capfile)- sizeof(struct pcap_file_header); - fclose(capfile); - - /* Chek if the timestamps must be respected */ - if(argc == 4 && argv[3][0] == 's') - sync = TRUE; - else - sync = FALSE; - - /* Open the capture */ - /* Create the source string according to the new WinPcap syntax */ - if ( pcap_createsrcstr( source, // variable that will keep the source string - PCAP_SRC_FILE, // we want to open a file - NULL, // remote host - NULL, // port on the remote host - argv[1], // name of the file we want to open - errbuf // error buffer - ) != 0) - { - fprintf(stderr,"\nError creating a source string\n"); - return; - } - - /* Open the capture file */ - if ( (indesc= pcap_open(source, 65536, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) - { - fprintf(stderr,"\nUnable to open the file %s.\n", source); - return; - } - - /* Open the output adapter */ - if ( (outdesc= pcap_open(argv[2], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) - { - fprintf(stderr,"\nUnable to open adapter %s.\n", source); - return; - } - - /* Check the MAC type */ - if (pcap_datalink(indesc) != pcap_datalink(outdesc)) - { - printf("Warning: the datalink of the capture differs from the one of the selected interface.\n"); - printf("Press a key to continue, or CTRL+C to stop.\n"); - getchar(); - } - - /* Allocate a send queue */ - squeue = pcap_sendqueue_alloc(caplen); - - /* Fill the queue with the packets from the file */ - while ((res = pcap_next_ex( indesc, &pktheader, &pktdata)) == 1) - { - if (pcap_sendqueue_queue(squeue, pktheader, pktdata) == -1) - { - printf("Warning: packet buffer too small, not all the packets will be sent.\n"); - break; - } - - npacks++; - } - - if (res == -1) - { - printf("Corrupted input file.\n"); - pcap_sendqueue_destroy(squeue); - return; - } - - /* Transmit the queue */ - - cpu_time = (float)clock (); - - if ((res = pcap_sendqueue_transmit(outdesc, squeue, sync)) < squeue->len) - { - printf("An error occurred sending the packets: %s. Only %d bytes were sent\n", pcap_geterr(outdesc), res); - } - - cpu_time = (clock() - cpu_time)/CLK_TCK; - - printf ("\n\nElapsed time: %5.3f\n", cpu_time); - printf ("\nTotal packets generated = %d", npacks); - printf ("\nAverage packets per second = %d", (int)((double)npacks/cpu_time)); - printf ("\n"); - - /* free the send queue */ - pcap_sendqueue_destroy(squeue); - - /* Close the input file */ - pcap_close(indesc); - - /* - * lose the output adapter - * IMPORTANT: remember to close the adapter, otherwise there will be no guarantee that all the - * packets will be sent! - */ - pcap_close(outdesc); - - - return; -} - - -void usage() -{ - - printf("\nSendcap, sends a libpcap/tcpdump capture file to the net. Copyright (C) 2002 Loris Degioanni.\n"); - printf("\nUsage:\n"); - printf("\t sendcap file_name adapter [s]\n"); - printf("\nParameters:\n"); - printf("\nfile_name: the name of the dump file that will be sent to the network\n"); - printf("\nadapter: the device to use. Use \"WinDump -D\" for a list of valid devices\n"); - printf("\ns: if present, forces the packets to be sent synchronously, i.e. respecting the timestamps in the dump file. This option will work only under Windows NTx.\n\n"); - - exit(0); +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include + +void usage(); + +void main(int argc, char **argv) +{ + pcap_t *indesc,*outdesc; + char errbuf[PCAP_ERRBUF_SIZE]; + char source[PCAP_BUF_SIZE]; + FILE *capfile; + int caplen, sync; + u_int res; + pcap_send_queue *squeue; + struct pcap_pkthdr *pktheader; + u_char *pktdata; + float cpu_time; + u_int npacks = 0; + errno_t fopen_error; + + /* Check the validity of the command line */ + if (argc <= 2 || argc >= 5) + { + usage(); + return; + } + + /* Retrieve the length of the capture file */ + fopen_error = fopen_s(&capfile, argv[1],"rb"); + if(fopen_error != 0){ + printf("Error opening the file, errno %d.\n", fopen_error); + return; + } + + fseek(capfile , 0, SEEK_END); + caplen= ftell(capfile)- sizeof(struct pcap_file_header); + fclose(capfile); + + /* Chek if the timestamps must be respected */ + if(argc == 4 && argv[3][0] == 's') + sync = TRUE; + else + sync = FALSE; + + /* Open the capture */ + /* Create the source string according to the new WinPcap syntax */ + if ( pcap_createsrcstr( source, // variable that will keep the source string + PCAP_SRC_FILE, // we want to open a file + NULL, // remote host + NULL, // port on the remote host + argv[1], // name of the file we want to open + errbuf // error buffer + ) != 0) + { + fprintf(stderr,"\nError creating a source string\n"); + return; + } + + /* Open the capture file */ + if ( (indesc= pcap_open(source, 65536, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) + { + fprintf(stderr,"\nUnable to open the file %s.\n", source); + return; + } + + /* Open the output adapter */ + if ( (outdesc= pcap_open(argv[2], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) + { + fprintf(stderr,"\nUnable to open adapter %s.\n", source); + return; + } + + /* Check the MAC type */ + if (pcap_datalink(indesc) != pcap_datalink(outdesc)) + { + printf("Warning: the datalink of the capture differs from the one of the selected interface.\n"); + printf("Press a key to continue, or CTRL+C to stop.\n"); + getchar(); + } + + /* Allocate a send queue */ + squeue = pcap_sendqueue_alloc(caplen); + + /* Fill the queue with the packets from the file */ + while ((res = pcap_next_ex( indesc, &pktheader, &pktdata)) == 1) + { + if (pcap_sendqueue_queue(squeue, pktheader, pktdata) == -1) + { + printf("Warning: packet buffer too small, not all the packets will be sent.\n"); + break; + } + + npacks++; + } + + if (res == -1) + { + printf("Corrupted input file.\n"); + pcap_sendqueue_destroy(squeue); + return; + } + + /* Transmit the queue */ + + cpu_time = (float)clock (); + + if ((res = pcap_sendqueue_transmit(outdesc, squeue, sync)) < squeue->len) + { + printf("An error occurred sending the packets: %s. Only %d bytes were sent\n", pcap_geterr(outdesc), res); + } + + cpu_time = (clock() - cpu_time)/CLK_TCK; + + printf ("\n\nElapsed time: %5.3f\n", cpu_time); + printf ("\nTotal packets generated = %d", npacks); + printf ("\nAverage packets per second = %d", (int)((double)npacks/cpu_time)); + printf ("\n"); + + /* free the send queue */ + pcap_sendqueue_destroy(squeue); + + /* Close the input file */ + pcap_close(indesc); + + /* + * lose the output adapter + * IMPORTANT: remember to close the adapter, otherwise there will be no guarantee that all the + * packets will be sent! + */ + pcap_close(outdesc); + + + return; +} + + +void usage() +{ + + printf("\nSendcap, sends a libpcap/tcpdump capture file to the net. Copyright (C) 2002 Loris Degioanni.\n"); + printf("\nUsage:\n"); + printf("\t sendcap file_name adapter [s]\n"); + printf("\nParameters:\n"); + printf("\nfile_name: the name of the dump file that will be sent to the network\n"); + printf("\nadapter: the device to use. Use \"WinDump -D\" for a list of valid devices\n"); + printf("\ns: if present, forces the packets to be sent synchronously, i.e. respecting the timestamps in the dump file. This option will work only under Windows NTx.\n\n"); + + exit(0); } \ No newline at end of file diff --git a/libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.dsp b/libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.dsp rename to libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.dsp index f453aa26..230d09b6 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="sendcap" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=sendcap - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "sendcap.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "sendcap.mak" CFG="sendcap - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "sendcap - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "sendcap - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "sendcap - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "PCAP_DONT_INCLUDE_PCAP_BPF_H" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "sendcap - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "PCAP_DONT_INCLUDE_PCAP_BPF_H" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "sendcap - Win32 Release" -# Name "sendcap - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\sendcap.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="sendcap" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=sendcap - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "sendcap.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "sendcap.mak" CFG="sendcap - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "sendcap - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "sendcap - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "sendcap - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "PCAP_DONT_INCLUDE_PCAP_BPF_H" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "sendcap - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "PCAP_DONT_INCLUDE_PCAP_BPF_H" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "sendcap - Win32 Release" +# Name "sendcap - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\sendcap.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.vcproj b/libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.vcproj index 9cd2412e..c95da3c4 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/sendcap/sendcap.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/sendcap/sendcap.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.c b/libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.c rename to libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.c index 13593307..9b991143 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.c +++ b/libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.c @@ -1,134 +1,134 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include -#include - -#include - - -int main() -{ -pcap_if_t *alldevs, *d; -pcap_t *fp; -u_int inum, i=0; -char errbuf[PCAP_ERRBUF_SIZE]; -int res; -struct pcap_pkthdr *header; -const u_char *pkt_data; -struct pcap_pkthdr old; - - printf("SMP_1\n"); - printf("\nThis program tests the WinPcap kernel driver on SMP machines.\n"); - printf("The program tests that timestamps on the captured packets are consistent,\n"); - printf("and that the caplen is equal to the packet length.\n"); - printf("If there is an error, it will print out a message saying \"Inconsistent XXX\"\n"); - - if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) - { - fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); - exit(1); - } - - /* Print the list */ - for(d=alldevs; d; d=d->next) - { - printf("%d. %s", ++i, d->name); - if (d->description) - printf(" (%s)\n", d->description); - else - printf(" (No description available)\n"); - } - - if(i==0) - { - printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); - return -1; - } - - printf("Enter the interface number (1-%d):",i); - scanf_s("%d", &inum); - - if(inum < 1 || inum > i) - { - printf("\nInterface number out of range.\n"); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - /* Jump to the selected adapter */ - for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); - - /* Open the device */ - if ( (fp= pcap_open(d->name, 65536, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) - { - fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); - /* Free the device list */ - pcap_freealldevs(alldevs); - return -1; - } - - old.ts.tv_sec=0; - old.ts.tv_usec=0; - - - /* Read the packets */ - while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0){ - - if(res == 0) - continue; - - //check that caplen is equal to packet length - if (header->caplen!=header->len) - printf("Inconsistent header: CapLen %d\t Len %d\n",header->caplen,header->len); - - //check that timestamps always grow - if ( old.ts.tv_sec > header->ts.tv_sec || (old.ts.tv_sec == header->ts.tv_sec && old.ts.tv_usec > header->ts.tv_usec)) - printf("Inconsistent Timestamps! Old was %d.%.06d - New is %d.%.06d\n",old.ts.tv_sec,old.ts.tv_usec, header->ts.tv_sec,header->ts.tv_usec); - - old=*header; - - } - - if(res == -1){ - printf("Error reading the packets: %s\n", pcap_geterr(fp)); - return -1; - } - - _getch(); - - return 0; -} +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include +#include +#include + +#include + + +int main() +{ +pcap_if_t *alldevs, *d; +pcap_t *fp; +u_int inum, i=0; +char errbuf[PCAP_ERRBUF_SIZE]; +int res; +struct pcap_pkthdr *header; +const u_char *pkt_data; +struct pcap_pkthdr old; + + printf("SMP_1\n"); + printf("\nThis program tests the WinPcap kernel driver on SMP machines.\n"); + printf("The program tests that timestamps on the captured packets are consistent,\n"); + printf("and that the caplen is equal to the packet length.\n"); + printf("If there is an error, it will print out a message saying \"Inconsistent XXX\"\n"); + + if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1) + { + fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + /* Print the list */ + for(d=alldevs; d; d=d->next) + { + printf("%d. %s", ++i, d->name); + if (d->description) + printf(" (%s)\n", d->description); + else + printf(" (No description available)\n"); + } + + if(i==0) + { + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + return -1; + } + + printf("Enter the interface number (1-%d):",i); + scanf_s("%d", &inum); + + if(inum < 1 || inum > i) + { + printf("\nInterface number out of range.\n"); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + /* Jump to the selected adapter */ + for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++); + + /* Open the device */ + if ( (fp= pcap_open(d->name, 65536, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) + { + fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n", d->name); + /* Free the device list */ + pcap_freealldevs(alldevs); + return -1; + } + + old.ts.tv_sec=0; + old.ts.tv_usec=0; + + + /* Read the packets */ + while((res = pcap_next_ex( fp, &header, &pkt_data)) >= 0){ + + if(res == 0) + continue; + + //check that caplen is equal to packet length + if (header->caplen!=header->len) + printf("Inconsistent header: CapLen %d\t Len %d\n",header->caplen,header->len); + + //check that timestamps always grow + if ( old.ts.tv_sec > header->ts.tv_sec || (old.ts.tv_sec == header->ts.tv_sec && old.ts.tv_usec > header->ts.tv_usec)) + printf("Inconsistent Timestamps! Old was %d.%.06d - New is %d.%.06d\n",old.ts.tv_sec,old.ts.tv_usec, header->ts.tv_sec,header->ts.tv_usec); + + old=*header; + + } + + if(res == -1){ + printf("Error reading the packets: %s\n", pcap_geterr(fp)); + return -1; + } + + _getch(); + + return 0; +} diff --git a/libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.dsp b/libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.dsp rename to libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsp index 55c17537..e759c308 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsp @@ -1,102 +1,102 @@ -# Microsoft Developer Studio Project File - Name="smp_1" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=smp_1 - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "smp_1.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "smp_1.mak" CFG="smp_1 - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "smp_1 - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "smp_1 - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "smp_1 - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wpcap.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\lib" - -!ELSEIF "$(CFG)" == "smp_1 - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wpcap.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\lib" - -!ENDIF - -# Begin Target - -# Name "smp_1 - Win32 Release" -# Name "smp_1 - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\SMP_1.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="smp_1" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=smp_1 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "smp_1.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "smp_1.mak" CFG="smp_1 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "smp_1 - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "smp_1 - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "smp_1 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wpcap.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\lib" + +!ELSEIF "$(CFG)" == "smp_1 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wpcap.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\lib" + +!ENDIF + +# Begin Target + +# Name "smp_1 - Win32 Release" +# Name "smp_1 - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\SMP_1.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.dsw b/libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.dsw rename to libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsw index cc63468f..36c8e467 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "smp_1"=.\smp_1.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "smp_1"=.\smp_1.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.vcproj b/libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.vcproj index fc432b04..f789df33 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/smp_1/smp_1.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/smp_1/smp_1.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.c b/libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.c similarity index 96% rename from libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.c rename to libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.c index 42a4b5d9..2d83c3fd 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.c +++ b/libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.c @@ -1,158 +1,158 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include - -#include - -void usage(); - -void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); - - -void main(int argc, char **argv) -{ -pcap_t *fp; -char errbuf[PCAP_ERRBUF_SIZE]; -struct timeval st_ts; -u_int netmask; -struct bpf_program fcode; - - /* Check the validity of the command line */ - if (argc != 2) - { - usage(); - return; - } - - /* Open the output adapter */ - if ( (fp= pcap_open(argv[1], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) - { - fprintf(stderr,"\nUnable to open adapter %s.\n", errbuf); - return; - } - - /* Don't care about netmask, it won't be used for this filter */ - netmask=0xffffff; - - //compile the filter - if (pcap_compile(fp, &fcode, "tcp", 1, netmask) <0 ) - { - fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); - /* Free the device list */ - return; - } - - //set the filter - if (pcap_setfilter(fp, &fcode)<0) - { - fprintf(stderr,"\nError setting the filter.\n"); - pcap_close(fp); - /* Free the device list */ - return; - } - - /* Put the interface in statstics mode */ - if (pcap_setmode(fp, MODE_STAT)<0) - { - fprintf(stderr,"\nError setting the mode.\n"); - pcap_close(fp); - /* Free the device list */ - return; - } - - - printf("TCP traffic summary:\n"); - - /* Start the main loop */ - pcap_loop(fp, 0, dispatcher_handler, (PUCHAR)&st_ts); - - pcap_close(fp); - return; -} - -void dispatcher_handler(u_char *state, const struct pcap_pkthdr *header, const u_char *pkt_data) -{ - struct timeval *old_ts = (struct timeval *)state; - u_int delay; - LARGE_INTEGER Bps,Pps; - struct tm ltime; - char timestr[16]; - time_t local_tv_sec; - - /* Calculate the delay in microseconds from the last sample. */ - /* This value is obtained from the timestamp that the associated with the sample. */ - delay=(header->ts.tv_sec - old_ts->tv_sec) * 1000000 - old_ts->tv_usec + header->ts.tv_usec; - /* Get the number of Bits per second */ - Bps.QuadPart=(((*(LONGLONG*)(pkt_data + 8)) * 8 * 1000000) / (delay)); - /* ^ ^ - | | - | | - | | - converts bytes in bits -- | - | - delay is expressed in microseconds -- - */ - - /* Get the number of Packets per second */ - Pps.QuadPart=(((*(LONGLONG*)(pkt_data)) * 1000000) / (delay)); - - /* Convert the timestamp to readable format */ - local_tv_sec = header->ts.tv_sec; - localtime_s(<ime, &local_tv_sec); - strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); - - /* Print timestamp*/ - printf("%s ", timestr); - - /* Print the samples */ - printf("BPS=%I64u ", Bps.QuadPart); - printf("PPS=%I64u\n", Pps.QuadPart); - - //store current timestamp - old_ts->tv_sec=header->ts.tv_sec; - old_ts->tv_usec=header->ts.tv_usec; -} - - -void usage() -{ - - printf("\nShows the TCP traffic load, in bits per second and packets per second.\nCopyright (C) 2002 Loris Degioanni.\n"); - printf("\nUsage:\n"); - printf("\t tcptop adapter\n"); - printf("\t You can use \"WinDump -D\" if you don't know the name of your adapters.\n"); - - exit(0); +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include + +void usage(); + +void dispatcher_handler(u_char *, const struct pcap_pkthdr *, const u_char *); + + +void main(int argc, char **argv) +{ +pcap_t *fp; +char errbuf[PCAP_ERRBUF_SIZE]; +struct timeval st_ts; +u_int netmask; +struct bpf_program fcode; + + /* Check the validity of the command line */ + if (argc != 2) + { + usage(); + return; + } + + /* Open the output adapter */ + if ( (fp= pcap_open(argv[1], 100, PCAP_OPENFLAG_PROMISCUOUS, 1000, NULL, errbuf) ) == NULL) + { + fprintf(stderr,"\nUnable to open adapter %s.\n", errbuf); + return; + } + + /* Don't care about netmask, it won't be used for this filter */ + netmask=0xffffff; + + //compile the filter + if (pcap_compile(fp, &fcode, "tcp", 1, netmask) <0 ) + { + fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n"); + /* Free the device list */ + return; + } + + //set the filter + if (pcap_setfilter(fp, &fcode)<0) + { + fprintf(stderr,"\nError setting the filter.\n"); + pcap_close(fp); + /* Free the device list */ + return; + } + + /* Put the interface in statstics mode */ + if (pcap_setmode(fp, MODE_STAT)<0) + { + fprintf(stderr,"\nError setting the mode.\n"); + pcap_close(fp); + /* Free the device list */ + return; + } + + + printf("TCP traffic summary:\n"); + + /* Start the main loop */ + pcap_loop(fp, 0, dispatcher_handler, (PUCHAR)&st_ts); + + pcap_close(fp); + return; +} + +void dispatcher_handler(u_char *state, const struct pcap_pkthdr *header, const u_char *pkt_data) +{ + struct timeval *old_ts = (struct timeval *)state; + u_int delay; + LARGE_INTEGER Bps,Pps; + struct tm ltime; + char timestr[16]; + time_t local_tv_sec; + + /* Calculate the delay in microseconds from the last sample. */ + /* This value is obtained from the timestamp that the associated with the sample. */ + delay=(header->ts.tv_sec - old_ts->tv_sec) * 1000000 - old_ts->tv_usec + header->ts.tv_usec; + /* Get the number of Bits per second */ + Bps.QuadPart=(((*(LONGLONG*)(pkt_data + 8)) * 8 * 1000000) / (delay)); + /* ^ ^ + | | + | | + | | + converts bytes in bits -- | + | + delay is expressed in microseconds -- + */ + + /* Get the number of Packets per second */ + Pps.QuadPart=(((*(LONGLONG*)(pkt_data)) * 1000000) / (delay)); + + /* Convert the timestamp to readable format */ + local_tv_sec = header->ts.tv_sec; + localtime_s(<ime, &local_tv_sec); + strftime( timestr, sizeof timestr, "%H:%M:%S", <ime); + + /* Print timestamp*/ + printf("%s ", timestr); + + /* Print the samples */ + printf("BPS=%I64u ", Bps.QuadPart); + printf("PPS=%I64u\n", Pps.QuadPart); + + //store current timestamp + old_ts->tv_sec=header->ts.tv_sec; + old_ts->tv_usec=header->ts.tv_usec; +} + + +void usage() +{ + + printf("\nShows the TCP traffic load, in bits per second and packets per second.\nCopyright (C) 2002 Loris Degioanni.\n"); + printf("\nUsage:\n"); + printf("\t tcptop adapter\n"); + printf("\t You can use \"WinDump -D\" if you don't know the name of your adapters.\n"); + + exit(0); } \ No newline at end of file diff --git a/libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.dsp b/libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsp similarity index 97% rename from libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.dsp rename to libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsp index ab7ee254..95d9fccb 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.dsp +++ b/libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsp @@ -1,110 +1,110 @@ -# Microsoft Developer Studio Project File - Name="tcptop" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=tcptop - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "tcptop.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "tcptop.mak" CFG="tcptop - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "tcptop - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "tcptop - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "tcptop - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c -# ADD BASE RSC /l 0x410 /d "NDEBUG" -# ADD RSC /l 0x410 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 - -!ELSEIF "$(CFG)" == "tcptop - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c -# ADD BASE RSC /l 0x410 /d "_DEBUG" -# ADD RSC /l 0x410 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept - -!ENDIF - -# Begin Target - -# Name "tcptop - Win32 Release" -# Name "tcptop - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\tcptop.c -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=..\..\include\pcap.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" -# End Group -# Begin Source File - -SOURCE=..\..\lib\Wpcap.lib -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="tcptop" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=tcptop - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "tcptop.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "tcptop.mak" CFG="tcptop - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "tcptop - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "tcptop - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "tcptop - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "tcptop - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../lbl/" /I "../../Include/" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_UNICODE" /D "WPCAP" /D "HAVE_REMOTE" /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "tcptop - Win32 Release" +# Name "tcptop - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\tcptop.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\include\pcap.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=..\..\lib\Wpcap.lib +# End Source File +# End Target +# End Project diff --git a/libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.dsw b/libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsw similarity index 94% rename from libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.dsw rename to libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsw index 4abe52e4..d680f734 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.dsw +++ b/libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.dsw @@ -1,29 +1,29 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "tcptop"=.\tcptop.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "tcptop"=.\tcptop.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.vcproj b/libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.vcproj similarity index 95% rename from libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.vcproj rename to libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.vcproj index 06f88c54..5143b4a2 100644 --- a/libs/WinPcap-413-173-b4/Examples-remote/tcptop/tcptop.vcproj +++ b/libs/WpdPack_4_1_2/Examples-remote/tcptop/tcptop.vcproj @@ -1,364 +1,364 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/WpdPack_4_1_2/Include/Packet32.h b/libs/WpdPack_4_1_2/Include/Packet32.h new file mode 100644 index 00000000..64be055d --- /dev/null +++ b/libs/WpdPack_4_1_2/Include/Packet32.h @@ -0,0 +1,359 @@ +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2007 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/** @ingroup packetapi + * @{ + */ + +/** @defgroup packet32h Packet.dll definitions and data structures + * Packet32.h contains the data structures and the definitions used by packet.dll. + * The file is used both by the Win9x and the WinNTx versions of packet.dll, and can be included + * by the applications that use the functions of this library + * @{ + */ + +#ifndef __PACKET32 +#define __PACKET32 + +#include + +#ifdef HAVE_AIRPCAP_API +#include +#else +#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) +#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ +typedef struct _AirpcapHandle *PAirpcapHandle; +#endif /* AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ */ +#endif /* HAVE_AIRPCAP_API */ + +#ifdef HAVE_DAG_API +#include +#endif /* HAVE_DAG_API */ + +// Working modes +#define PACKET_MODE_CAPT 0x0 ///< Capture mode +#define PACKET_MODE_STAT 0x1 ///< Statistical mode +#define PACKET_MODE_MON 0x2 ///< Monitoring mode +#define PACKET_MODE_DUMP 0x10 ///< Dump mode +#define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT ///< Statistical dump Mode + + +/// Alignment macro. Defines the alignment size. +#define Packet_ALIGNMENT sizeof(int) +/// Alignment macro. Rounds up to the next even multiple of Packet_ALIGNMENT. +#define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1)) + +#define NdisMediumNull -1 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumCHDLC -2 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumPPPSerial -3 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumBare80211 -4 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumRadio80211 -5 ///< Custom linktype: NDIS doesn't provide an equivalent +#define NdisMediumPpi -6 ///< Custom linktype: NDIS doesn't provide an equivalent + +// Loopback behaviour definitions +#define NPF_DISABLE_LOOPBACK 1 ///< Drop the packets sent by the NPF driver +#define NPF_ENABLE_LOOPBACK 2 ///< Capture the packets sent by the NPF driver + +/*! + \brief Network type structure. + + This structure is used by the PacketGetNetType() function to return information on the current adapter's type and speed. +*/ +typedef struct NetType +{ + UINT LinkType; ///< The MAC of the current network adapter (see function PacketGetNetType() for more information) + ULONGLONG LinkSpeed; ///< The speed of the network in bits per second +}NetType; + + +//some definitions stolen from libpcap + +#ifndef BPF_MAJOR_VERSION + +/*! + \brief A BPF pseudo-assembly program. + + The program will be injected in the kernel by the PacketSetBPF() function and applied to every incoming packet. +*/ +struct bpf_program +{ + UINT bf_len; ///< Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will follow. + struct bpf_insn *bf_insns; ///< A pointer to the first instruction of the program. +}; + +/*! + \brief A single BPF pseudo-instruction. + + bpf_insn contains a single instruction for the BPF register-machine. It is used to send a filter program to the driver. +*/ +struct bpf_insn +{ + USHORT code; ///< Instruction type and addressing mode. + UCHAR jt; ///< Jump if true + UCHAR jf; ///< Jump if false + int k; ///< Generic field used for various purposes. +}; + +/*! + \brief Structure that contains a couple of statistics values on the current capture. + + It is used by packet.dll to return statistics about a capture session. +*/ +struct bpf_stat +{ + UINT bs_recv; ///< Number of packets that the driver received from the network adapter + ///< from the beginning of the current capture. This value includes the packets + ///< lost by the driver. + UINT bs_drop; ///< number of packets that the driver lost from the beginning of a capture. + ///< Basically, a packet is lost when the the buffer of the driver is full. + ///< In this situation the packet cannot be stored and the driver rejects it. + UINT ps_ifdrop; ///< drops by interface. XXX not yet supported + UINT bs_capt; ///< number of packets that pass the filter, find place in the kernel buffer and + ///< thus reach the application. +}; + +/*! + \brief Packet header. + + This structure defines the header associated with every packet delivered to the application. +*/ +struct bpf_hdr +{ + struct timeval bh_tstamp; ///< The timestamp associated with the captured packet. + ///< It is stored in a TimeVal structure. + UINT bh_caplen; ///< Length of captured portion. The captured portion can be different + ///< from the original packet, because it is possible (with a proper filter) + ///< to instruct the driver to capture only a portion of the packets. + UINT bh_datalen; ///< Original length of packet + USHORT bh_hdrlen; ///< Length of bpf header (this struct plus alignment padding). In some cases, + ///< a padding could be added between the end of this structure and the packet + ///< data for performance reasons. This filed can be used to retrieve the actual data + ///< of the packet. +}; + +/*! + \brief Dump packet header. + + This structure defines the header associated with the packets in a buffer to be used with PacketSendPackets(). + It is simpler than the bpf_hdr, because it corresponds to the header associated by WinPcap and libpcap to a + packet in a dump file. This makes straightforward sending WinPcap dump files to the network. +*/ +struct dump_bpf_hdr{ + struct timeval ts; ///< Time stamp of the packet + UINT caplen; ///< Length of captured portion. The captured portion can smaller than the + ///< the original packet, because it is possible (with a proper filter) to + ///< instruct the driver to capture only a portion of the packets. + UINT len; ///< Length of the original packet (off wire). +}; + + +#endif + +struct bpf_stat; + +#define DOSNAMEPREFIX TEXT("Packet_") ///< Prefix added to the adapters device names to create the WinPcap devices +#define MAX_LINK_NAME_LENGTH 64 //< Maximum length of the devices symbolic links +#define NMAX_PACKET 65535 + +/*! + \brief Addresses of a network adapter. + + This structure is used by the PacketGetNetInfoEx() function to return the IP addresses associated with + an adapter. +*/ +typedef struct npf_if_addr { + struct sockaddr_storage IPAddress; ///< IP address. + struct sockaddr_storage SubnetMask; ///< Netmask for that address. + struct sockaddr_storage Broadcast; ///< Broadcast address. +}npf_if_addr; + + +#define ADAPTER_NAME_LENGTH 256 + 12 ///< Maximum length for the name of an adapter. The value is the same used by the IP Helper API. +#define ADAPTER_DESC_LENGTH 128 ///< Maximum length for the description of an adapter. The value is the same used by the IP Helper API. +#define MAX_MAC_ADDR_LENGTH 8 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. +#define MAX_NETWORK_ADDRESSES 16 ///< Maximum length for the link layer address of an adapter. The value is the same used by the IP Helper API. + + +typedef struct WAN_ADAPTER_INT WAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API +typedef WAN_ADAPTER *PWAN_ADAPTER; ///< Describes an opened wan (dialup, VPN...) network adapter using the NetMon API + +#define INFO_FLAG_NDIS_ADAPTER 0 ///< Flag for ADAPTER_INFO: this is a traditional ndis adapter +#define INFO_FLAG_NDISWAN_ADAPTER 1 ///< Flag for ADAPTER_INFO: this is a NdisWan adapter, and it's managed by WANPACKET +#define INFO_FLAG_DAG_CARD 2 ///< Flag for ADAPTER_INFO: this is a DAG card +#define INFO_FLAG_DAG_FILE 6 ///< Flag for ADAPTER_INFO: this is a DAG file +#define INFO_FLAG_DONT_EXPORT 8 ///< Flag for ADAPTER_INFO: when this flag is set, the adapter will not be listed or openend by winpcap. This allows to prevent exporting broken network adapters, like for example FireWire ones. +#define INFO_FLAG_AIRPCAP_CARD 16 ///< Flag for ADAPTER_INFO: this is an airpcap card +#define INFO_FLAG_NPFIM_DEVICE 32 + +/*! + \brief Describes an opened network adapter. + + This structure is the most important for the functioning of packet.dll, but the great part of its fields + should be ignored by the user, since the library offers functions that avoid to cope with low-level parameters +*/ +typedef struct _ADAPTER { + HANDLE hFile; ///< \internal Handle to an open instance of the NPF driver. + CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]; ///< \internal A string containing the name of the network adapter currently opened. + int NumWrites; ///< \internal Number of times a packets written on this adapter will be repeated + ///< on the wire. + HANDLE ReadEvent; ///< A notification event associated with the read calls on the adapter. + ///< It can be passed to standard Win32 functions (like WaitForSingleObject + ///< or WaitForMultipleObjects) to wait until the driver's buffer contains some + ///< data. It is particularly useful in GUI applications that need to wait + ///< concurrently on several events. In Windows NT/2000 the PacketSetMinToCopy() + ///< function can be used to define the minimum amount of data in the kernel buffer + ///< that will cause the event to be signalled. + + UINT ReadTimeOut; ///< \internal The amount of time after which a read on the driver will be released and + ///< ReadEvent will be signaled, also if no packets were captured + CHAR Name[ADAPTER_NAME_LENGTH]; + PWAN_ADAPTER pWanAdapter; + UINT Flags; ///< Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the dagc API. + +#ifdef HAVE_AIRPCAP_API + PAirpcapHandle AirpcapAd; +#endif // HAVE_AIRPCAP_API + +#ifdef HAVE_NPFIM_API + void* NpfImHandle; +#endif // HAVE_NPFIM_API + +#ifdef HAVE_DAG_API + dagc_t *pDagCard; ///< Pointer to the dagc API adapter descriptor for this adapter + PCHAR DagBuffer; ///< Pointer to the buffer with the packets that is received from the DAG card + struct timeval DagReadTimeout; ///< Read timeout. The dagc API requires a timeval structure + unsigned DagFcsLen; ///< Length of the frame check sequence attached to any packet by the card. Obtained from the registry + DWORD DagFastProcess; ///< True if the user requests fast capture processing on this card. Higher level applications can use this value to provide a faster but possibly unprecise capture (for example, libpcap doesn't convert the timestamps). +#endif // HAVE_DAG_API +} ADAPTER, *LPADAPTER; + +/*! + \brief Structure that contains a group of packets coming from the driver. + + This structure defines the header associated with every packet delivered to the application. +*/ +typedef struct _PACKET { + HANDLE hEvent; ///< \deprecated Still present for compatibility with old applications. + OVERLAPPED OverLapped; ///< \deprecated Still present for compatibility with old applications. + PVOID Buffer; ///< Buffer with containing the packets. See the PacketReceivePacket() for + ///< details about the organization of the data in this buffer + UINT Length; ///< Length of the buffer + DWORD ulBytesReceived; ///< Number of valid bytes present in the buffer, i.e. amount of data + ///< received by the last call to PacketReceivePacket() + BOOLEAN bIoComplete; ///< \deprecated Still present for compatibility with old applications. +} PACKET, *LPPACKET; + +/*! + \brief Structure containing an OID request. + + It is used by the PacketRequest() function to send an OID to the interface card driver. + It can be used, for example, to retrieve the status of the error counters on the adapter, its MAC address, + the list of the multicast groups defined on it, and so on. +*/ +struct _PACKET_OID_DATA { + ULONG Oid; ///< OID code. See the Microsoft DDK documentation or the file ntddndis.h + ///< for a complete list of valid codes. + ULONG Length; ///< Length of the data field + UCHAR Data[1]; ///< variable-lenght field that contains the information passed to or received + ///< from the adapter. +}; +typedef struct _PACKET_OID_DATA PACKET_OID_DATA, *PPACKET_OID_DATA; + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @} + */ + +/* +BOOLEAN QueryWinPcapRegistryStringA(CHAR *SubKeyName, + CHAR *Value, + UINT *pValueLen, + CHAR *DefaultVal); + +BOOLEAN QueryWinPcapRegistryStringW(WCHAR *SubKeyName, + WCHAR *Value, + UINT *pValueLen, + WCHAR *DefaultVal); +*/ + +//--------------------------------------------------------------------------- +// EXPORTED FUNCTIONS +//--------------------------------------------------------------------------- + +PCHAR PacketGetVersion(); +PCHAR PacketGetDriverVersion(); +BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject,int nbytes); +BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject,int nwrites); +BOOLEAN PacketSetMode(LPADAPTER AdapterObject,int mode); +BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject,int timeout); +BOOLEAN PacketSetBpf(LPADAPTER AdapterObject,struct bpf_program *fp); +BOOLEAN PacketSetLoopbackBehavior(LPADAPTER AdapterObject, UINT LoopbackBehavior); +INT PacketSetSnapLen(LPADAPTER AdapterObject,int snaplen); +BOOLEAN PacketGetStats(LPADAPTER AdapterObject,struct bpf_stat *s); +BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject,struct bpf_stat *s); +BOOLEAN PacketSetBuff(LPADAPTER AdapterObject,int dim); +BOOLEAN PacketGetNetType (LPADAPTER AdapterObject,NetType *type); +LPADAPTER PacketOpenAdapter(PCHAR AdapterName); +BOOLEAN PacketSendPacket(LPADAPTER AdapterObject,LPPACKET pPacket,BOOLEAN Sync); +INT PacketSendPackets(LPADAPTER AdapterObject,PVOID PacketBuff,ULONG Size, BOOLEAN Sync); +LPPACKET PacketAllocatePacket(void); +VOID PacketInitPacket(LPPACKET lpPacket,PVOID Buffer,UINT Length); +VOID PacketFreePacket(LPPACKET lpPacket); +BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject,LPPACKET lpPacket,BOOLEAN Sync); +BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject,ULONG Filter); +BOOLEAN PacketGetAdapterNames(PTSTR pStr,PULONG BufferSize); +BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr* buffer, PLONG NEntries); +BOOLEAN PacketRequest(LPADAPTER AdapterObject,BOOLEAN Set,PPACKET_OID_DATA OidData); +HANDLE PacketGetReadEvent(LPADAPTER AdapterObject); +BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len); +BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks); +BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync); +BOOL PacketStopDriver(); +VOID PacketCloseAdapter(LPADAPTER lpAdapter); +BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength); +BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags); +PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject); + +// +// Used by PacketStartOemEx +// +#define PACKET_START_OEM_NO_NETMON 0x00000001 + +#ifdef __cplusplus +} +#endif + +#endif //__PACKET32 diff --git a/libs/WinPcap-413-173-b4/Include/Win32-Extensions.h b/libs/WpdPack_4_1_2/Include/Win32-Extensions.h similarity index 94% rename from libs/WinPcap-413-173-b4/Include/Win32-Extensions.h rename to libs/WpdPack_4_1_2/Include/Win32-Extensions.h index b3c960e7..ad3be25c 100644 --- a/libs/WinPcap-413-173-b4/Include/Win32-Extensions.h +++ b/libs/WpdPack_4_1_2/Include/Win32-Extensions.h @@ -1,113 +1,113 @@ -/* - * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) - * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef __WIN32_EXTENSIONS_H__ -#define __WIN32_EXTENSIONS_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Definitions */ - -/*! - \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). -*/ -struct pcap_send_queue -{ - u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field. - u_int len; ///< Current size of the queue, in bytes. - char *buffer; ///< Buffer containing the packets to be sent. -}; - -typedef struct pcap_send_queue pcap_send_queue; - -/*! - \brief This typedef is a support for the pcap_get_airpcap_handle() function -*/ -#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) -#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ -typedef struct _AirpcapHandle *PAirpcapHandle; -#endif - -#define BPF_MEM_EX_IMM 0xc0 -#define BPF_MEM_EX_IND 0xe0 - -/*used for ST*/ -#define BPF_MEM_EX 0xc0 -#define BPF_TME 0x08 - -#define BPF_LOOKUP 0x90 -#define BPF_EXECUTE 0xa0 -#define BPF_INIT 0xb0 -#define BPF_VALIDATE 0xc0 -#define BPF_SET_ACTIVE 0xd0 -#define BPF_RESET 0xe0 -#define BPF_SET_MEMORY 0x80 -#define BPF_GET_REGISTER_VALUE 0x70 -#define BPF_SET_REGISTER_VALUE 0x60 -#define BPF_SET_WORKING 0x50 -#define BPF_SET_ACTIVE_READ 0x40 -#define BPF_SET_AUTODELETION 0x30 -#define BPF_SEPARATION 0xff - -/* Prototypes */ -pcap_send_queue* pcap_sendqueue_alloc(u_int memsize); - -void pcap_sendqueue_destroy(pcap_send_queue* queue); - -int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data); - -u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync); - -HANDLE pcap_getevent(pcap_t *p); - -struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size); - -int pcap_setuserbuffer(pcap_t *p, int size); - -int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks); - -int pcap_live_dump_ended(pcap_t *p, int sync); - -int pcap_offline_filter(const struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data); - -int pcap_start_oem(char* err_str, int flags); - -PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p); - -#ifdef __cplusplus -} -#endif - -#endif //__WIN32_EXTENSIONS_H__ +/* + * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy) + * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef __WIN32_EXTENSIONS_H__ +#define __WIN32_EXTENSIONS_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Definitions */ + +/*! + \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). +*/ +struct pcap_send_queue +{ + u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field. + u_int len; ///< Current size of the queue, in bytes. + char *buffer; ///< Buffer containing the packets to be sent. +}; + +typedef struct pcap_send_queue pcap_send_queue; + +/*! + \brief This typedef is a support for the pcap_get_airpcap_handle() function +*/ +#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_) +#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_ +typedef struct _AirpcapHandle *PAirpcapHandle; +#endif + +#define BPF_MEM_EX_IMM 0xc0 +#define BPF_MEM_EX_IND 0xe0 + +/*used for ST*/ +#define BPF_MEM_EX 0xc0 +#define BPF_TME 0x08 + +#define BPF_LOOKUP 0x90 +#define BPF_EXECUTE 0xa0 +#define BPF_INIT 0xb0 +#define BPF_VALIDATE 0xc0 +#define BPF_SET_ACTIVE 0xd0 +#define BPF_RESET 0xe0 +#define BPF_SET_MEMORY 0x80 +#define BPF_GET_REGISTER_VALUE 0x70 +#define BPF_SET_REGISTER_VALUE 0x60 +#define BPF_SET_WORKING 0x50 +#define BPF_SET_ACTIVE_READ 0x40 +#define BPF_SET_AUTODELETION 0x30 +#define BPF_SEPARATION 0xff + +/* Prototypes */ +pcap_send_queue* pcap_sendqueue_alloc(u_int memsize); + +void pcap_sendqueue_destroy(pcap_send_queue* queue); + +int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data); + +u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync); + +HANDLE pcap_getevent(pcap_t *p); + +struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size); + +int pcap_setuserbuffer(pcap_t *p, int size); + +int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks); + +int pcap_live_dump_ended(pcap_t *p, int sync); + +int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data); + +int pcap_start_oem(char* err_str, int flags); + +PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p); + +#ifdef __cplusplus +} +#endif + +#endif //__WIN32_EXTENSIONS_H__ diff --git a/libs/WinPcap-413-173-b4/Include/bittypes.h b/libs/WpdPack_4_1_2/Include/bittypes.h similarity index 69% rename from libs/WinPcap-413-173-b4/Include/bittypes.h rename to libs/WpdPack_4_1_2/Include/bittypes.h index 95aa9faa..558a0b5c 100644 --- a/libs/WinPcap-413-173-b4/Include/bittypes.h +++ b/libs/WpdPack_4_1_2/Include/bittypes.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -30,28 +30,76 @@ #define _BITTYPES_H #ifndef HAVE_U_INT8_T + +#if SIZEOF_CHAR == 1 typedef unsigned char u_int8_t; typedef signed char int8_t; +#elif SIZEOF_INT == 1 +typedef unsigned int u_int8_t; +typedef signed int int8_t; +#else /* XXX */ +#error "there's no appropriate type for u_int8_t" +#endif +#define HAVE_U_INT8_T 1 +#define HAVE_INT8_T 1 + #endif /* HAVE_U_INT8_T */ -#ifndef HAVE_U_INT16_T +#ifndef HAVE_U_INT16_T + +#if SIZEOF_SHORT == 2 typedef unsigned short u_int16_t; typedef signed short int16_t; +#elif SIZEOF_INT == 2 +typedef unsigned int u_int16_t; +typedef signed int int16_t; +#elif SIZEOF_CHAR == 2 +typedef unsigned char u_int16_t; +typedef signed char int16_t; +#else /* XXX */ +#error "there's no appropriate type for u_int16_t" +#endif +#define HAVE_U_INT16_T 1 +#define HAVE_INT16_T 1 + #endif /* HAVE_U_INT16_T */ #ifndef HAVE_U_INT32_T + +#if SIZEOF_INT == 4 typedef unsigned int u_int32_t; typedef signed int int32_t; +#elif SIZEOF_LONG == 4 +typedef unsigned long u_int32_t; +typedef signed long int32_t; +#elif SIZEOF_SHORT == 4 +typedef unsigned short u_int32_t; +typedef signed short int32_t; +#else /* XXX */ +#error "there's no appropriate type for u_int32_t" +#endif +#define HAVE_U_INT32_T 1 +#define HAVE_INT32_T 1 + #endif /* HAVE_U_INT32_T */ #ifndef HAVE_U_INT64_T -#ifdef _MSC_EXTENSIONS -typedef unsigned _int64 u_int64_t; -typedef _int64 int64_t; -#else /* _MSC_EXTENSIONS */ +#if SIZEOF_LONG_LONG == 8 typedef unsigned long long u_int64_t; typedef long long int64_t; -#endif /* _MSC_EXTENSIONS */ +#elif defined(_MSC_EXTENSIONS) +typedef unsigned _int64 u_int64_t; +typedef _int64 int64_t; +#elif SIZEOF_INT == 8 +typedef unsigned int u_int64_t; +#elif SIZEOF_LONG == 8 +typedef unsigned long u_int64_t; +#elif SIZEOF_SHORT == 8 +typedef unsigned short u_int64_t; +#else /* XXX */ +#error "there's no appropriate type for u_int64_t" +#endif + #endif /* HAVE_U_INT64_T */ #ifndef PRId64 diff --git a/libs/WinPcap-413-173-b4/Include/ip6_misc.h b/libs/WpdPack_4_1_2/Include/ip6_misc.h similarity index 97% rename from libs/WinPcap-413-173-b4/Include/ip6_misc.h rename to libs/WpdPack_4_1_2/Include/ip6_misc.h index 0b578c33..562fa618 100644 --- a/libs/WinPcap-413-173-b4/Include/ip6_misc.h +++ b/libs/WpdPack_4_1_2/Include/ip6_misc.h @@ -17,6 +17,8 @@ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL) */ /* diff --git a/libs/WinPcap-413-173-b4/Include/pcap-bpf.h b/libs/WpdPack_4_1_2/Include/pcap-bpf.h similarity index 95% rename from libs/WinPcap-413-173-b4/Include/pcap-bpf.h rename to libs/WpdPack_4_1_2/Include/pcap-bpf.h index ebb64c3f..5fe129db 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap-bpf.h +++ b/libs/WpdPack_4_1_2/Include/pcap-bpf.h @@ -4,7 +4,7 @@ * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence + * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without @@ -34,6 +34,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#) $Header: /tcpdump/master/libpcap/pcap-bpf.h,v 1.50 2007/04/01 21:43:55 guy Exp $ (LBL) */ /* diff --git a/libs/WinPcap-413-173-b4/Include/pcap-namedb.h b/libs/WpdPack_4_1_2/Include/pcap-namedb.h similarity index 95% rename from libs/WinPcap-413-173-b4/Include/pcap-namedb.h rename to libs/WpdPack_4_1_2/Include/pcap-namedb.h index d5908c92..80a2f004 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap-namedb.h +++ b/libs/WpdPack_4_1_2/Include/pcap-namedb.h @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#) $Header: /tcpdump/master/libpcap/pcap-namedb.h,v 1.13 2006/10/04 18:13:32 guy Exp $ (LBL) */ /* diff --git a/libs/WinPcap-413-173-b4/Include/pcap-stdinc.h b/libs/WpdPack_4_1_2/Include/pcap-stdinc.h similarity index 71% rename from libs/WinPcap-413-173-b4/Include/pcap-stdinc.h rename to libs/WpdPack_4_1_2/Include/pcap-stdinc.h index 85da39e1..41760417 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap-stdinc.h +++ b/libs/WpdPack_4_1_2/Include/pcap-stdinc.h @@ -27,51 +27,67 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * @(#) $Header: /tcpdump/master/libpcap/pcap-stdinc.h,v 1.10.2.1 2008-10-06 15:38:39 gianluca Exp $ (LBL) */ -#ifndef pcap_stdinc_h -#define pcap_stdinc_h + +#define SIZEOF_CHAR 1 +#define SIZEOF_SHORT 2 +#define SIZEOF_INT 4 +#ifndef _MSC_EXTENSIONS +#define SIZEOF_LONG_LONG 8 +#endif /* - * Avoids a compiler warning in case this was already defined + * Avoids a compiler warning in case this was already defined * (someone defined _WINSOCKAPI_ when including 'windows.h', in order * to prevent it from including 'winsock.h') */ #ifdef _WINSOCKAPI_ #undef _WINSOCKAPI_ #endif - #include + #include + +#include "bittypes.h" #include #include -#include "bittypes.h" +#ifndef __MINGW32__ #include "IP6_misc.h" +#endif #define caddr_t char* -#define inline __inline +#if _MSC_VER < 1500 +#define snprintf _snprintf +#define vsnprintf _vsnprintf +#define strdup _strdup +#endif + +#define inline __inline #ifdef __MINGW32__ - #include +#include +#else /*__MINGW32__*/ +/* MSVC compiler */ +#ifndef _UINTPTR_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 uintptr_t; +#else +typedef _W64 unsigned int uintptr_t; +#endif +#define _UINTPTR_T_DEFINED +#endif + +#ifndef _INTPTR_T_DEFINED +#ifdef _WIN64 +typedef __int64 intptr_t; #else - #ifndef _UINTPTR_T_DEFINED - #ifdef _WIN64 - typedef unsigned __int64 uintptr_t; - #else - typedef _W64 unsigned int uintptr_t; - #endif - #define _UINTPTR_T_DEFINED - #endif +typedef _W64 int intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif - #ifndef _INTPTR_T_DEFINED - #ifdef _WIN64 - typedef __int64 intptr_t; - #else - typedef _W64 int intptr_t; - #endif - #define _INTPTR_T_DEFINED - #endif #endif /*__MINGW32__*/ - -#endif /* pcap_stdinc_h */ diff --git a/libs/WinPcap-413-173-b4/Include/pcap.h b/libs/WpdPack_4_1_2/Include/pcap.h similarity index 95% rename from libs/WinPcap-413-173-b4/Include/pcap.h rename to libs/WpdPack_4_1_2/Include/pcap.h index 174e32d2..935f9494 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap.h +++ b/libs/WpdPack_4_1_2/Include/pcap.h @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.59 2006/10/04 18:09:22 guy Exp $ (LBL) */ /* diff --git a/libs/WinPcap-413-173-b4/Include/pcap/bluetooth.h b/libs/WpdPack_4_1_2/Include/pcap/bluetooth.h similarity index 85% rename from libs/WinPcap-413-173-b4/Include/pcap/bluetooth.h rename to libs/WpdPack_4_1_2/Include/pcap/bluetooth.h index 01bd5a2e..7bf65df0 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap/bluetooth.h +++ b/libs/WpdPack_4_1_2/Include/pcap/bluetooth.h @@ -11,8 +11,8 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS @@ -29,27 +29,20 @@ * * bluetooth data struct * By Paolo Abeni + * + * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007/09/22 02:10:17 guy Exp $ */ - + #ifndef _PCAP_BLUETOOTH_STRUCTS_H__ #define _PCAP_BLUETOOTH_STRUCTS_H__ /* - * Header prepended libpcap to each bluetooth h4 frame, + * Header prepended libpcap to each bluetooth h:4 frame. * fields are in network byte order */ typedef struct _pcap_bluetooth_h4_header { u_int32_t direction; /* if first bit is set direction is incoming */ } pcap_bluetooth_h4_header; -/* - * Header prepended libpcap to each bluetooth linux monitor frame, - * fields are in network byte order - */ -typedef struct _pcap_bluetooth_linux_monitor_header { - u_int16_t adapter_id; - u_int16_t opcode; -} pcap_bluetooth_linux_monitor_header; - #endif diff --git a/libs/WinPcap-413-173-b4/Include/pcap/bpf.h b/libs/WpdPack_4_1_2/Include/pcap/bpf.h similarity index 57% rename from libs/WinPcap-413-173-b4/Include/pcap/bpf.h rename to libs/WpdPack_4_1_2/Include/pcap/bpf.h index 215d5ca0..9f4ca33e 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap/bpf.h +++ b/libs/WpdPack_4_1_2/Include/pcap/bpf.h @@ -4,7 +4,7 @@ * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed - * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence + * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * * Redistribution and use in source and binary forms, with or without @@ -36,6 +36,8 @@ * SUCH DAMAGE. * * @(#)bpf.h 7.1 (Berkeley) 5/7/91 + * + * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.19.2.8 2008-09-22 20:16:01 guy Exp $ (LBL) */ /* @@ -46,31 +48,10 @@ * "pcap-bpf.c" will include the native OS version, as it deals with * the OS's BPF implementation. * - * At least two programs found by Google Code Search explicitly includes - * (even though / includes it for you), - * so moving that stuff to would break the build for some - * programs. + * XXX - should this all just be moved to "pcap.h"? */ -/* - * If we've already included , don't re-define this stuff. - * We assume BSD-style multiple-include protection in , - * which is true of all but the oldest versions of FreeBSD and NetBSD, - * or Tru64 UNIX-style multiple-include protection (or, at least, - * Tru64 UNIX 5.x-style; I don't have earlier versions available to check), - * or AIX-style multiple-include protection (or, at least, AIX 5.x-style; - * I don't have earlier versions available to check), or QNX-style - * multiple-include protection (as per GitHub pull request #394). - * - * We do not check for BPF_MAJOR_VERSION, as that's defined by - * , which is directly or indirectly included in some - * programs that also include pcap.h, and doesn't - * define stuff we need. - * - * This also provides our own multiple-include protection. - */ -#if !defined(_NET_BPF_H_) && !defined(_NET_BPF_H_INCLUDED) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h) -#define lib_pcap_bpf_h +#ifndef BPF_MAJOR_VERSION #ifdef __cplusplus extern "C" { @@ -88,10 +69,8 @@ typedef u_int bpf_u_int32; #endif /* - * Alignment macros. BPF_WORDALIGN rounds up to the next - * even multiple of BPF_ALIGNMENT. - * - * Tcpdump's print-pflog.c uses this, so we define it here. + * Alignment macros. BPF_WORDALIGN rounds up to the next + * even multiple of BPF_ALIGNMENT. */ #ifndef __NetBSD__ #define BPF_ALIGNMENT sizeof(bpf_int32) @@ -100,6 +79,9 @@ typedef u_int bpf_u_int32; #endif #define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1)) +#define BPF_MAXBUFSIZE 0x8000 +#define BPF_MINBUFSIZE 32 + /* * Structure for "pcap_compile()", "pcap_setfilter()", etc.. */ @@ -107,9 +89,28 @@ struct bpf_program { u_int bf_len; struct bpf_insn *bf_insns; }; + +/* + * Struct return by BIOCVERSION. This represents the version number of + * the filter language described by the instruction encodings below. + * bpf understands a program iff kernel_major == filter_major && + * kernel_minor >= filter_minor, that is, if the value returned by the + * running kernel has the same major number and a minor number equal + * equal to or less than the filter being downloaded. Otherwise, the + * results are undefined, meaning an error may be returned or packets + * may be accepted haphazardly. + * It has nothing to do with the source code version. + */ +struct bpf_version { + u_short bv_major; + u_short bv_minor; +}; +/* Current version number of filter architecture. */ +#define BPF_MAJOR_VERSION 1 +#define BPF_MINOR_VERSION 1 /* - * Link-layer header type codes. + * Data-link level type codes. * * Do *NOT* add new values to this list without asking * "tcpdump-workers@lists.tcpdump.org" for a value. Otherwise, you run @@ -118,12 +119,6 @@ struct bpf_program { * being able to handle captures with your new DLT_ value, with no hope * that they will ever be changed to do so (as that would destroy their * ability to read captures using that value for that other purpose). - * - * See - * - * http://www.tcpdump.org/linktypes.html - * - * for detailed descriptions of some of these link-layer header types. */ /* @@ -176,37 +171,11 @@ struct bpf_program { #endif /* - * 17 was used for DLT_PFLOG in OpenBSD; it no longer is. - * - * It was DLT_LANE8023 in SuSE 6.3, so we defined LINKTYPE_PFLOG - * as 117 so that pflog captures would use a link-layer header type - * value that didn't collide with any other values. On all - * platforms other than OpenBSD, we defined DLT_PFLOG as 117, - * and we mapped between LINKTYPE_PFLOG and DLT_PFLOG. - * - * OpenBSD eventually switched to using 117 for DLT_PFLOG as well. - * - * Don't use 17 for anything else. + * 17 is used for DLT_OLD_PFLOG in OpenBSD; + * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below. + * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else. */ -/* - * 18 is used for DLT_PFSYNC in OpenBSD, NetBSD, DragonFly BSD and - * Mac OS X; don't use it for anything else. (FreeBSD uses 121, - * which collides with DLT_HHDLC, even though it doesn't use 18 - * for anything and doesn't appear to have ever used it for anything.) - * - * We define it as 18 on those platforms; it is, unfortunately, used - * for DLT_CIP in Suse 6.3, so we don't define it as DLT_PFSYNC - * in general. As the packet format for it, like that for - * DLT_PFLOG, is not only OS-dependent but OS-version-dependent, - * we don't support printing it in tcpdump except on OSes that - * have the relevant header files, so it's not that useful on - * other platforms. - */ -#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__APPLE__) -#define DLT_PFSYNC 18 -#endif - #define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */ /* @@ -234,22 +203,9 @@ struct bpf_program { /* * Values between 100 and 103 are used in capture file headers as - * link-layer header type LINKTYPE_ values corresponding to DLT_ types - * that differ between platforms; don't use those values for new DLT_ - * new types. - */ - -/* - * Values starting with 104 are used for newly-assigned link-layer - * header type values; for those link-layer header types, the DLT_ - * value returned by pcap_datalink() and passed to pcap_open_dead(), - * and the LINKTYPE_ value that appears in capture files, are the - * same. - * - * DLT_MATCHING_MIN is the lowest such value; DLT_MATCHING_MAX is - * the highest such value. + * link-layer types corresponding to DLT_ types that differ + * between platforms; don't use those values for new DLT_ new types. */ -#define DLT_MATCHING_MIN 104 /* * This value was defined by libpcap 0.5; platforms that have defined @@ -337,8 +293,15 @@ struct bpf_program { #define DLT_IPFILTER 116 /* - * OpenBSD DLT_PFLOG. + * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023 + * in SuSE 6.3, so we can't use 17 for it in capture-file headers. + * + * XXX: is there a conflict with DLT_PFSYNC 18 as well? */ +#ifdef __OpenBSD__ +#define DLT_OLD_PFLOG 17 +#define DLT_PFSYNC 18 +#endif #define DLT_PFLOG 117 /* @@ -360,48 +323,9 @@ struct bpf_program { #define DLT_AIRONET_HEADER 120 /* - * Sigh. - * - * This was reserved for Siemens HiPath HDLC on 2002-01-25, as - * requested by Tomas Kukosa. - * - * On 2004-02-25, a FreeBSD checkin to sys/net/bpf.h was made that - * assigned 121 as DLT_PFSYNC. Its libpcap does DLT_ <-> LINKTYPE_ - * mapping, so it probably supports capturing on the pfsync device - * but not saving the captured data to a pcap file. - * - * OpenBSD, from which pf came, however, uses 18 for DLT_PFSYNC; - * their libpcap does no DLT_ <-> LINKTYPE_ mapping, so it would - * use 18 in pcap files as well. - * - * NetBSD and DragonFly BSD also use 18 for DLT_PFSYNC; their - * libpcaps do DLT_ <-> LINKTYPE_ mapping, and neither has an entry - * for DLT_PFSYNC, so it might not be able to write out dump files - * with 18 as the link-layer header type. (Earlier versions might - * not have done mapping, in which case they'd work the same way - * OpenBSD does.) - * - * Mac OS X defines it as 18, but doesn't appear to use it as of - * Mac OS X 10.7.3. Its libpcap does DLT_ <-> LINKTYPE_ mapping. - * - * We'll define DLT_PFSYNC as 121 on FreeBSD and define it as 18 on - * all other platforms. We'll define DLT_HHDLC as 121 on everything - * except for FreeBSD; anybody who wants to compile, on FreeBSD, code - * that uses DLT_HHDLC is out of luck. - * - * We'll define LINKTYPE_PFSYNC as 18, *even on FreeBSD*, and map - * it, so that savefiles won't use 121 for PFSYNC - they'll all - * use 18. Code that uses pcap_datalink() to determine the link-layer - * header type of a savefile won't, when built and run on FreeBSD, - * be able to distinguish between LINKTYPE_PFSYNC and LINKTYPE_HHDLC - * capture files; code that doesn't, such as the code in Wireshark, - * will be able to distinguish between them. - */ -#ifdef __FreeBSD__ -#define DLT_PFSYNC 121 -#else + * Reserved for Siemens HiPath HDLC. + */ #define DLT_HHDLC 121 -#endif /* * This is for RFC 2625 IP-over-Fibre Channel. @@ -429,7 +353,7 @@ struct bpf_program { */ #define DLT_SUNATM 123 /* Solaris+SunATM */ -/* +/* * Reserved as per request from Kent Dahlgren * for private use. */ @@ -599,7 +523,7 @@ struct bpf_program { #define DLT_JUNIPER_MONITOR 164 /* - * BACnet MS/TP frames. + * Reserved for BACnet MS/TP. */ #define DLT_BACNET_MS_TP 165 @@ -672,7 +596,7 @@ struct bpf_program { /* * Juniper-private data link type, as per request from - * Hannes Gredler . + * Hannes Gredler . * The DLT_ are used for prepending meta-information * like interface index, interface name * before standard Ethernet, PPP, Frelay & C-HDLC Frames @@ -689,7 +613,7 @@ struct bpf_program { /* * Juniper-private data link type, as per request from - * Hannes Gredler . + * Hannes Gredler . * The DLT_ is used for internal communication with a * voice Adapter Card (PIC) */ @@ -764,7 +688,7 @@ struct bpf_program { /* * Juniper-private data link type, as per request from - * Hannes Gredler . + * Hannes Gredler . * The DLT_ is used for internal communication with a * integrated service module (ISM). */ @@ -773,8 +697,6 @@ struct bpf_program { /* * IEEE 802.15.4, exactly as it appears in the spec (no padding, no * nothing); requested by Mikko Saarnivala . - * For this one, we expect the FCS to be present at the end of the frame; - * if the frame has no FCS, DLT_IEEE802_15_4_NOFCS should be used. */ #define DLT_IEEE802_15_4 195 @@ -807,7 +729,7 @@ struct bpf_program { /* * Juniper-private data link type, as per request from - * Hannes Gredler . + * Hannes Gredler . * The DLT_ is used for capturing data on a secure tunnel interface. */ #define DLT_JUNIPER_ST 200 @@ -899,432 +821,6 @@ struct bpf_program { */ #define DLT_IEEE802_15_4_NONASK_PHY 215 -/* - * David Gibson requested this for - * captures from the Linux kernel /dev/input/eventN devices. This - * is used to communicate keystrokes and mouse movements from the - * Linux kernel to display systems, such as Xorg. - */ -#define DLT_LINUX_EVDEV 216 - -/* - * GSM Um and Abis interfaces, preceded by a "gsmtap" header. - * - * Requested by Harald Welte . - */ -#define DLT_GSMTAP_UM 217 -#define DLT_GSMTAP_ABIS 218 - -/* - * MPLS, with an MPLS label as the link-layer header. - * Requested by Michele Marchetto on behalf - * of OpenBSD. - */ -#define DLT_MPLS 219 - -/* - * USB packets, beginning with a Linux USB header, with the USB header - * padded to 64 bytes; required for memory-mapped access. - */ -#define DLT_USB_LINUX_MMAPPED 220 - -/* - * DECT packets, with a pseudo-header; requested by - * Matthias Wenzel . - */ -#define DLT_DECT 221 - -/* - * From: "Lidwa, Eric (GSFC-582.0)[SGT INC]" - * Date: Mon, 11 May 2009 11:18:30 -0500 - * - * DLT_AOS. We need it for AOS Space Data Link Protocol. - * I have already written dissectors for but need an OK from - * legal before I can submit a patch. - * - */ -#define DLT_AOS 222 - -/* - * Wireless HART (Highway Addressable Remote Transducer) - * From the HART Communication Foundation - * IES/PAS 62591 - * - * Requested by Sam Roberts . - */ -#define DLT_WIHART 223 - -/* - * Fibre Channel FC-2 frames, beginning with a Frame_Header. - * Requested by Kahou Lei . - */ -#define DLT_FC_2 224 - -/* - * Fibre Channel FC-2 frames, beginning with an encoding of the - * SOF, and ending with an encoding of the EOF. - * - * The encodings represent the frame delimiters as 4-byte sequences - * representing the corresponding ordered sets, with K28.5 - * represented as 0xBC, and the D symbols as the corresponding - * byte values; for example, SOFi2, which is K28.5 - D21.5 - D1.2 - D21.2, - * is represented as 0xBC 0xB5 0x55 0x55. - * - * Requested by Kahou Lei . - */ -#define DLT_FC_2_WITH_FRAME_DELIMS 225 - -/* - * Solaris ipnet pseudo-header; requested by Darren Reed . - * - * The pseudo-header starts with a one-byte version number; for version 2, - * the pseudo-header is: - * - * struct dl_ipnetinfo { - * u_int8_t dli_version; - * u_int8_t dli_family; - * u_int16_t dli_htype; - * u_int32_t dli_pktlen; - * u_int32_t dli_ifindex; - * u_int32_t dli_grifindex; - * u_int32_t dli_zsrc; - * u_int32_t dli_zdst; - * }; - * - * dli_version is 2 for the current version of the pseudo-header. - * - * dli_family is a Solaris address family value, so it's 2 for IPv4 - * and 26 for IPv6. - * - * dli_htype is a "hook type" - 0 for incoming packets, 1 for outgoing - * packets, and 2 for packets arriving from another zone on the same - * machine. - * - * dli_pktlen is the length of the packet data following the pseudo-header - * (so the captured length minus dli_pktlen is the length of the - * pseudo-header, assuming the entire pseudo-header was captured). - * - * dli_ifindex is the interface index of the interface on which the - * packet arrived. - * - * dli_grifindex is the group interface index number (for IPMP interfaces). - * - * dli_zsrc is the zone identifier for the source of the packet. - * - * dli_zdst is the zone identifier for the destination of the packet. - * - * A zone number of 0 is the global zone; a zone number of 0xffffffff - * means that the packet arrived from another host on the network, not - * from another zone on the same machine. - * - * An IPv4 or IPv6 datagram follows the pseudo-header; dli_family indicates - * which of those it is. - */ -#define DLT_IPNET 226 - -/* - * CAN (Controller Area Network) frames, with a pseudo-header as supplied - * by Linux SocketCAN. See Documentation/networking/can.txt in the Linux - * source. - * - * Requested by Felix Obenhuber . - */ -#define DLT_CAN_SOCKETCAN 227 - -/* - * Raw IPv4/IPv6; different from DLT_RAW in that the DLT_ value specifies - * whether it's v4 or v6. Requested by Darren Reed . - */ -#define DLT_IPV4 228 -#define DLT_IPV6 229 - -/* - * IEEE 802.15.4, exactly as it appears in the spec (no padding, no - * nothing), and with no FCS at the end of the frame; requested by - * Jon Smirl . - */ -#define DLT_IEEE802_15_4_NOFCS 230 - -/* - * Raw D-Bus: - * - * http://www.freedesktop.org/wiki/Software/dbus - * - * messages: - * - * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-messages - * - * starting with the endianness flag, followed by the message type, etc., - * but without the authentication handshake before the message sequence: - * - * http://dbus.freedesktop.org/doc/dbus-specification.html#auth-protocol - * - * Requested by Martin Vidner . - */ -#define DLT_DBUS 231 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - */ -#define DLT_JUNIPER_VS 232 -#define DLT_JUNIPER_SRX_E2E 233 -#define DLT_JUNIPER_FIBRECHANNEL 234 - -/* - * DVB-CI (DVB Common Interface for communication between a PC Card - * module and a DVB receiver). See - * - * http://www.kaiser.cx/pcap-dvbci.html - * - * for the specification. - * - * Requested by Martin Kaiser . - */ -#define DLT_DVB_CI 235 - -/* - * Variant of 3GPP TS 27.010 multiplexing protocol (similar to, but - * *not* the same as, 27.010). Requested by Hans-Christoph Schemmel - * . - */ -#define DLT_MUX27010 236 - -/* - * STANAG 5066 D_PDUs. Requested by M. Baris Demiray - * . - */ -#define DLT_STANAG_5066_D_PDU 237 - -/* - * Juniper-private data link type, as per request from - * Hannes Gredler . - */ -#define DLT_JUNIPER_ATM_CEMIC 238 - -/* - * NetFilter LOG messages - * (payload of netlink NFNL_SUBSYS_ULOG/NFULNL_MSG_PACKET packets) - * - * Requested by Jakub Zawadzki - */ -#define DLT_NFLOG 239 - -/* - * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type - * for Ethernet packets with a 4-byte pseudo-header and always - * with the payload including the FCS, as supplied by their - * netANALYZER hardware and software. - * - * Requested by Holger P. Frommer - */ -#define DLT_NETANALYZER 240 - -/* - * Hilscher Gesellschaft fuer Systemautomation mbH link-layer type - * for Ethernet packets with a 4-byte pseudo-header and FCS and - * with the Ethernet header preceded by 7 bytes of preamble and - * 1 byte of SFD, as supplied by their netANALYZER hardware and - * software. - * - * Requested by Holger P. Frommer - */ -#define DLT_NETANALYZER_TRANSPARENT 241 - -/* - * IP-over-InfiniBand, as specified by RFC 4391. - * - * Requested by Petr Sumbera . - */ -#define DLT_IPOIB 242 - -/* - * MPEG-2 transport stream (ISO 13818-1/ITU-T H.222.0). - * - * Requested by Guy Martin . - */ -#define DLT_MPEG_2_TS 243 - -/* - * ng4T GmbH's UMTS Iub/Iur-over-ATM and Iub/Iur-over-IP format as - * used by their ng40 protocol tester. - * - * Requested by Jens Grimmer . - */ -#define DLT_NG40 244 - -/* - * Pseudo-header giving adapter number and flags, followed by an NFC - * (Near-Field Communications) Logical Link Control Protocol (LLCP) PDU, - * as specified by NFC Forum Logical Link Control Protocol Technical - * Specification LLCP 1.1. - * - * Requested by Mike Wakerly . - */ -#define DLT_NFC_LLCP 245 - -/* - * 245 is used as LINKTYPE_PFSYNC; do not use it for any other purpose. - * - * DLT_PFSYNC has different values on different platforms, and all of - * them collide with something used elsewhere. On platforms that - * don't already define it, define it as 245. - */ -#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__APPLE__) -#define DLT_PFSYNC 246 -#endif - -/* - * Raw InfiniBand packets, starting with the Local Routing Header. - * - * Requested by Oren Kladnitsky . - */ -#define DLT_INFINIBAND 247 - -/* - * SCTP, with no lower-level protocols (i.e., no IPv4 or IPv6). - * - * Requested by Michael Tuexen . - */ -#define DLT_SCTP 248 - -/* - * USB packets, beginning with a USBPcap header. - * - * Requested by Tomasz Mon - */ -#define DLT_USBPCAP 249 - -/* - * Schweitzer Engineering Laboratories "RTAC" product serial-line - * packets. - * - * Requested by Chris Bontje . - */ -#define DLT_RTAC_SERIAL 250 - -/* - * Bluetooth Low Energy air interface link-layer packets. - * - * Requested by Mike Kershaw . - */ -#define DLT_BLUETOOTH_LE_LL 251 - -/* - * DLT type for upper-protocol layer PDU saves from wireshark. - * - * the actual contents are determined by two TAGs stored with each - * packet: - * EXP_PDU_TAG_LINKTYPE the link type (LINKTYPE_ value) of the - * original packet. - * - * EXP_PDU_TAG_PROTO_NAME the name of the wireshark dissector - * that can make sense of the data stored. - */ -#define DLT_WIRESHARK_UPPER_PDU 252 - -/* - * DLT type for the netlink protocol (nlmon devices). - */ -#define DLT_NETLINK 253 - -/* - * Bluetooth Linux Monitor headers for the BlueZ stack. - */ -#define DLT_BLUETOOTH_LINUX_MONITOR 254 - -/* - * Bluetooth Basic Rate/Enhanced Data Rate baseband packets, as - * captured by Ubertooth. - */ -#define DLT_BLUETOOTH_BREDR_BB 255 - -/* - * Bluetooth Low Energy link layer packets, as captured by Ubertooth. - */ -#define DLT_BLUETOOTH_LE_LL_WITH_PHDR 256 - -/* - * PROFIBUS data link layer. - */ -#define DLT_PROFIBUS_DL 257 - -/* - * Apple's DLT_PKTAP headers. - * - * Sadly, the folks at Apple either had no clue that the DLT_USERn values - * are for internal use within an organization and partners only, and - * didn't know that the right way to get a link-layer header type is to - * ask tcpdump.org for one, or knew and didn't care, so they just - * used DLT_USER2, which causes problems for everything except for - * their version of tcpdump. - * - * So I'll just give them one; hopefully this will show up in a - * libpcap release in time for them to get this into 10.10 Big Sur - * or whatever Mavericks' successor is called. LINKTYPE_PKTAP - * will be 258 *even on OS X*; that is *intentional*, so that - * PKTAP files look the same on *all* OSes (different OSes can have - * different numerical values for a given DLT_, but *MUST NOT* have - * different values for what goes in a file, as files can be moved - * between OSes!). - * - * When capturing, on a system with a Darwin-based OS, on a device - * that returns 149 (DLT_USER2 and Apple's DLT_PKTAP) with this - * version of libpcap, the DLT_ value for the pcap_t will be DLT_PKTAP, - * and that will continue to be DLT_USER2 on Darwin-based OSes. That way, - * binary compatibility with Mavericks is preserved for programs using - * this version of libpcap. This does mean that if you were using - * DLT_USER2 for some capture device on OS X, you can't do so with - * this version of libpcap, just as you can't with Apple's libpcap - - * on OS X, they define DLT_PKTAP to be DLT_USER2, so programs won't - * be able to distinguish between PKTAP and whatever you were using - * DLT_USER2 for. - * - * If the program saves the capture to a file using this version of - * libpcap's pcap_dump code, the LINKTYPE_ value in the file will be - * LINKTYPE_PKTAP, which will be 258, even on Darwin-based OSes. - * That way, the file will *not* be a DLT_USER2 file. That means - * that the latest version of tcpdump, when built with this version - * of libpcap, and sufficiently recent versions of Wireshark will - * be able to read those files and interpret them correctly; however, - * Apple's version of tcpdump in OS X 10.9 won't be able to handle - * them. (Hopefully, Apple will pick up this version of libpcap, - * and the corresponding version of tcpdump, so that tcpdump will - * be able to handle the old LINKTYPE_USER2 captures *and* the new - * LINKTYPE_PKTAP captures.) - */ -#ifdef __APPLE__ -#define DLT_PKTAP DLT_USER2 -#else -#define DLT_PKTAP 258 -#endif - -/* - * Ethernet packets preceded by a header giving the last 6 octets - * of the preamble specified by 802.3-2012 Clause 65, section - * 65.1.3.2 "Transmit". - */ -#define DLT_EPON 259 - -/* - * IPMI trace packets, as specified by Table 3-20 "Trace Data Block Format" - * in the PICMG HPM.2 specification. - */ -#define DLT_IPMI_HPM_2 260 - -/* - * per Joshua Wright , formats for Zwave captures. - */ -#define DLT_ZWAVE_R1_R2 261 -#define DLT_ZWAVE_R3 262 - -/* - * per Steve Karg , formats for Wattstopper - * Digital Lighting Management room bus serial protocol captures. - */ -#define DLT_WATTSTOPPER_DLM 263 - -#define DLT_MATCHING_MAX 263 /* highest value in the "matching" range */ /* * DLT and savefile link type values are split into a class and @@ -1348,17 +844,7 @@ struct bpf_program { /* * The instruction encodings. - * - * Please inform tcpdump-workers@lists.tcpdump.org if you use any - * of the reserved values, so that we can note that they're used - * (and perhaps implement it in the reference BPF implementation - * and encourage its implementation elsewhere). */ - -/* - * The upper 8 bits of the opcode aren't used. BSD/OS used 0x8000. - */ - /* instruction classes */ #define BPF_CLASS(code) ((code) & 0x07) #define BPF_LD 0x00 @@ -1375,7 +861,6 @@ struct bpf_program { #define BPF_W 0x00 #define BPF_H 0x08 #define BPF_B 0x10 -/* 0x18 reserved; used by BSD/OS */ #define BPF_MODE(code) ((code) & 0xe0) #define BPF_IMM 0x00 #define BPF_ABS 0x20 @@ -1383,8 +868,6 @@ struct bpf_program { #define BPF_MEM 0x60 #define BPF_LEN 0x80 #define BPF_MSH 0xa0 -/* 0xc0 reserved; used by BSD/OS */ -/* 0xe0 reserved; used by BSD/OS */ /* alu/jmp fields */ #define BPF_OP(code) ((code) & 0xf0) @@ -1397,30 +880,11 @@ struct bpf_program { #define BPF_LSH 0x60 #define BPF_RSH 0x70 #define BPF_NEG 0x80 -#define BPF_MOD 0x90 -#define BPF_XOR 0xa0 -/* 0xb0 reserved */ -/* 0xc0 reserved */ -/* 0xd0 reserved */ -/* 0xe0 reserved */ -/* 0xf0 reserved */ - #define BPF_JA 0x00 #define BPF_JEQ 0x10 #define BPF_JGT 0x20 #define BPF_JGE 0x30 #define BPF_JSET 0x40 -/* 0x50 reserved; used on BSD/OS */ -/* 0x60 reserved */ -/* 0x70 reserved */ -/* 0x80 reserved */ -/* 0x90 reserved */ -/* 0xa0 reserved */ -/* 0xb0 reserved */ -/* 0xc0 reserved */ -/* 0xd0 reserved */ -/* 0xe0 reserved */ -/* 0xf0 reserved */ #define BPF_SRC(code) ((code) & 0x08) #define BPF_K 0x00 #define BPF_X 0x08 @@ -1428,43 +892,11 @@ struct bpf_program { /* ret - BPF_K and BPF_X also apply */ #define BPF_RVAL(code) ((code) & 0x18) #define BPF_A 0x10 -/* 0x18 reserved */ /* misc */ #define BPF_MISCOP(code) ((code) & 0xf8) #define BPF_TAX 0x00 -/* 0x08 reserved */ -/* 0x10 reserved */ -/* 0x18 reserved */ -/* #define BPF_COP 0x20 NetBSD "coprocessor" extensions */ -/* 0x28 reserved */ -/* 0x30 reserved */ -/* 0x38 reserved */ -/* #define BPF_COPX 0x40 NetBSD "coprocessor" extensions */ -/* also used on BSD/OS */ -/* 0x48 reserved */ -/* 0x50 reserved */ -/* 0x58 reserved */ -/* 0x60 reserved */ -/* 0x68 reserved */ -/* 0x70 reserved */ -/* 0x78 reserved */ #define BPF_TXA 0x80 -/* 0x88 reserved */ -/* 0x90 reserved */ -/* 0x98 reserved */ -/* 0xa0 reserved */ -/* 0xa8 reserved */ -/* 0xb0 reserved */ -/* 0xb8 reserved */ -/* 0xc0 reserved; used on BSD/OS */ -/* 0xc8 reserved */ -/* 0xd0 reserved */ -/* 0xd8 reserved */ -/* 0xe0 reserved */ -/* 0xe8 reserved */ -/* 0xf0 reserved */ -/* 0xf8 reserved */ /* * The instruction data structure. @@ -1476,16 +908,6 @@ struct bpf_insn { bpf_u_int32 k; }; -/* - * Auxiliary data, for use when interpreting a filter intended for the - * Linux kernel when the kernel rejects the filter (requiring us to - * run it in userland). It contains VLAN tag information. - */ -struct bpf_aux_data { - u_short vlan_tag_present; - u_short vlan_tag; -}; - /* * Macros for insn array initializers. */ @@ -1495,11 +917,9 @@ struct bpf_aux_data { #if __STDC__ || defined(__cplusplus) extern int bpf_validate(const struct bpf_insn *, int); extern u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); -extern u_int bpf_filter_with_aux_data(const struct bpf_insn *, const u_char *, u_int, u_int, const struct bpf_aux_data *); #else extern int bpf_validate(); extern u_int bpf_filter(); -extern u_int bpf_filter(); #endif /* @@ -1511,4 +931,4 @@ extern u_int bpf_filter(); } #endif -#endif /* !defined(_NET_BPF_H_) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h) */ +#endif diff --git a/libs/WinPcap-413-173-b4/Include/pcap/namedb.h b/libs/WpdPack_4_1_2/Include/pcap/namedb.h similarity index 97% rename from libs/WinPcap-413-173-b4/Include/pcap/namedb.h rename to libs/WpdPack_4_1_2/Include/pcap/namedb.h index d3a34322..9002c750 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap/namedb.h +++ b/libs/WpdPack_4_1_2/Include/pcap/namedb.h @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#) $Header: /tcpdump/master/libpcap/pcap/namedb.h,v 1.1 2006/10/04 18:09:22 guy Exp $ (LBL) */ #ifndef lib_pcap_namedb_h diff --git a/libs/WpdPack_4_1_2/Include/pcap/pcap.h b/libs/WpdPack_4_1_2/Include/pcap/pcap.h new file mode 100644 index 00000000..ad8fc40a --- /dev/null +++ b/libs/WpdPack_4_1_2/Include/pcap/pcap.h @@ -0,0 +1,407 @@ +/* -*- Mode: c; tab-width: 8; indent-tabs-mode: 1; c-basic-offset: 8; -*- */ +/* + * Copyright (c) 1993, 1994, 1995, 1996, 1997 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the Computer Systems + * Engineering Group at Lawrence Berkeley Laboratory. + * 4. Neither the name of the University nor of the Laboratory may be used + * to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#) $Header: /tcpdump/master/libpcap/pcap/pcap.h,v 1.4.2.11 2008-10-06 15:38:39 gianluca Exp $ (LBL) + */ + +#ifndef lib_pcap_pcap_h +#define lib_pcap_pcap_h + +#if defined(WIN32) + #include +#elif defined(MSDOS) + #include + #include /* u_int, u_char etc. */ +#else /* UN*X */ + #include + #include +#endif /* WIN32/MSDOS/UN*X */ + +#ifndef PCAP_DONT_INCLUDE_PCAP_BPF_H +#include +#endif + +#include + +#ifdef HAVE_REMOTE + // We have to define the SOCKET here, although it has been defined in sockutils.h + // This is to avoid the distribution of the 'sockutils.h' file around + // (for example in the WinPcap developer's pack) + #ifndef SOCKET + #ifdef WIN32 + #define SOCKET unsigned int + #else + #define SOCKET int + #endif + #endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define PCAP_VERSION_MAJOR 2 +#define PCAP_VERSION_MINOR 4 + +#define PCAP_ERRBUF_SIZE 256 + +/* + * Compatibility for systems that have a bpf.h that + * predates the bpf typedefs for 64-bit support. + */ +#if BPF_RELEASE - 0 < 199406 +typedef int bpf_int32; +typedef u_int bpf_u_int32; +#endif + +typedef struct pcap pcap_t; +typedef struct pcap_dumper pcap_dumper_t; +typedef struct pcap_if pcap_if_t; +typedef struct pcap_addr pcap_addr_t; + +/* + * The first record in the file contains saved values for some + * of the flags used in the printout phases of tcpdump. + * Many fields here are 32 bit ints so compilers won't insert unwanted + * padding; these files need to be interchangeable across architectures. + * + * Do not change the layout of this structure, in any way (this includes + * changes that only affect the length of fields in this structure). + * + * Also, do not change the interpretation of any of the members of this + * structure, in any way (this includes using values other than + * LINKTYPE_ values, as defined in "savefile.c", in the "linktype" + * field). + * + * Instead: + * + * introduce a new structure for the new format, if the layout + * of the structure changed; + * + * send mail to "tcpdump-workers@lists.tcpdump.org", requesting + * a new magic number for your new capture file format, and, when + * you get the new magic number, put it in "savefile.c"; + * + * use that magic number for save files with the changed file + * header; + * + * make the code in "savefile.c" capable of reading files with + * the old file header as well as files with the new file header + * (using the magic number to determine the header format). + * + * Then supply the changes as a patch at + * + * http://sourceforge.net/projects/libpcap/ + * + * so that future versions of libpcap and programs that use it (such as + * tcpdump) will be able to read your new capture file format. + */ +struct pcap_file_header { + bpf_u_int32 magic; + u_short version_major; + u_short version_minor; + bpf_int32 thiszone; /* gmt to local correction */ + bpf_u_int32 sigfigs; /* accuracy of timestamps */ + bpf_u_int32 snaplen; /* max length saved portion of each pkt */ + bpf_u_int32 linktype; /* data link type (LINKTYPE_*) */ +}; + +/* + * Macros for the value returned by pcap_datalink_ext(). + * + * If LT_FCS_LENGTH_PRESENT(x) is true, the LT_FCS_LENGTH(x) macro + * gives the FCS length of packets in the capture. + */ +#define LT_FCS_LENGTH_PRESENT(x) ((x) & 0x04000000) +#define LT_FCS_LENGTH(x) (((x) & 0xF0000000) >> 28) +#define LT_FCS_DATALINK_EXT(x) ((((x) & 0xF) << 28) | 0x04000000) + +typedef enum { + PCAP_D_INOUT = 0, + PCAP_D_IN, + PCAP_D_OUT +} pcap_direction_t; + +/* + * Generic per-packet information, as supplied by libpcap. + * + * The time stamp can and should be a "struct timeval", regardless of + * whether your system supports 32-bit tv_sec in "struct timeval", + * 64-bit tv_sec in "struct timeval", or both if it supports both 32-bit + * and 64-bit applications. The on-disk format of savefiles uses 32-bit + * tv_sec (and tv_usec); this structure is irrelevant to that. 32-bit + * and 64-bit versions of libpcap, even if they're on the same platform, + * should supply the appropriate version of "struct timeval", even if + * that's not what the underlying packet capture mechanism supplies. + */ +struct pcap_pkthdr { + struct timeval ts; /* time stamp */ + bpf_u_int32 caplen; /* length of portion present */ + bpf_u_int32 len; /* length this packet (off wire) */ +}; + +/* + * As returned by the pcap_stats() + */ +struct pcap_stat { + u_int ps_recv; /* number of packets received */ + u_int ps_drop; /* number of packets dropped */ + u_int ps_ifdrop; /* drops by interface XXX not yet supported */ +#ifdef HAVE_REMOTE + u_int ps_capt; /* number of packets that are received by the application; please get rid off the Win32 ifdef */ + u_int ps_sent; /* number of packets sent by the server on the network */ + u_int ps_netdrop; /* number of packets lost on the network */ +#endif /* HAVE_REMOTE */ +}; + +#ifdef MSDOS +/* + * As returned by the pcap_stats_ex() + */ +struct pcap_stat_ex { + u_long rx_packets; /* total packets received */ + u_long tx_packets; /* total packets transmitted */ + u_long rx_bytes; /* total bytes received */ + u_long tx_bytes; /* total bytes transmitted */ + u_long rx_errors; /* bad packets received */ + u_long tx_errors; /* packet transmit problems */ + u_long rx_dropped; /* no space in Rx buffers */ + u_long tx_dropped; /* no space available for Tx */ + u_long multicast; /* multicast packets received */ + u_long collisions; + + /* detailed rx_errors: */ + u_long rx_length_errors; + u_long rx_over_errors; /* receiver ring buff overflow */ + u_long rx_crc_errors; /* recv'd pkt with crc error */ + u_long rx_frame_errors; /* recv'd frame alignment error */ + u_long rx_fifo_errors; /* recv'r fifo overrun */ + u_long rx_missed_errors; /* recv'r missed packet */ + + /* detailed tx_errors */ + u_long tx_aborted_errors; + u_long tx_carrier_errors; + u_long tx_fifo_errors; + u_long tx_heartbeat_errors; + u_long tx_window_errors; + }; +#endif + +/* + * Item in a list of interfaces. + */ +struct pcap_if { + struct pcap_if *next; + char *name; /* name to hand to "pcap_open_live()" */ + char *description; /* textual description of interface, or NULL */ + struct pcap_addr *addresses; + bpf_u_int32 flags; /* PCAP_IF_ interface flags */ +}; + +#define PCAP_IF_LOOPBACK 0x00000001 /* interface is loopback */ + +/* + * Representation of an interface address. + */ +struct pcap_addr { + struct pcap_addr *next; + struct sockaddr *addr; /* address */ + struct sockaddr *netmask; /* netmask for that address */ + struct sockaddr *broadaddr; /* broadcast address for that address */ + struct sockaddr *dstaddr; /* P2P destination address for that address */ +}; + +typedef void (*pcap_handler)(u_char *, const struct pcap_pkthdr *, + const u_char *); + +/* + * Error codes for the pcap API. + * These will all be negative, so you can check for the success or + * failure of a call that returns these codes by checking for a + * negative value. + */ +#define PCAP_ERROR -1 /* generic error code */ +#define PCAP_ERROR_BREAK -2 /* loop terminated by pcap_breakloop */ +#define PCAP_ERROR_NOT_ACTIVATED -3 /* the capture needs to be activated */ +#define PCAP_ERROR_ACTIVATED -4 /* the operation can't be performed on already activated captures */ +#define PCAP_ERROR_NO_SUCH_DEVICE -5 /* no such device exists */ +#define PCAP_ERROR_RFMON_NOTSUP -6 /* this device doesn't support rfmon (monitor) mode */ +#define PCAP_ERROR_NOT_RFMON -7 /* operation supported only in monitor mode */ +#define PCAP_ERROR_PERM_DENIED -8 /* no permission to open the device */ +#define PCAP_ERROR_IFACE_NOT_UP -9 /* interface isn't up */ + +/* + * Warning codes for the pcap API. + * These will all be positive and non-zero, so they won't look like + * errors. + */ +#define PCAP_WARNING 1 /* generic warning code */ +#define PCAP_WARNING_PROMISC_NOTSUP 2 /* this device doesn't support promiscuous mode */ + +char *pcap_lookupdev(char *); +int pcap_lookupnet(const char *, bpf_u_int32 *, bpf_u_int32 *, char *); + +pcap_t *pcap_create(const char *, char *); +int pcap_set_snaplen(pcap_t *, int); +int pcap_set_promisc(pcap_t *, int); +int pcap_can_set_rfmon(pcap_t *); +int pcap_set_rfmon(pcap_t *, int); +int pcap_set_timeout(pcap_t *, int); +int pcap_set_buffer_size(pcap_t *, int); +int pcap_activate(pcap_t *); + +pcap_t *pcap_open_live(const char *, int, int, int, char *); +pcap_t *pcap_open_dead(int, int); +pcap_t *pcap_open_offline(const char *, char *); +#if defined(WIN32) +pcap_t *pcap_hopen_offline(intptr_t, char *); +#if !defined(LIBPCAP_EXPORTS) +#define pcap_fopen_offline(f,b) \ + pcap_hopen_offline(_get_osfhandle(_fileno(f)), b) +#else /*LIBPCAP_EXPORTS*/ +static pcap_t *pcap_fopen_offline(FILE *, char *); +#endif +#else /*WIN32*/ +pcap_t *pcap_fopen_offline(FILE *, char *); +#endif /*WIN32*/ + +void pcap_close(pcap_t *); +int pcap_loop(pcap_t *, int, pcap_handler, u_char *); +int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *); +const u_char* + pcap_next(pcap_t *, struct pcap_pkthdr *); +int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **); +void pcap_breakloop(pcap_t *); +int pcap_stats(pcap_t *, struct pcap_stat *); +int pcap_setfilter(pcap_t *, struct bpf_program *); +int pcap_setdirection(pcap_t *, pcap_direction_t); +int pcap_getnonblock(pcap_t *, char *); +int pcap_setnonblock(pcap_t *, int, char *); +int pcap_inject(pcap_t *, const void *, size_t); +int pcap_sendpacket(pcap_t *, const u_char *, int); +const char *pcap_statustostr(int); +const char *pcap_strerror(int); +char *pcap_geterr(pcap_t *); +void pcap_perror(pcap_t *, char *); +int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, + bpf_u_int32); +int pcap_compile_nopcap(int, int, struct bpf_program *, + const char *, int, bpf_u_int32); +void pcap_freecode(struct bpf_program *); +int pcap_offline_filter(struct bpf_program *, const struct pcap_pkthdr *, + const u_char *); +int pcap_datalink(pcap_t *); +int pcap_datalink_ext(pcap_t *); +int pcap_list_datalinks(pcap_t *, int **); +int pcap_set_datalink(pcap_t *, int); +void pcap_free_datalinks(int *); +int pcap_datalink_name_to_val(const char *); +const char *pcap_datalink_val_to_name(int); +const char *pcap_datalink_val_to_description(int); +int pcap_snapshot(pcap_t *); +int pcap_is_swapped(pcap_t *); +int pcap_major_version(pcap_t *); +int pcap_minor_version(pcap_t *); + +/* XXX */ +FILE *pcap_file(pcap_t *); +int pcap_fileno(pcap_t *); + +pcap_dumper_t *pcap_dump_open(pcap_t *, const char *); +pcap_dumper_t *pcap_dump_fopen(pcap_t *, FILE *fp); +FILE *pcap_dump_file(pcap_dumper_t *); +long pcap_dump_ftell(pcap_dumper_t *); +int pcap_dump_flush(pcap_dumper_t *); +void pcap_dump_close(pcap_dumper_t *); +void pcap_dump(u_char *, const struct pcap_pkthdr *, const u_char *); + +int pcap_findalldevs(pcap_if_t **, char *); +void pcap_freealldevs(pcap_if_t *); + +const char *pcap_lib_version(void); + +/* XXX this guy lives in the bpf tree */ +u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int); +int bpf_validate(const struct bpf_insn *f, int len); +char *bpf_image(const struct bpf_insn *, int); +void bpf_dump(const struct bpf_program *, int); + +#if defined(WIN32) + +/* + * Win32 definitions + */ + +int pcap_setbuff(pcap_t *p, int dim); +int pcap_setmode(pcap_t *p, int mode); +int pcap_setmintocopy(pcap_t *p, int size); + +#ifdef WPCAP +/* Include file with the wpcap-specific extensions */ +#include +#endif /* WPCAP */ + +#define MODE_CAPT 0 +#define MODE_STAT 1 +#define MODE_MON 2 + +#elif defined(MSDOS) + +/* + * MS-DOS definitions + */ + +int pcap_stats_ex (pcap_t *, struct pcap_stat_ex *); +void pcap_set_wait (pcap_t *p, void (*yield)(void), int wait); +u_long pcap_mac_packets (void); + +#else /* UN*X */ + +/* + * UN*X definitions + */ + +int pcap_get_selectable_fd(pcap_t *); + +#endif /* WIN32/MSDOS/UN*X */ + +#ifdef HAVE_REMOTE +/* Includes most of the public stuff that is needed for the remote capture */ +#include +#endif /* HAVE_REMOTE */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libs/WinPcap-413-173-b4/Include/pcap/sll.h b/libs/WpdPack_4_1_2/Include/pcap/sll.h similarity index 98% rename from libs/WinPcap-413-173-b4/Include/pcap/sll.h rename to libs/WpdPack_4_1_2/Include/pcap/sll.h index 38da29f5..e9d5452a 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap/sll.h +++ b/libs/WpdPack_4_1_2/Include/pcap/sll.h @@ -34,6 +34,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#) $Header: /tcpdump/master/libpcap/pcap/sll.h,v 1.2.2.1 2008-05-30 01:36:06 guy Exp $ (LBL) */ /* diff --git a/libs/WinPcap-413-173-b4/Include/pcap/usb.h b/libs/WpdPack_4_1_2/Include/pcap/usb.h similarity index 60% rename from libs/WinPcap-413-173-b4/Include/pcap/usb.h rename to libs/WpdPack_4_1_2/Include/pcap/usb.h index 83955271..adcd19c0 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap/usb.h +++ b/libs/WpdPack_4_1_2/Include/pcap/usb.h @@ -11,8 +11,8 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote - * products derived from this software without specific prior written + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS @@ -29,12 +29,14 @@ * * Basic USB data struct * By Paolo Abeni + * + * @(#) $Header: /tcpdump/master/libpcap/pcap/usb.h,v 1.6 2007/09/22 02:06:08 guy Exp $ */ - + #ifndef _PCAP_USB_STRUCTS_H__ #define _PCAP_USB_STRUCTS_H__ -/* +/* * possible transfer mode */ #define URB_TRANSFER_IN 0x80 @@ -52,7 +54,7 @@ /* * USB setup header as defined in USB specification. - * Appears at the front of each Control S-type packet in DLT_USB captures. + * Appears at the front of each packet in DLT_USB captures. */ typedef struct _usb_setup { u_int8_t bmRequestType; @@ -62,13 +64,6 @@ typedef struct _usb_setup { u_int16_t wLength; } pcap_usb_setup; -/* - * Information from the URB for Isochronous transfers. - */ -typedef struct _iso_rec { - int32_t error_count; - int32_t numdesc; -} iso_rec; /* * Header prepended by linux kernel to each event. @@ -91,51 +86,5 @@ typedef struct _usb_header { pcap_usb_setup setup; } pcap_usb_header; -/* - * Header prepended by linux kernel to each event for the 2.6.31 - * and later kernels; for the 2.6.21 through 2.6.30 kernels, the - * "iso_rec" information, and the fields starting with "interval" - * are zeroed-out padding fields. - * - * Appears at the front of each packet in DLT_USB_LINUX_MMAPPED captures. - */ -typedef struct _usb_header_mmapped { - u_int64_t id; - u_int8_t event_type; - u_int8_t transfer_type; - u_int8_t endpoint_number; - u_int8_t device_address; - u_int16_t bus_id; - char setup_flag;/*if !=0 the urb setup header is not present*/ - char data_flag; /*if !=0 no urb data is present*/ - int64_t ts_sec; - int32_t ts_usec; - int32_t status; - u_int32_t urb_len; - u_int32_t data_len; /* amount of urb data really present in this event*/ - union { - pcap_usb_setup setup; - iso_rec iso; - } s; - int32_t interval; /* for Interrupt and Isochronous events */ - int32_t start_frame; /* for Isochronous events */ - u_int32_t xfer_flags; /* copy of URB's transfer flags */ - u_int32_t ndesc; /* number of isochronous descriptors */ -} pcap_usb_header_mmapped; - -/* - * Isochronous descriptors; for isochronous transfers there might be - * one or more of these at the beginning of the packet data. The - * number of descriptors is given by the "ndesc" field in the header; - * as indicated, in older kernels that don't put the descriptors at - * the beginning of the packet, that field is zeroed out, so that field - * can be trusted even in captures from older kernels. - */ -typedef struct _usb_isodesc { - int32_t status; - u_int32_t offset; - u_int32_t len; - u_int8_t pad[4]; -} usb_isodesc; #endif diff --git a/libs/WinPcap-413-173-b4/Include/pcap/vlan.h b/libs/WpdPack_4_1_2/Include/pcap/vlan.h similarity index 95% rename from libs/WinPcap-413-173-b4/Include/pcap/vlan.h rename to libs/WpdPack_4_1_2/Include/pcap/vlan.h index 021f6129..b0cb7949 100644 --- a/libs/WinPcap-413-173-b4/Include/pcap/vlan.h +++ b/libs/WpdPack_4_1_2/Include/pcap/vlan.h @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * @(#) $Header: /tcpdump/master/libpcap/pcap/vlan.h,v 1.1.2.2 2008-08-06 07:45:59 guy Exp $ */ #ifndef lib_pcap_vlan_h diff --git a/libs/WpdPack_4_1_2/Include/remote-ext.h b/libs/WpdPack_4_1_2/Include/remote-ext.h new file mode 100644 index 00000000..35a2fff6 --- /dev/null +++ b/libs/WpdPack_4_1_2/Include/remote-ext.h @@ -0,0 +1,444 @@ +/* + * Copyright (c) 2002 - 2003 + * NetGroup, Politecnico di Torino (Italy) + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 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. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#ifndef __REMOTE_EXT_H__ +#define __REMOTE_EXT_H__ + + +#ifndef HAVE_REMOTE +#error Please do not include this file directly. Just define HAVE_REMOTE and then include pcap.h +#endif + +// Definition for Microsoft Visual Studio +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + \file remote-ext.h + + The goal of this file it to include most of the new definitions that should be + placed into the pcap.h file. + + It includes all new definitions (structures and functions like pcap_open(). + Some of the functions are not really a remote feature, but, right now, + they are placed here. +*/ + + + +// All this stuff is public +/*! \addtogroup remote_struct + \{ +*/ + + + + +/*! + \brief Defines the maximum buffer size in which address, port, interface names are kept. + + In case the adapter name or such is larger than this value, it is truncated. + This is not used by the user; however it must be aware that an hostname / interface + name longer than this value will be truncated. +*/ +#define PCAP_BUF_SIZE 1024 + + +/*! \addtogroup remote_source_ID + \{ +*/ + + +/*! + \brief Internal representation of the type of source in use (file, + remote/local interface). + + This indicates a file, i.e. the user want to open a capture from a local file. +*/ +#define PCAP_SRC_FILE 2 +/*! + \brief Internal representation of the type of source in use (file, + remote/local interface). + + This indicates a local interface, i.e. the user want to open a capture from + a local interface. This does not involve the RPCAP protocol. +*/ +#define PCAP_SRC_IFLOCAL 3 +/*! + \brief Internal representation of the type of source in use (file, + remote/local interface). + + This indicates a remote interface, i.e. the user want to open a capture from + an interface on a remote host. This does involve the RPCAP protocol. +*/ +#define PCAP_SRC_IFREMOTE 4 + +/*! + \} +*/ + + + +/*! \addtogroup remote_source_string + + The formats allowed by the pcap_open() are the following: + - file://path_and_filename [opens a local file] + - rpcap://devicename [opens the selected device devices available on the local host, without using the RPCAP protocol] + - rpcap://host/devicename [opens the selected device available on a remote host] + - rpcap://host:port/devicename [opens the selected device available on a remote host, using a non-standard port for RPCAP] + - adaptername [to open a local adapter; kept for compability, but it is strongly discouraged] + - (NULL) [to open the first local adapter; kept for compability, but it is strongly discouraged] + + The formats allowed by the pcap_findalldevs_ex() are the following: + - file://folder/ [lists all the files in the given folder] + - rpcap:// [lists all local adapters] + - rpcap://host:port/ [lists the devices available on a remote host] + + Referring to the 'host' and 'port' paramters, they can be either numeric or literal. Since + IPv6 is fully supported, these are the allowed formats: + + - host (literal): e.g. host.foo.bar + - host (numeric IPv4): e.g. 10.11.12.13 + - host (numeric IPv4, IPv6 style): e.g. [10.11.12.13] + - host (numeric IPv6): e.g. [1:2:3::4] + - port: can be either numeric (e.g. '80') or literal (e.g. 'http') + + Here you find some allowed examples: + - rpcap://host.foo.bar/devicename [everything literal, no port number] + - rpcap://host.foo.bar:1234/devicename [everything literal, with port number] + - rpcap://10.11.12.13/devicename [IPv4 numeric, no port number] + - rpcap://10.11.12.13:1234/devicename [IPv4 numeric, with port number] + - rpcap://[10.11.12.13]:1234/devicename [IPv4 numeric with IPv6 format, with port number] + - rpcap://[1:2:3::4]/devicename [IPv6 numeric, no port number] + - rpcap://[1:2:3::4]:1234/devicename [IPv6 numeric, with port number] + - rpcap://[1:2:3::4]:http/devicename [IPv6 numeric, with literal port number] + + \{ +*/ + + +/*! + \brief String that will be used to determine the type of source in use (file, + remote/local interface). + + This string will be prepended to the interface name in order to create a string + that contains all the information required to open the source. + + This string indicates that the user wants to open a capture from a local file. +*/ +#define PCAP_SRC_FILE_STRING "file://" +/*! + \brief String that will be used to determine the type of source in use (file, + remote/local interface). + + This string will be prepended to the interface name in order to create a string + that contains all the information required to open the source. + + This string indicates that the user wants to open a capture from a network interface. + This string does not necessarily involve the use of the RPCAP protocol. If the + interface required resides on the local host, the RPCAP protocol is not involved + and the local functions are used. +*/ +#define PCAP_SRC_IF_STRING "rpcap://" + +/*! + \} +*/ + + + + + +/*! + \addtogroup remote_open_flags + \{ +*/ + +/*! + \brief Defines if the adapter has to go in promiscuous mode. + + It is '1' if you have to open the adapter in promiscuous mode, '0' otherwise. + Note that even if this parameter is false, the interface could well be in promiscuous + mode for some other reason (for example because another capture process with + promiscuous mode enabled is currently using that interface). + On on Linux systems with 2.2 or later kernels (that have the "any" device), this + flag does not work on the "any" device; if an argument of "any" is supplied, + the 'promisc' flag is ignored. +*/ +#define PCAP_OPENFLAG_PROMISCUOUS 1 + +/*! + \brief Defines if the data trasfer (in case of a remote + capture) has to be done with UDP protocol. + + If it is '1' if you want a UDP data connection, '0' if you want + a TCP data connection; control connection is always TCP-based. + A UDP connection is much lighter, but it does not guarantee that all + the captured packets arrive to the client workstation. Moreover, + it could be harmful in case of network congestion. + This flag is meaningless if the source is not a remote interface. + In that case, it is simply ignored. +*/ +#define PCAP_OPENFLAG_DATATX_UDP 2 + + +/*! + \brief Defines if the remote probe will capture its own generated traffic. + + In case the remote probe uses the same interface to capture traffic and to send + data back to the caller, the captured traffic includes the RPCAP traffic as well. + If this flag is turned on, the RPCAP traffic is excluded from the capture, so that + the trace returned back to the collector is does not include this traffic. +*/ +#define PCAP_OPENFLAG_NOCAPTURE_RPCAP 4 + +/*! + \brief Defines if the local adapter will capture its own generated traffic. + + This flag tells the underlying capture driver to drop the packets that were sent by itself. + This is usefult when building applications like bridges, that should ignore the traffic + they just sent. +*/ +#define PCAP_OPENFLAG_NOCAPTURE_LOCAL 8 + +/*! + \brief This flag configures the adapter for maximum responsiveness. + + In presence of a large value for nbytes, WinPcap waits for the arrival of several packets before + copying the data to the user. This guarantees a low number of system calls, i.e. lower processor usage, + i.e. better performance, which is good for applications like sniffers. If the user sets the + PCAP_OPENFLAG_MAX_RESPONSIVENESS flag, the capture driver will copy the packets as soon as the application + is ready to receive them. This is suggested for real time applications (like, for example, a bridge) + that need the best responsiveness.*/ +#define PCAP_OPENFLAG_MAX_RESPONSIVENESS 16 + +/*! + \} +*/ + + +/*! + \addtogroup remote_samp_methods + \{ +*/ + +/*! + \brief No sampling has to be done on the current capture. + + In this case, no sampling algorithms are applied to the current capture. +*/ +#define PCAP_SAMP_NOSAMP 0 + +/*! + \brief It defines that only 1 out of N packets must be returned to the user. + + In this case, the 'value' field of the 'pcap_samp' structure indicates the + number of packets (minus 1) that must be discarded before one packet got accepted. + In other words, if 'value = 10', the first packet is returned to the caller, while + the following 9 are discarded. +*/ +#define PCAP_SAMP_1_EVERY_N 1 + +/*! + \brief It defines that we have to return 1 packet every N milliseconds. + + In this case, the 'value' field of the 'pcap_samp' structure indicates the 'waiting + time' in milliseconds before one packet got accepted. + In other words, if 'value = 10', the first packet is returned to the caller; the next + returned one will be the first packet that arrives when 10ms have elapsed. +*/ +#define PCAP_SAMP_FIRST_AFTER_N_MS 2 + +/*! + \} +*/ + + +/*! + \addtogroup remote_auth_methods + \{ +*/ + +/*! + \brief It defines the NULL authentication. + + This value has to be used within the 'type' member of the pcap_rmtauth structure. + The 'NULL' authentication has to be equal to 'zero', so that old applications + can just put every field of struct pcap_rmtauth to zero, and it does work. +*/ +#define RPCAP_RMTAUTH_NULL 0 +/*! + \brief It defines the username/password authentication. + + With this type of authentication, the RPCAP protocol will use the username/ + password provided to authenticate the user on the remote machine. If the + authentication is successful (and the user has the right to open network devices) + the RPCAP connection will continue; otherwise it will be dropped. + + This value has to be used within the 'type' member of the pcap_rmtauth structure. +*/ +#define RPCAP_RMTAUTH_PWD 1 + +/*! + \} +*/ + + + + +/*! + + \brief This structure keeps the information needed to autheticate + the user on a remote machine. + + The remote machine can either grant or refuse the access according + to the information provided. + In case the NULL authentication is required, both 'username' and + 'password' can be NULL pointers. + + This structure is meaningless if the source is not a remote interface; + in that case, the functions which requires such a structure can accept + a NULL pointer as well. +*/ +struct pcap_rmtauth +{ + /*! + \brief Type of the authentication required. + + In order to provide maximum flexibility, we can support different types + of authentication based on the value of this 'type' variable. The currently + supported authentication methods are defined into the + \link remote_auth_methods Remote Authentication Methods Section\endlink. + + */ + int type; + /*! + \brief Zero-terminated string containing the username that has to be + used on the remote machine for authentication. + + This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication + and it can be NULL. + */ + char *username; + /*! + \brief Zero-terminated string containing the password that has to be + used on the remote machine for authentication. + + This field is meaningless in case of the RPCAP_RMTAUTH_NULL authentication + and it can be NULL. + */ + char *password; +}; + + +/*! + \brief This structure defines the information related to sampling. + + In case the sampling is requested, the capturing device should read + only a subset of the packets coming from the source. The returned packets depend + on the sampling parameters. + + \warning The sampling process is applied after the filtering process. + In other words, packets are filtered first, then the sampling process selects a + subset of the 'filtered' packets and it returns them to the caller. +*/ +struct pcap_samp +{ + /*! + Method used for sampling. Currently, the supported methods are listed in the + \link remote_samp_methods Sampling Methods Section\endlink. + */ + int method; + + /*! + This value depends on the sampling method defined. For its meaning, please check + at the \link remote_samp_methods Sampling Methods Section\endlink. + */ + int value; +}; + + + + +//! Maximum lenght of an host name (needed for the RPCAP active mode) +#define RPCAP_HOSTLIST_SIZE 1024 + + +/*! + \} +*/ // end of public documentation + + +// Exported functions + + + +/** \name New WinPcap functions + + This section lists the new functions that are able to help considerably in writing + WinPcap programs because of their easiness of use. + */ +//\{ +pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf); +int pcap_createsrcstr(char *source, int type, const char *host, const char *port, const char *name, char *errbuf); +int pcap_parsesrcstr(const char *source, int *type, char *host, char *port, char *name, char *errbuf); +int pcap_findalldevs_ex(char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf); +struct pcap_samp *pcap_setsampling(pcap_t *p); + +//\} +// End of new winpcap functions + + + +/** \name Remote Capture functions + */ +//\{ +SOCKET pcap_remoteact_accept(const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf); +int pcap_remoteact_list(char *hostlist, char sep, int size, char *errbuf); +int pcap_remoteact_close(const char *host, char *errbuf); +void pcap_remoteact_cleanup(); +//\} +// End of remote capture functions + +#ifdef __cplusplus +} +#endif + + +#endif + diff --git a/libs/WpdPack_4_1_2/Lib/Packet.lib b/libs/WpdPack_4_1_2/Lib/Packet.lib new file mode 100644 index 00000000..81618bc8 Binary files /dev/null and b/libs/WpdPack_4_1_2/Lib/Packet.lib differ diff --git a/libs/WpdPack_4_1_2/Lib/libpacket.a b/libs/WpdPack_4_1_2/Lib/libpacket.a new file mode 100644 index 00000000..4d49131f Binary files /dev/null and b/libs/WpdPack_4_1_2/Lib/libpacket.a differ diff --git a/libs/WpdPack_4_1_2/Lib/libwpcap.a b/libs/WpdPack_4_1_2/Lib/libwpcap.a new file mode 100644 index 00000000..65b1870e Binary files /dev/null and b/libs/WpdPack_4_1_2/Lib/libwpcap.a differ diff --git a/libs/WpdPack_4_1_2/Lib/wpcap.lib b/libs/WpdPack_4_1_2/Lib/wpcap.lib new file mode 100644 index 00000000..f832e044 Binary files /dev/null and b/libs/WpdPack_4_1_2/Lib/wpcap.lib differ diff --git a/libs/WpdPack_4_1_2/Lib/x64/Packet.lib b/libs/WpdPack_4_1_2/Lib/x64/Packet.lib new file mode 100644 index 00000000..30c15405 Binary files /dev/null and b/libs/WpdPack_4_1_2/Lib/x64/Packet.lib differ diff --git a/libs/WpdPack_4_1_2/Lib/x64/wpcap.lib b/libs/WpdPack_4_1_2/Lib/x64/wpcap.lib new file mode 100644 index 00000000..d5559f80 Binary files /dev/null and b/libs/WpdPack_4_1_2/Lib/x64/wpcap.lib differ diff --git a/libs/WinPcap-413-173-b4/docs/WinPcap_docs.html b/libs/WpdPack_4_1_2/docs/WinPcap_docs.html similarity index 95% rename from libs/WinPcap-413-173-b4/docs/WinPcap_docs.html rename to libs/WpdPack_4_1_2/docs/WinPcap_docs.html index 2ca3177e..536a9a22 100644 --- a/libs/WinPcap-413-173-b4/docs/WinPcap_docs.html +++ b/libs/WpdPack_4_1_2/docs/WinPcap_docs.html @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + diff --git a/libs/WpdPack_4_1_2/docs/html/Packet_8h.html b/libs/WpdPack_4_1_2/docs/html/Packet_8h.html new file mode 100644 index 00000000..7f1f95d8 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/Packet_8h.html @@ -0,0 +1,201 @@ + + + + +WinPcap: Packet.h File Reference + + + + + + +
+

Packet.h File Reference

#include "win_bpf.h"
+ +

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  packet_file_header
 Header of a libpcap dump file. More...
struct  sf_pkthdr
 Header associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler. More...
struct  _PACKET_OID_DATA
 Structure containing an OID request. More...
struct  _INTERNAL_REQUEST
 Stores an OID request. More...
struct  _PACKET_RESERVED
 Contains a NDIS packet. More...
struct  _DEVICE_EXTENSION
 Port device extension. More...
struct  __CPU_Private_Data
 Kernel buffer of each CPU. More...
struct  _OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver. More...
struct  PacketHeader
 Structure prepended to each packet in the kernel buffer pool. More...

Defines

#define MAX_REQUESTS   32
 Maximum number of simultaneous IOCTL requests.
#define Packet_ALIGNMENT   sizeof(int)
 Alignment macro. Defines the alignment size.
#define Packet_WORDALIGN(x)   (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
 even multiple of Packet_ALIGNMENT.
#define KERNEL_EVENT_NAMESPACE   L"\\BaseNamedObjects\\"
#define MODE_CAPT   0x0
 Capture working mode.
#define MODE_STAT   0x1
 Statistical working mode.
#define MODE_MON   0x2
 Kernel monitoring mode.
#define MODE_DUMP   0x10
 Kernel dump working mode.
#define IMMEDIATE   1
 Immediate timeout. Forces a read call to return immediately.
#define NDIS_FLAGS_SKIP_LOOPBACK_W2K   0x400
 This is an undocumented flag for NdisSetPacketFlags() that allows to disable loopback reception.
#define TCPDUMP_MAGIC   0xa1b2c3d4
 Libpcap magic number. Used by programs like tcpdump to recognize a driver's generated dump file.
#define PCAP_VERSION_MAJOR   2
 Major libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.
#define PCAP_VERSION_MINOR   4
 Minor libpcap version of the dump file. Used by programs like tcpdump to recognize a driver's generated dump file.
#define NPF_DISABLE_LOOPBACK   1
 Tells the driver to drop the packets sent by itself. This is usefult when building applications like bridges.
#define NPF_ENABLE_LOOPBACK   2
 Tells the driver to capture the packets sent by itself.
#define C_ASSERT(a)
#define RESERVED(_p)   ((PPACKET_RESERVED)((_p)->ProtocolReserved))
 Macro to obtain a NDIS_PACKET from a PACKET_RESERVED.
#define TRANSMIT_PACKETS   256
 of packets that can be transmitted at the same time or with a single call to NdisSendPackets.
#define EXIT_SUCCESS(quantity)
 Macro used in the I/O routines to return the control to user-mode with a success status.
#define EXIT_FAILURE(quantity)
 Macro used in the I/O routines to return the control to user-mode with a failure status.

Typedefs

typedef struct _PACKET_OID_DATA PACKET_OID_DATA
 Structure containing an OID request.
typedef struct _PACKET_OID_DATAPPACKET_OID_DATA
typedef struct _INTERNAL_REQUEST INTERNAL_REQUEST
 Stores an OID request.
typedef struct _INTERNAL_REQUESTPINTERNAL_REQUEST
typedef struct _PACKET_RESERVED PACKET_RESERVED
 Contains a NDIS packet.
typedef struct _PACKET_RESERVEDPPACKET_RESERVED
typedef struct _DEVICE_EXTENSION DEVICE_EXTENSION
 Port device extension.
typedef struct _DEVICE_EXTENSIONPDEVICE_EXTENSION
typedef struct __CPU_Private_Data CpuPrivateData
 Kernel buffer of each CPU.
typedef struct _OPEN_INSTANCE OPEN_INSTANCE
 Contains the state of a running instance of the NPF driver.
typedef struct _OPEN_INSTANCEPOPEN_INSTANCE

Enumerations

enum  ADAPTER_BINDING_STATUS { ADAPTER_UNBOUND, +ADAPTER_BOUND, +ADAPTER_UNBINDING + }

Functions

 C_ASSERT (sizeof(PACKET_OID_DATA)==12)
NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 The initialization routine of the driver.
PWCHAR getAdaptersList (VOID)
 Returns the list of the MACs available on the system.
PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings (VOID)
 Returns the MACs that bind to TCP/IP.
BOOLEAN NPF_CreateDevice (IN OUT PDRIVER_OBJECT adriverObjectP, IN PUNICODE_STRING amacNameP)
 Creates a device for a given MAC.
NTSTATUS NPF_Open (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Opens a new instance of the driver.
VOID NPF_OpenAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN NDIS_STATUS OpenErrorStatus)
 Ends the opening of an adapter.
NTSTATUS NPF_Cleanup (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Closes an instance of the driver.
NTSTATUS NPF_Close (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
VOID NPF_CloseAdapterComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends the closing of an adapter.
NDIS_STATUS NPF_tap (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE MacReceiveContext, IN PVOID HeaderBuffer, IN UINT HeaderBufferSize, IN PVOID LookAheadBuffer, IN UINT LookaheadBufferSize, IN UINT PacketSize)
 Callback invoked by NDIS when a packet arrives from the network.
VOID NPF_TransferDataComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET Packet, IN NDIS_STATUS Status, IN UINT BytesTransferred)
 Ends the transfer of a packet.
VOID NPF_ReceiveComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback function that signals the end of a packet reception.
NTSTATUS NPF_IoControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Handles the IOCTL calls.
VOID NPF_RequestComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_REQUEST pRequest, IN NDIS_STATUS Status)
 Ends an OID request.
NTSTATUS NPF_Write (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Writes a raw packet to the network.
INT NPF_BufferedWrite (IN PIRP Irp, IN PCHAR UserBuff, IN ULONG UserBuffSize, BOOLEAN sync)
 Writes a buffer of raw packets to the network.
VOID NPF_WaitEndOfBufferedWrite (POPEN_INSTANCE Open)
 Waits the completion of all the sends performed by NPF_BufferedWrite.
VOID NPF_SendComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_PACKET pPacket, IN NDIS_STATUS Status)
 Ends a send operation.
VOID NPF_ResetComplete (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status)
 Ends a reset of the adapter.
VOID NPF_Status (IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_STATUS Status, IN PVOID StatusBuffer, IN UINT StatusBufferSize)
 Callback for NDIS StatusHandler. Not used by NPF.
VOID NPF_StatusComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback for NDIS StatusCompleteHandler. Not used by NPF.
VOID NPF_Unload (IN PDRIVER_OBJECT DriverObject)
 Function called by the OS when NPF is unloaded.
NTSTATUS NPF_Read (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Function that serves the user's reads.
NTSTATUS NPF_ReadRegistry (IN PWSTR *MacDriverName, IN PWSTR *PacketDriverName, IN PUNICODE_STRING RegistryPath)
 Reads the registry keys associated woth NPF if the driver is manually installed via the control panel.
NTSTATUS NPF_QueryRegistryRoutine (IN PWSTR ValueName, IN ULONG ValueType, IN PVOID ValueData, IN ULONG ValueLength, IN PVOID Context, IN PVOID EntryContext)
 Function used by NPF_ReadRegistry() to quesry the registry keys associated woth NPF if the driver is manually installed via the control panel.
VOID NPF_BindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE BindContext, IN PNDIS_STRING DeviceName, IN PVOID SystemSpecific1, IN PVOID SystemSpecific2)
 Callback for NDIS BindAdapterHandler. Not used by NPF.
VOID NPF_UnbindAdapter (OUT PNDIS_STATUS Status, IN NDIS_HANDLE ProtocolBindingContext, IN NDIS_HANDLE UnbindContext)
 Callback for NDIS UnbindAdapterHandler.
NTSTATUS NPF_OpenDumpFile (POPEN_INSTANCE Open, PUNICODE_STRING fileName, BOOLEAN append)
 Creates the file that will receive the packets when the driver is in dump mode.
NTSTATUS NPF_StartDump (POPEN_INSTANCE Open)
 Starts dump to file.
VOID NPF_DumpThread (PVOID Open)
 The dump thread.
NTSTATUS NPF_SaveCurrentBuffer (POPEN_INSTANCE Open)
 Saves the content of the packet buffer to the file associated with current instance.
VOID NPF_WriteDumpFile (PFILE_OBJECT FileObject, PLARGE_INTEGER Offset, ULONG Length, PMDL Mdl, PIO_STATUS_BLOCK IoStatusBlock)
 Writes a block of packets on the dump file.
NTSTATUS NPF_CloseDumpFile (POPEN_INSTANCE Open)
 Closes the dump file associated with an instance of the driver.
BOOLEAN NPF_StartUsingBinding (IN POPEN_INSTANCE pOpen)
VOID NPF_StopUsingBinding (IN POPEN_INSTANCE pOpen)
VOID NPF_CloseBinding (IN POPEN_INSTANCE pOpen)
BOOLEAN NPF_StartUsingOpenInstance (IN POPEN_INSTANCE pOpen)
VOID NPF_StopUsingOpenInstance (IN POPEN_INSTANCE pOpen)
VOID NPF_CloseOpenInstance (IN POPEN_INSTANCE pOpen)
NTSTATUS NPF_GetDeviceMTU (IN POPEN_INSTANCE pOpen, IN PIRP pIrp, OUT PUINT pMtu)
UINT GetBuffOccupation (POPEN_INSTANCE Open)
 Returns the amount of bytes present in the packet buffer.

Variables

ULONG g_NCpu
NDIS_HANDLE g_NdisProtocolHandle
struct time_conv G_Start_Time
UINT g_SendPacketFlags
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/Packet_8h_source.html b/libs/WpdPack_4_1_2/docs/html/Packet_8h_source.html new file mode 100644 index 00000000..f4293eb7 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/Packet_8h_source.html @@ -0,0 +1,572 @@ + + + + +WinPcap: Packet.h Source File + + + + + + + +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/Win32-Extensions_8h.html b/libs/WpdPack_4_1_2/docs/html/Win32-Extensions_8h.html new file mode 100644 index 00000000..038ab6d7 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/Win32-Extensions_8h.html @@ -0,0 +1,700 @@ + + + + +WinPcap: Win32-Extensions.h File Reference + + + + + + +
+

Win32-Extensions.h File Reference

+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Data Structures

struct  pcap_send_queue
 A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit(). More...

Defines

#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
 This typedef is a support for the pcap_get_airpcap_handle() function.
#define BPF_MEM_EX_IMM   0xc0
#define BPF_MEM_EX_IND   0xe0
#define BPF_MEM_EX   0xc0
#define BPF_TME   0x08
#define BPF_LOOKUP   0x90
#define BPF_EXECUTE   0xa0
#define BPF_INIT   0xb0
#define BPF_VALIDATE   0xc0
#define BPF_SET_ACTIVE   0xd0
#define BPF_RESET   0xe0
#define BPF_SET_MEMORY   0x80
#define BPF_GET_REGISTER_VALUE   0x70
#define BPF_SET_REGISTER_VALUE   0x60
#define BPF_SET_WORKING   0x50
#define BPF_SET_ACTIVE_READ   0x40
#define BPF_SET_AUTODELETION   0x30
#define BPF_SEPARATION   0xff

Typedefs

typedef struct pcap_send_queue pcap_send_queue
typedef struct _AirpcapHandle * PAirpcapHandle

Functions

pcap_send_queuepcap_sendqueue_alloc (u_int memsize)
void pcap_sendqueue_destroy (pcap_send_queue *queue)
int pcap_sendqueue_queue (pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
u_int pcap_sendqueue_transmit (pcap_t *p, pcap_send_queue *queue, int sync)
HANDLE pcap_getevent (pcap_t *p)
struct pcap_statpcap_stats_ex (pcap_t *p, int *pcap_stat_size)
int pcap_setuserbuffer (pcap_t *p, int size)
int pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
int pcap_live_dump_ended (pcap_t *p, int sync)
int pcap_offline_filter (struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
int pcap_start_oem (char *err_str, int flags)
PAirpcapHandle pcap_get_airpcap_handle (pcap_t *p)
+

Define Documentation

+ +
+
+ + + + +
#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
+
+
+ +

This typedef is a support for the pcap_get_airpcap_handle() function.

+ +

Definition at line 59 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_EXECUTE   0xa0
+
+
+ +

Definition at line 71 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_GET_REGISTER_VALUE   0x70
+
+
+ +

Definition at line 77 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_INIT   0xb0
+
+
+ +

Definition at line 72 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_LOOKUP   0x90
+
+
+ +

Definition at line 70 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_MEM_EX   0xc0
+
+
+ +

Definition at line 67 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_MEM_EX_IMM   0xc0
+
+
+ +

Definition at line 63 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_MEM_EX_IND   0xe0
+
+
+ +

Definition at line 64 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_RESET   0xe0
+
+
+ +

Definition at line 75 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_SEPARATION   0xff
+
+
+ +

Definition at line 82 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_SET_ACTIVE   0xd0
+
+
+ +

Definition at line 74 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_SET_ACTIVE_READ   0x40
+
+
+ +

Definition at line 80 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_SET_AUTODELETION   0x30
+
+
+ +

Definition at line 81 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_SET_MEMORY   0x80
+
+
+ +

Definition at line 76 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_SET_REGISTER_VALUE   0x60
+
+
+ +

Definition at line 78 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_SET_WORKING   0x50
+
+
+ +

Definition at line 79 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_TME   0x08
+
+
+ +

Definition at line 68 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
#define BPF_VALIDATE   0xc0
+
+
+ +

Definition at line 73 of file Win32-Extensions.h.

+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef struct _AirpcapHandle* PAirpcapHandle
+
+
+ +

Definition at line 60 of file Win32-Extensions.h.

+ +
+
+ +
+
+ + + + +
typedef struct pcap_send_queue pcap_send_queue
+
+
+ +

Definition at line 53 of file Win32-Extensions.h.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + +
PAirpcapHandle pcap_get_airpcap_handle (pcap_t p ) 
+
+
+ +
+
+ +
+
+ + + + + + + + + +
HANDLE pcap_getevent (pcap_t p ) 
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int pcap_live_dump (pcap_t p,
char *  filename,
int  maxsize,
int  maxpacks 
)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int pcap_live_dump_ended (pcap_t p,
int  sync 
)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int pcap_offline_filter (struct bpf_program *  prog,
const struct pcap_pkthdr header,
const u_char *  pkt_data 
)
+
+
+ +
+
+ +
+
+ + + + + + + + + +
pcap_send_queue* pcap_sendqueue_alloc (u_int  memsize ) 
+
+
+ +
+
+ +
+
+ + + + + + + + + +
void pcap_sendqueue_destroy (pcap_send_queue queue ) 
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int pcap_sendqueue_queue (pcap_send_queue queue,
const struct pcap_pkthdr pkt_header,
const u_char *  pkt_data 
)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
u_int pcap_sendqueue_transmit (pcap_t p,
pcap_send_queue queue,
int  sync 
)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int pcap_setuserbuffer (pcap_t p,
int  size 
)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int pcap_start_oem (char *  err_str,
int  flags 
)
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
struct pcap_stat* pcap_stats_ex (pcap_t p,
int *  pcap_stat_size 
) [read]
+
+
+ +
+
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/Win32-Extensions_8h_source.html b/libs/WpdPack_4_1_2/docs/html/Win32-Extensions_8h_source.html new file mode 100644 index 00000000..aaf88049 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/Win32-Extensions_8h_source.html @@ -0,0 +1,139 @@ + + + + +WinPcap: Win32-Extensions.h Source File + + + + + + + +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/annotated.html b/libs/WpdPack_4_1_2/docs/html/annotated.html new file mode 100644 index 00000000..5db948af --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/annotated.html @@ -0,0 +1,70 @@ + + + + +WinPcap: Data Structures + + + + + + +
+

Data Structures

Here are the data structures with brief descriptions: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
__CPU_Private_DataKernel buffer of each CPU
_DEVICE_EXTENSIONPort device extension
_INTERNAL_REQUESTStores an OID request
_OPEN_INSTANCEContains the state of a running instance of the NPF driver
_PACKET_OID_DATAStructure containing an OID request
_PACKET_RESERVEDContains a NDIS packet
active_pars
activehostsKeeps a list of all the opened connections in the active mode
binary_streamA stream of X86 binary code
daemon_slparsStructure that keeps the parameters needed by the daemon_serviceloop() function
JIT_BPF_FilterStructure describing a x86 filtering program created by the jitter
packet_file_headerHeader of a libpcap dump file
PacketHeaderStructure prepended to each packet in the kernel buffer pool
pcap_addrRepresentation of an interface address, used by pcap_findalldevs()
pcap_file_headerHeader of a libpcap dump file
pcap_ifItem in a list of interfaces, used by pcap_findalldevs()
pcap_pkthdrHeader of a packet in the dump file
pcap_rmtauthThis structure keeps the information needed to autheticate the user on a remote machine
pcap_sampThis structure defines the information related to sampling
pcap_send_queueA queue of raw packets that will be sent to the network with pcap_sendqueue_transmit()
pcap_statStructure that keeps statistical values on an interface
rpcap_authStructure that keeps the data required for the authentication on the remote host
rpcap_filterGeneral header used for the pcap_setfilter() command; keeps just the number of BPF instructions
rpcap_filterbpf_insnStructure that keeps a single BPF instuction; it is repeated 'ninsn' times according to the 'rpcap_filterbpf' header
rpcap_findalldevs_ifFormat of the message for the interface description (findalldevs command)
rpcap_findalldevs_ifaddrFormat of the message for the address listing (findalldevs command)
rpcap_headerCommon header for all the RPCAP messages
rpcap_openreplyFormat of the message of the connection opening reply (open command)
rpcap_pkthdrFormat of the header which encapsulates captured packets when transmitted on the network
rpcap_samplingStructure that is needed to set sampling parameters
rpcap_startcapreplyFormat of the reply message that devoted to start a remote capture (startcap reply command)
rpcap_startcapreqFormat of the message that starts a remote capture (startcap command)
rpcap_statsStructure that keeps the statistics about the number of packets captured, dropped, etc
sf_pkthdrHeader associated to a packet in the driver's buffer when the driver is in dump mode. Similar to the bpf_hdr structure, but simpler
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/classes.html b/libs/WpdPack_4_1_2/docs/html/classes.html new file mode 100644 index 00000000..8ed33f18 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/classes.html @@ -0,0 +1,45 @@ + + + + +WinPcap: Alphabetical List + + + + + + +
+

Data Structure Index

A | B | D | J | P | R | S | _
+ +
  A  
+
  P  
+
pcap_send_queue   rpcap_header   sf_pkthdr   
active_pars   packet_file_header   pcap_stat   rpcap_openreply   
  _  
+
activehosts   PacketHeader   
  R  
+
rpcap_pkthdr   __CPU_Private_Data   
  B  
+
pcap_addr   rpcap_auth   rpcap_sampling   _DEVICE_EXTENSION   
binary_stream   pcap_file_header   rpcap_filter   rpcap_startcapreply   _INTERNAL_REQUEST   
  D  
+
pcap_if   rpcap_filterbpf_insn   rpcap_startcapreq   _OPEN_INSTANCE   
daemon_slpars   pcap_pkthdr   rpcap_findalldevs_if   rpcap_stats   _PACKET_OID_DATA   
  J  
+
pcap_rmtauth   rpcap_findalldevs_ifaddr   
  S  
+
_PACKET_RESERVED   
JIT_BPF_Filter   pcap_samp   
A | B | D | J | P | R | S | _
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/daemon_8h.html b/libs/WpdPack_4_1_2/docs/html/daemon_8h.html new file mode 100644 index 00000000..9356c749 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/daemon_8h.html @@ -0,0 +1,81 @@ + + + + +WinPcap: daemon.h File Reference + + + + + + +
+

daemon.h File Reference

+

Go to the source code of this file.

+ + + + + + + +

Data Structures

struct  daemon_slpars
 Structure that keeps the parameters needed by the daemon_serviceloop() function. More...

Functions

void daemon_serviceloop (void *ptr)
void pthread_suspend (int msec)
+

Function Documentation

+ +
+
+ + + + + + + + + +
void daemon_serviceloop (void *  ptr ) 
+
+
+ +
+
+ +
+
+ + + + + + + + + +
void pthread_suspend (int  msec ) 
+
+
+ +
+
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/daemon_8h_source.html b/libs/WpdPack_4_1_2/docs/html/daemon_8h_source.html new file mode 100644 index 00000000..c1676ed9 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/daemon_8h_source.html @@ -0,0 +1,82 @@ + + + + +WinPcap: daemon.h Source File + + + + + + + +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/deprecated.html b/libs/WpdPack_4_1_2/docs/html/deprecated.html new file mode 100644 index 00000000..b6e90169 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/deprecated.html @@ -0,0 +1,51 @@ + + + + +WinPcap: Deprecated List + + + + + + +
+ + +

Deprecated List

+
+
Global pcap_file
+

Due to incompatibilities between the C Runtime (CRT) used to compile WinPcap and the one used by WinPcap-based applications, this function may return an invalid FILE pointer, i.e. a descriptor that causes all the standard I/O stream functions (ftell, fseek, fclose...) to fail. The function is still available for backwards binary compatibility, only.

+

+
+
+

+
+
Global pcap_lookupdev
+

Use pcap_findalldevs() or pcap_findalldevs_ex() instead.

+

+
+
+

+
+
Global pcap_lookupnet
+

Use pcap_findalldevs() or pcap_findalldevs_ex() instead.

+

+
+
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/doxygen.png b/libs/WpdPack_4_1_2/docs/html/doxygen.png new file mode 100644 index 00000000..f0a274bb Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/doxygen.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/doxygen__groups_8txt.html b/libs/WpdPack_4_1_2/docs/html/doxygen__groups_8txt.html new file mode 100644 index 00000000..8935e3bc --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/doxygen__groups_8txt.html @@ -0,0 +1,36 @@ + + + + +WinPcap: doxygen_groups.txt File Reference + + + + + + +
+

doxygen_groups.txt File Reference

+
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/dump.gif b/libs/WpdPack_4_1_2/docs/html/dump.gif similarity index 100% rename from libs/WinPcap-413-173-b4/docs/html/dump.gif rename to libs/WpdPack_4_1_2/docs/html/dump.gif diff --git a/libs/WinPcap-413-173-b4/docs/html/encoding.gif b/libs/WpdPack_4_1_2/docs/html/encoding.gif similarity index 100% rename from libs/WinPcap-413-173-b4/docs/html/encoding.gif rename to libs/WpdPack_4_1_2/docs/html/encoding.gif diff --git a/libs/WpdPack_4_1_2/docs/html/fileconf_8h.html b/libs/WpdPack_4_1_2/docs/html/fileconf_8h.html new file mode 100644 index 00000000..cc663f74 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/fileconf_8h.html @@ -0,0 +1,78 @@ + + + + +WinPcap: fileconf.h File Reference + + + + + + +
+

fileconf.h File Reference

+

Go to the source code of this file.

+ + + + +

Functions

void fileconf_read (int sign)
int fileconf_save (const char *savefile)
+

Function Documentation

+ +
+
+ + + + + + + + + +
void fileconf_read (int  sign ) 
+
+
+ +
+
+ +
+
+ + + + + + + + + +
int fileconf_save (const char *  savefile ) 
+
+
+ +
+
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/fileconf_8h_source.html b/libs/WpdPack_4_1_2/docs/html/fileconf_8h_source.html new file mode 100644 index 00000000..69812554 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/fileconf_8h_source.html @@ -0,0 +1,74 @@ + + + + +WinPcap: fileconf.h Source File + + + + + + + +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/files.html b/libs/WpdPack_4_1_2/docs/html/files.html new file mode 100644 index 00000000..aedd63d9 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/files.html @@ -0,0 +1,50 @@ + + + + +WinPcap: File Index + + + + + + + + +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2blank.png b/libs/WpdPack_4_1_2/docs/html/ftv2blank.png new file mode 100644 index 00000000..493c3c0b Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2blank.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2doc.png b/libs/WpdPack_4_1_2/docs/html/ftv2doc.png new file mode 100644 index 00000000..f72999f9 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2doc.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2folderclosed.png b/libs/WpdPack_4_1_2/docs/html/ftv2folderclosed.png new file mode 100644 index 00000000..d6d06344 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2folderclosed.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2folderopen.png b/libs/WpdPack_4_1_2/docs/html/ftv2folderopen.png new file mode 100644 index 00000000..bbe2c913 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2folderopen.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2lastnode.png b/libs/WpdPack_4_1_2/docs/html/ftv2lastnode.png new file mode 100644 index 00000000..e7b9ba90 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2lastnode.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2link.png b/libs/WpdPack_4_1_2/docs/html/ftv2link.png new file mode 100644 index 00000000..14f3fed0 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2link.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2mlastnode.png b/libs/WpdPack_4_1_2/docs/html/ftv2mlastnode.png new file mode 100644 index 00000000..09ceb6ad Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2mlastnode.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2mnode.png b/libs/WpdPack_4_1_2/docs/html/ftv2mnode.png new file mode 100644 index 00000000..3254c051 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2mnode.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2node.png b/libs/WpdPack_4_1_2/docs/html/ftv2node.png new file mode 100644 index 00000000..c9f06a57 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2node.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2plastnode.png b/libs/WpdPack_4_1_2/docs/html/ftv2plastnode.png new file mode 100644 index 00000000..0b07e009 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2plastnode.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2pnode.png b/libs/WpdPack_4_1_2/docs/html/ftv2pnode.png new file mode 100644 index 00000000..2001b797 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2pnode.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/ftv2vertline.png b/libs/WpdPack_4_1_2/docs/html/ftv2vertline.png new file mode 100644 index 00000000..b330f3a3 Binary files /dev/null and b/libs/WpdPack_4_1_2/docs/html/ftv2vertline.png differ diff --git a/libs/WpdPack_4_1_2/docs/html/funcs_2pcap_8h.html b/libs/WpdPack_4_1_2/docs/html/funcs_2pcap_8h.html new file mode 100644 index 00000000..f2897076 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/funcs_2pcap_8h.html @@ -0,0 +1,176 @@ + + + + +WinPcap: pcap.h File Reference + + + + + + +
+

pcap.h File Reference

+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Functions

Windows-specific Extensions

The functions in this section extend libpcap to offer advanced functionalities (like remote packet capture, packet buffer size variation or high-precision packet injection). Howerver, at the moment they can be used only in Windows.

+

PAirpcapHandle pcap_get_airpcap_handle (pcap_t *p)
 Returns the AirPcap handler associated with an adapter. This handler can be used to change the wireless-related settings of the CACE Technologies AirPcap wireless capture adapters.
int pcap_offline_filter (struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
 Returns if a given filter applies to an offline packet.
int pcap_live_dump (pcap_t *p, char *filename, int maxsize, int maxpacks)
 Save a capture to file.
int pcap_live_dump_ended (pcap_t *p, int sync)
 Return the status of the kernel dump process, i.e. tells if one of the limits defined with pcap_live_dump() has been reached.
struct pcap_statpcap_stats_ex (pcap_t *p, int *pcap_stat_size)
 Return statistics on current capture.
int pcap_setbuff (pcap_t *p, int dim)
 Set the size of the kernel buffer associated with an adapter.
int pcap_setmode (pcap_t *p, int mode)
 Set the working mode of the interface p to mode.
int pcap_setmintocopy (pcap_t *p, int size)
 Set the minumum amount of data received by the kernel in a single call.
HANDLE pcap_getevent (pcap_t *p)
 Return the handle of the event associated with the interface p.
pcap_send_queuepcap_sendqueue_alloc (u_int memsize)
 Allocate a send queue.
void pcap_sendqueue_destroy (pcap_send_queue *queue)
 Destroy a send queue.
int pcap_sendqueue_queue (pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Add a packet to a send queue.
u_int pcap_sendqueue_transmit (pcap_t *p, pcap_send_queue *queue, int sync)
 Send a queue of raw packets to the network.
int pcap_findalldevs_ex (char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
 Create a list of network devices that can be opened with pcap_open().
int pcap_createsrcstr (char *source, int type, const char *host, const char *port, const char *name, char *errbuf)
 Accept a set of strings (host name, port, ...), and it returns the complete source string according to the new format (e.g. 'rpcap://1.2.3.4/eth0').
int pcap_parsesrcstr (const char *source, int *type, char *host, char *port, char *name, char *errbuf)
 Parse the source string and returns the pieces in which the source can be split.
pcap_tpcap_open (const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
 Open a generic source in order to capture / send (WinPcap only) traffic.
struct pcap_samppcap_setsampling (pcap_t *p)
 Define a sampling method for packet capture.
SOCKET pcap_remoteact_accept (const char *address, const char *port, const char *hostlist, char *connectinghost, struct pcap_rmtauth *auth, char *errbuf)
 Block until a network connection is accepted (active mode only).
int pcap_remoteact_close (const char *host, char *errbuf)
 Drop an active connection (active mode only).
void pcap_remoteact_cleanup ()
 Clean the socket that is currently used in waiting active connections.
int pcap_remoteact_list (char *hostlist, char sep, int size, char *errbuf)
 Return the hostname of the host that have an active connection with us (active mode only).

Unix-compatible Functions

These functions are part of the libpcap library, and therefore work both on Windows and on Linux.

+
Note:
errbuf in pcap_open_live(), pcap_open_dead(), pcap_open_offline(), pcap_setnonblock(), pcap_getnonblock(), pcap_findalldevs(), pcap_lookupdev(), and pcap_lookupnet() is assumed to be able to hold at least PCAP_ERRBUF_SIZE chars.
+

typedef void(* pcap_handler )(u_char *user, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
 Prototype of the callback function that receives the packets.
pcap_tpcap_open_live (const char *device, int snaplen, int promisc, int to_ms, char *ebuf)
 Open a live capture from the network.
pcap_tpcap_open_dead (int linktype, int snaplen)
 Create a pcap_t structure without starting a capture.
pcap_tpcap_open_offline (const char *fname, char *errbuf)
 Open a savefile in the tcpdump/libpcap format to read packets.
pcap_dumper_tpcap_dump_open (pcap_t *p, const char *fname)
 Open a file to write packets.
int pcap_setnonblock (pcap_t *p, int nonblock, char *errbuf)
 Switch between blocking and nonblocking mode.
int pcap_getnonblock (pcap_t *p, char *errbuf)
 Get the "non-blocking" state of an interface.
int pcap_findalldevs (pcap_if_t **alldevsp, char *errbuf)
 Construct a list of network devices that can be opened with pcap_open_live().
void pcap_freealldevs (pcap_if_t *alldevsp)
 Free an interface list returned by pcap_findalldevs().
char * pcap_lookupdev (char *errbuf)
 Return the first valid device in the system.
int pcap_lookupnet (const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf)
 Return the subnet and netmask of an interface.
int pcap_dispatch (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets.
int pcap_loop (pcap_t *p, int cnt, pcap_handler callback, u_char *user)
 Collect a group of packets.
u_char * pcap_next (pcap_t *p, struct pcap_pkthdr *h)
 Return the next available packet.
int pcap_next_ex (pcap_t *p, struct pcap_pkthdr **pkt_header, const u_char **pkt_data)
 Read a packet from an interface or from an offline capture.
void pcap_breakloop (pcap_t *)
 set a flag that will force pcap_dispatch() or pcap_loop() to return rather than looping.
int pcap_sendpacket (pcap_t *p, u_char *buf, int size)
 Send a raw packet.
void pcap_dump (u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
 Save a packet to disk.
long pcap_dump_ftell (pcap_dumper_t *)
 Return the file position for a "savefile".
int pcap_compile (pcap_t *p, struct bpf_program *fp, char *str, int optimize, bpf_u_int32 netmask)
 Compile a packet filter, converting an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.
int pcap_compile_nopcap (int snaplen_arg, int linktype_arg, struct bpf_program *program, char *buf, int optimize, bpf_u_int32 mask)
 Compile a packet filter without the need of opening an adapter. This function converts an high level filtering expression (see Filtering expression syntax) in a program that can be interpreted by the kernel-level filtering engine.
int pcap_setfilter (pcap_t *p, struct bpf_program *fp)
 Associate a filter to a capture.
void pcap_freecode (struct bpf_program *fp)
 Free a filter.
int pcap_datalink (pcap_t *p)
 Return the link layer of an adapter.
int pcap_list_datalinks (pcap_t *p, int **dlt_buf)
 list datalinks
int pcap_set_datalink (pcap_t *p, int dlt)
 Set the current data link type of the pcap descriptor to the type specified by dlt. -1 is returned on failure.
int pcap_datalink_name_to_val (const char *name)
 Translates a data link type name, which is a DLT_ name with the DLT_ removed, to the corresponding data link type value. The translation is case-insensitive. -1 is returned on failure.
const char * pcap_datalink_val_to_name (int dlt)
 Translates a data link type value to the corresponding data link type name. NULL is returned on failure.
const char * pcap_datalink_val_to_description (int dlt)
 Translates a data link type value to a short description of that data link type. NULL is returned on failure.
int pcap_snapshot (pcap_t *p)
 Return the dimension of the packet portion (in bytes) that is delivered to the application.
int pcap_is_swapped (pcap_t *p)
 returns true if the current savefile uses a different byte order than the current system.
int pcap_major_version (pcap_t *p)
 return the major version number of the pcap library used to write the savefile.
int pcap_minor_version (pcap_t *p)
 return the minor version number of the pcap library used to write the savefile.
FILE * pcap_file (pcap_t *p)
 Return the standard stream of an offline capture.
int pcap_stats (pcap_t *p, struct pcap_stat *ps)
 Return statistics on current capture.
void pcap_perror (pcap_t *p, char *prefix)
 print the text of the last pcap library error on stderr, prefixed by prefix.
char * pcap_geterr (pcap_t *p)
 return the error text pertaining to the last pcap library error.
char * pcap_strerror (int error)
 Provided in case strerror() isn't available.
const char * pcap_lib_version (void)
 Returns a pointer to a string giving information about the version of the libpcap library being used; note that it contains more information than just a version number.
void pcap_close (pcap_t *p)
 close the files associated with p and deallocates resources.
FILE * pcap_dump_file (pcap_dumper_t *p)
 return the standard I/O stream of the 'savefile' opened by pcap_dump_open().
int pcap_dump_flush (pcap_dumper_t *p)
 Flushes the output buffer to the ``savefile,'' so that any packets written with pcap_dump() but not yet written to the ``savefile'' will be written. -1 is returned on error, 0 on success.
void pcap_dump_close (pcap_dumper_t *p)
 Closes a savefile.
+
+ +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WpdPack_4_1_2/docs/html/funcs_2pcap_8h_source.html b/libs/WpdPack_4_1_2/docs/html/funcs_2pcap_8h_source.html new file mode 100644 index 00000000..487998c3 --- /dev/null +++ b/libs/WpdPack_4_1_2/docs/html/funcs_2pcap_8h_source.html @@ -0,0 +1,206 @@ + + + + +WinPcap: pcap.h Source File + + + + + + + +
+

+documentation. Copyright (c) 2002-2005 Politecnico di Torino. Copyright (c) 2005-2009 +CACE Technologies. All rights reserved.

diff --git a/libs/WinPcap-413-173-b4/docs/html/functions.html b/libs/WpdPack_4_1_2/docs/html/functions.html similarity index 81% rename from libs/WinPcap-413-173-b4/docs/html/functions.html rename to libs/WpdPack_4_1_2/docs/html/functions.html index 36273bcd..fa463f11 100644 --- a/libs/WinPcap-413-173-b4/docs/html/functions.html +++ b/libs/WpdPack_4_1_2/docs/html/functions.html @@ -2,54 +2,36 @@ - - WinPcap: Data Fields - - - + -
-
- - - - - - -
-
WinPcap -  4.1.3 -
-
-
- - -