+/*\r
+ * Copyright (c) 1999 - 2005 NetGroup, Politecnico di Torino (Italy)\r
+ * Copyright (c) 2005 - 2006 CACE Technologies, Davis (California)\r
+ * All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions\r
+ * are met:\r
+ *\r
+ * 1. Redistributions of source code must retain the above copyright\r
+ * notice, this list of conditions and the following disclaimer.\r
+ * 2. Redistributions in binary form must reproduce the above copyright\r
+ * notice, this list of conditions and the following disclaimer in the\r
+ * documentation and/or other materials provided with the distribution.\r
+ * 3. Neither the name of the Politecnico di Torino, CACE Technologies \r
+ * nor the names of its contributors may be used to endorse or promote \r
+ * products derived from this software without specific prior written \r
+ * permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+ */\r
+\r
+\r
+#ifndef __WIN32_EXTENSIONS_H__\r
+#define __WIN32_EXTENSIONS_H__\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/* Definitions */\r
+\r
+/*!\r
+ \brief A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().\r
+*/\r
+struct pcap_send_queue\r
+{\r
+ u_int maxlen; ///< Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.\r
+ u_int len; ///< Current size of the queue, in bytes.\r
+ char *buffer; ///< Buffer containing the packets to be sent.\r
+};\r
+\r
+typedef struct pcap_send_queue pcap_send_queue;\r
+\r
+/*!\r
+ \brief This typedef is a support for the pcap_get_airpcap_handle() function\r
+*/\r
+#if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)\r
+#define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_\r
+typedef struct _AirpcapHandle *PAirpcapHandle;\r
+#endif\r
+\r
+#define BPF_MEM_EX_IMM 0xc0\r
+#define BPF_MEM_EX_IND 0xe0\r
+\r
+/*used for ST*/\r
+#define BPF_MEM_EX 0xc0\r
+#define BPF_TME 0x08\r
+\r
+#define BPF_LOOKUP 0x90 \r
+#define BPF_EXECUTE 0xa0\r
+#define BPF_INIT 0xb0\r
+#define BPF_VALIDATE 0xc0\r
+#define BPF_SET_ACTIVE 0xd0\r
+#define BPF_RESET 0xe0\r
+#define BPF_SET_MEMORY 0x80\r
+#define BPF_GET_REGISTER_VALUE 0x70\r
+#define BPF_SET_REGISTER_VALUE 0x60\r
+#define BPF_SET_WORKING 0x50\r
+#define BPF_SET_ACTIVE_READ 0x40\r
+#define BPF_SET_AUTODELETION 0x30\r
+#define BPF_SEPARATION 0xff\r
+\r
+/* Prototypes */\r
+pcap_send_queue* pcap_sendqueue_alloc(u_int memsize);\r
+\r
+void pcap_sendqueue_destroy(pcap_send_queue* queue);\r
+\r
+int pcap_sendqueue_queue(pcap_send_queue* queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data);\r
+\r
+u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue* queue, int sync);\r
+\r
+HANDLE pcap_getevent(pcap_t *p);\r
+\r
+struct pcap_stat *pcap_stats_ex(pcap_t *p, int *pcap_stat_size);\r
+\r
+int pcap_setuserbuffer(pcap_t *p, int size);\r
+\r
+int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks);\r
+\r
+int pcap_live_dump_ended(pcap_t *p, int sync);\r
+\r
+int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data);\r
+\r
+int pcap_start_oem(char* err_str, int flags);\r
+\r
+PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p);\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+#endif //__WIN32_EXTENSIONS_H__\r