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(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 
108 
109 #ifdef __cplusplus
110 }
111 #endif
112 
113 #endif //__WIN32_EXTENSIONS_H__
pcap_stats_ex
struct pcap_stat * pcap_stats_ex(pcap_t *p, int *pcap_stat_size)
pcap_send_queue::maxlen
u_int maxlen
Maximum size of the the queue, in bytes. This variable contains the size of the buffer field.
Definition: Win32-Extensions.h:48
pcap_offline_filter
int pcap_offline_filter(struct bpf_program *prog, const struct pcap_pkthdr *header, const u_char *pkt_data)
pcap_send_queue::len
u_int len
Current size of the queue, in bytes.
Definition: Win32-Extensions.h:49
pcap_send_queue::buffer
char * buffer
Buffer containing the packets to be sent.
Definition: Win32-Extensions.h:50
pcap_sendqueue_transmit
u_int pcap_sendqueue_transmit(pcap_t *p, pcap_send_queue *queue, int sync)
pcap_t
struct pcap pcap_t
Definition: pcap/pcap.h:87
PAirpcapHandle
struct _AirpcapHandle * PAirpcapHandle
Definition: Packet32.h:55
pcap_pkthdr
Definition: pcap/pcap.h:167
pcap_start_oem
int pcap_start_oem(char *err_str, int flags)
pcap_sendqueue_destroy
void pcap_sendqueue_destroy(pcap_send_queue *queue)
pcap_live_dump
int pcap_live_dump(pcap_t *p, char *filename, int maxsize, int maxpacks)
pcap_stat
Definition: pcap/pcap.h:176
pcap_sendqueue_alloc
pcap_send_queue * pcap_sendqueue_alloc(u_int memsize)
pcap_sendqueue_queue
int pcap_sendqueue_queue(pcap_send_queue *queue, const struct pcap_pkthdr *pkt_header, const u_char *pkt_data)
pcap_getevent
HANDLE pcap_getevent(pcap_t *p)
pcap_get_airpcap_handle
PAirpcapHandle pcap_get_airpcap_handle(pcap_t *p)
bpf_program
A BPF pseudo-assembly program.
Definition: Packet32.h:108
pcap_setuserbuffer
int pcap_setuserbuffer(pcap_t *p, int size)
pcap_live_dump_ended
int pcap_live_dump_ended(pcap_t *p, int sync)
PAirpcapHandle
struct _AirpcapHandle * PAirpcapHandle
Definition: Win32-Extensions.h:60
filename
char filename[256]
Definition: linux/firm_update/firm_update.c:28
pcap_send_queue
A queue of raw packets that will be sent to the network with pcap_sendqueue_transmit().
Definition: Win32-Extensions.h:46


soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49