Go to the documentation of this file.
50 #ifdef HAVE_AIRPCAP_API
53 #if !defined(AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_)
54 #define AIRPCAP_HANDLE__EAE405F5_0171_9592_B3C2_C19EC426AD34__DEFINED_
64 #define PACKET_MODE_CAPT 0x0
65 #define PACKET_MODE_STAT 0x1
66 #define PACKET_MODE_MON 0x2
67 #define PACKET_MODE_DUMP 0x10
68 #define PACKET_MODE_STAT_DUMP MODE_DUMP | MODE_STAT
72 #define Packet_ALIGNMENT sizeof(int)
73 #define Packet_WORDALIGN(x) (((x)+(Packet_ALIGNMENT-1))&~(Packet_ALIGNMENT-1))
76 #define NdisMediumNull -1
77 #define NdisMediumCHDLC -2
78 #define NdisMediumPPPSerial -3
79 #define NdisMediumBare80211 -4
80 #define NdisMediumRadio80211 -5
81 #define NdisMediumPpi -6
84 #define NPF_DISABLE_LOOPBACK 1
85 #define NPF_ENABLE_LOOPBACK 2
101 #ifndef BPF_MAJOR_VERSION
184 #define DOSNAMEPREFIX TEXT("Packet_")
185 #define MAX_LINK_NAME_LENGTH 64 //< Maximum length of the devices symbolic links
186 #define NMAX_PACKET 65535
201 #define ADAPTER_NAME_LENGTH 256 + 12
202 #define ADAPTER_DESC_LENGTH 128
203 #define MAX_MAC_ADDR_LENGTH 8
204 #define MAX_NETWORK_ADDRESSES 16
210 #define INFO_FLAG_NDIS_ADAPTER 0
211 #define INFO_FLAG_NDISWAN_ADAPTER 1
212 #define INFO_FLAG_DAG_CARD 2
213 #define INFO_FLAG_DAG_FILE 6
214 #define INFO_FLAG_DONT_EXPORT 8
215 #define INFO_FLAG_AIRPCAP_CARD 16
216 #define INFO_FLAG_NPFIM_DEVICE 32
243 #ifdef HAVE_AIRPCAP_API
245 #endif // HAVE_AIRPCAP_API
247 #ifdef HAVE_NPFIM_API
249 #endif // HAVE_NPFIM_API
254 struct timeval DagReadTimeout;
256 DWORD DagFastProcess;
257 #endif // HAVE_DAG_API
346 BOOLEAN
PacketStartOem(PCHAR errorString, UINT errorStringLength);
347 BOOLEAN
PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags);
353 #define PACKET_START_OEM_NO_NETMON 0x00000001
struct bpf_insn * bf_insns
A pointer to the first instruction of the program.
BOOLEAN PacketSetReadTimeout(LPADAPTER AdapterObject, int timeout)
struct _PACKET * LPPACKET
ULONGLONG LinkSpeed
The speed of the network in bits per second.
INT PacketSendPackets(LPADAPTER AdapterObject, PVOID PacketBuff, ULONG Size, BOOLEAN Sync)
BOOLEAN PacketGetNetInfoEx(PCHAR AdapterName, npf_if_addr *buffer, PLONG NEntries)
Structure that contains a group of packets coming from the driver.
WAN_ADAPTER * PWAN_ADAPTER
Describes an opened wan (dialup, VPN...) network adapter using the NetMon API.
BOOLEAN PacketReceivePacket(LPADAPTER AdapterObject, LPPACKET lpPacket, BOOLEAN Sync)
Structure containing an OID request.
UINT Length
Length of the buffer.
ULONG Oid
for a complete list of valid codes.
ULONG Length
Length of the data field.
Describes an opened network adapter.
#define MAX_LINK_NAME_LENGTH
LPPACKET PacketAllocatePacket(void)
BOOLEAN PacketGetNetType(LPADAPTER AdapterObject, NetType *type)
DWORD ulBytesReceived
received by the last call to PacketReceivePacket()
CHAR Name[ADAPTER_NAME_LENGTH]
UINT bh_datalen
Original length of packet.
BOOLEAN PacketSetMode(LPADAPTER AdapterObject, int mode)
BOOLEAN PacketStartOemEx(PCHAR errorString, UINT errorStringLength, ULONG flags)
struct _AirpcapHandle * PAirpcapHandle
BOOLEAN PacketSetHwFilter(LPADAPTER AdapterObject, ULONG Filter)
int k
Generic field used for various purposes.
A single BPF pseudo-instruction.
PCHAR PacketGetDriverVersion()
struct sockaddr_storage IPAddress
IP address.
struct NetType NetType
Network type structure.
UINT ReadTimeOut
ReadEvent will be signaled, also if no packets were captured.
int NumWrites
on the wire.
PVOID Buffer
details about the organization of the data in this buffer
BOOLEAN PacketSetDumpName(LPADAPTER AdapterObject, void *name, int len)
HANDLE PacketGetReadEvent(LPADAPTER AdapterObject)
BOOLEAN PacketIsDumpEnded(LPADAPTER AdapterObject, BOOLEAN sync)
UINT len
Length of the original packet (off wire).
LPADAPTER PacketOpenAdapter(PCHAR AdapterName)
Addresses of a network adapter.
struct sockaddr_storage Broadcast
Broadcast address.
BOOLEAN PacketSetBpf(LPADAPTER AdapterObject, struct bpf_program *fp)
BOOLEAN PacketGetStats(LPADAPTER AdapterObject, struct bpf_stat *s)
BOOLEAN PacketSetBuff(LPADAPTER AdapterObject, int dim)
struct _ADAPTER ADAPTER
Describes an opened network adapter.
UINT bf_len
Indicates the number of instructions of the program, i.e. the number of struct bpf_insn that will fol...
BOOLEAN PacketSetNumWrites(LPADAPTER AdapterObject, int nwrites)
Structure that contains a couple of statistics values on the current capture.
UINT Flags
Adapter's flags. Tell if this adapter must be treated in a different way, using the Netmon API or the...
struct sockaddr_storage SubnetMask
Netmask for that address.
UINT ps_ifdrop
drops by interface. XXX not yet supported
BOOLEAN PacketSetMinToCopy(LPADAPTER AdapterObject, int nbytes)
VOID PacketInitPacket(LPPACKET lpPacket, PVOID Buffer, UINT Length)
BOOLEAN PacketRequest(LPADAPTER AdapterObject, BOOLEAN Set, PPACKET_OID_DATA OidData)
struct WAN_ADAPTER_INT WAN_ADAPTER
Describes an opened wan (dialup, VPN...) network adapter using the NetMon API.
struct _PACKET_OID_DATA * PPACKET_OID_DATA
struct npf_if_addr npf_if_addr
Addresses of a network adapter.
BOOLEAN PacketStartOem(PCHAR errorString, UINT errorStringLength)
UINT LinkType
The MAC of the current network adapter (see function PacketGetNetType() for more information)
BOOLEAN PacketSetLoopbackBehavior(LPADAPTER AdapterObject, UINT LoopbackBehavior)
struct _PACKET PACKET
Structure that contains a group of packets coming from the driver.
INT PacketSetSnapLen(LPADAPTER AdapterObject, int snaplen)
struct timeval bh_tstamp
It is stored in a TimeVal structure.
UINT bs_capt
thus reach the application.
BOOLEAN PacketSetDumpLimits(LPADAPTER AdapterObject, UINT maxfilesize, UINT maxnpacks)
A BPF pseudo-assembly program.
CHAR SymbolicLink[MAX_LINK_NAME_LENGTH]
USHORT code
Instruction type and addressing mode.
struct _ADAPTER * LPADAPTER
struct timeval ts
Time stamp of the packet.
BOOLEAN PacketSendPacket(LPADAPTER AdapterObject, LPPACKET pPacket, BOOLEAN Sync)
BOOLEAN PacketGetAdapterNames(PTSTR pStr, PULONG BufferSize)
VOID PacketCloseAdapter(LPADAPTER lpAdapter)
#define ADAPTER_NAME_LENGTH
Maximum length for the name of an adapter. The value is the same used by the IP Helper API.
UCHAR Data[1]
from the adapter.
BOOLEAN PacketGetStatsEx(LPADAPTER AdapterObject, struct bpf_stat *s)
VOID PacketFreePacket(LPPACKET lpPacket)
PAirpcapHandle PacketGetAirPcapHandle(LPADAPTER AdapterObject)
soem
Author(s): Arthur Ketels and M.J.G. van den Molengraft
autogenerated on Wed Mar 2 2022 01:01:49