#include <Packet.h>
Data Fields | |
PDEVICE_EXTENSION | DeviceExtension |
NDIS_HANDLE | AdapterHandle |
NDIS idetifier of the adapter used by this instance. | |
UINT | Medium |
NDIS_HANDLE | PacketPool |
Pool of NDIS_PACKET structures used to transfer the packets from and to the NIC driver. | |
PIRP | OpenCloseIrp |
KSPIN_LOCK | RequestSpinLock |
SpinLock used to synchronize the OID requests. | |
LIST_ENTRY | RequestList |
List of pending OID requests. | |
LIST_ENTRY | ResetIrpList |
List of pending adapter reset requests. | |
INTERNAL_REQUEST | Requests [MAX_REQUESTS] |
Array of structures that wrap every single OID request. | |
PMDL | BufferMdl |
Pointer to a Memory descriptor list (MDL) that maps the circular buffer's memory. | |
PKEVENT | ReadEvent |
Pointer to the event on which the read calls on this instance must wait. | |
HANDLE | ReadEventHandle |
Handle of the event on which the read calls on this instance must wait. | |
UNICODE_STRING | ReadEventName |
PUCHAR | bpfprogram |
JIT_BPF_Filter * | Filter |
UINT | MinToCopy |
LARGE_INTEGER | TimeOut |
int | mode |
Working mode of the driver. See PacketSetMode() for details. | |
LARGE_INTEGER | Nbytes |
Amount of bytes accepted by the filter when this instance is in statistical mode. | |
LARGE_INTEGER | Npackets |
Number of packets accepted by the filter when this instance is in statistical mode. | |
NDIS_SPIN_LOCK | CountersLock |
SpinLock that protects the statistical mode counters. | |
UINT | Nwrites |
UINT | Multiple_Write_Counter |
Counts the number of times a single write has already physically repeated. | |
NDIS_EVENT | WriteEvent |
Event used to synchronize the multiple write process. | |
NDIS_EVENT | IOEvent |
Event used to synchronize I/O requests with the callback structure of NDIS. | |
NDIS_STATUS | IOStatus |
Maintains the status of and OID request call, that will be passed to the application. | |
BOOLEAN | Bound |
HANDLE | DumpFileHandle |
Handle of the file used in dump mode. | |
PFILE_OBJECT | DumpFileObject |
Pointer to the object of the file used in dump mode. | |
PKTHREAD | DumpThreadObject |
Pointer to the object of the thread used in dump mode. | |
HANDLE | DumpThreadHandle |
Handle of the thread created by dump mode to asynchronously move the buffer to disk. | |
NDIS_EVENT | DumpEvent |
Event used to synchronize the dump thread with the tap when the instance is in dump mode. | |
LARGE_INTEGER | DumpOffset |
Current offset in the dump file. | |
UNICODE_STRING | DumpFileName |
String containing the name of the dump file. | |
UINT | MaxDumpBytes |
UINT | MaxDumpPacks |
BOOLEAN | DumpLimitReached |
MEM_TYPE | mem_ex |
Memory used by the TME virtual co-processor. | |
TME_CORE | tme |
Data structure containing the virtualization of the TME co-processor. | |
NDIS_SPIN_LOCK | MachineLock |
SpinLock that protects the mem_ex buffer. | |
UINT | MaxFrameSize |
CpuPrivateData | CpuData [32] |
Pool of kernel buffer structures, one for each CPU. | |
ULONG | ReaderSN |
Sequence number of the next packet to be read from the pool of kernel buffers. | |
ULONG | WriterSN |
ULONG | Size |
Size of each kernel buffer contained in the CpuData field. | |
ULONG | SkipProcessing |
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 314 of file Packet.h.
|
NDIS idetifier of the adapter used by this instance.
Definition at line 318 of file Packet.h. Referenced by NPF_BufferedWrite(), NPF_Close(), NPF_IoControl(), NPF_Open(), NPF_OpenAdapterComplete(), NPF_tap(), NPF_UnbindAdapter(), and NPF_Write(). |
|
Specifies if NPF is still bound to the adapter used by this instance. Bound can be FALSE if a Plug and Play adapter has been removed or disabled by the user. Definition at line 357 of file Packet.h. Referenced by NPF_BufferedWrite(), NPF_Close(), NPF_CloseAdapterComplete(), NPF_Open(), NPF_Read(), NPF_UnbindAdapter(), and NPF_Write(). |
|
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 335 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_IoControl(), NPF_Open(), and NPF_tap(). |
|
Pointer to a Memory descriptor list (MDL) that maps the circular buffer's memory.
|
|
SpinLock that protects the statistical mode counters.
Definition at line 350 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_Read(), and NPF_tap(). |
|
Pool of kernel buffer structures, one for each CPU.
Definition at line 378 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_IoControl(), NPF_Read(), NPF_tap(), and NPF_TransferDataComplete(). |
|
Pointer to the _DEVICE_EXTENSION structure of the device on which the instance is bound. Definition at line 316 of file Packet.h. Referenced by NPF_Open(). |
|
Event used to synchronize the dump thread with the tap when the instance is in dump mode.
Definition at line 363 of file Packet.h. Referenced by NPF_Close(), NPF_DumpThread(), NPF_Open(), NPF_tap(), NPF_TransferDataComplete(), and NPF_UnbindAdapter(). |
|
Handle of the file used in dump mode.
Definition at line 359 of file Packet.h. Referenced by NPF_Close(), NPF_CloseDumpFile(), NPF_IoControl(), NPF_Open(), NPF_OpenDumpFile(), NPF_Read(), NPF_StartDump(), and NPF_UnbindAdapter(). |
|
String containing the name of the dump file.
Definition at line 365 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_CloseDumpFile(), NPF_IoControl(), and NPF_Open(). |
|
Pointer to the object of the file used in dump mode.
Definition at line 360 of file Packet.h. Referenced by NPF_CloseDumpFile(), NPF_OpenDumpFile(), NPF_SaveCurrentBuffer(), and NPF_StartDump(). |
|
TRUE if the maximum dimension of the dump file (MaxDumpBytes or MaxDumpPacks) is reached. Definition at line 371 of file Packet.h. Referenced by NPF_DumpThread(), NPF_IoControl(), NPF_Open(), NPF_SaveCurrentBuffer(), and NPF_tap(). |
|
Current offset in the dump file.
Definition at line 364 of file Packet.h. Referenced by NPF_CloseDumpFile(), NPF_DumpThread(), NPF_Read(), NPF_SaveCurrentBuffer(), and NPF_StartDump(). |
|
Handle of the thread created by dump mode to asynchronously move the buffer to disk.
Definition at line 362 of file Packet.h. Referenced by NPF_StartDump(). |
|
Pointer to the object of the thread used in dump mode.
Definition at line 361 of file Packet.h. Referenced by NPF_Close(), and NPF_StartDump(). |
|
Pointer to the native filtering function created by the jitter. See BPF_jitter() for details. Definition at line 340 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_IoControl(), and NPF_tap(). |
|
Event used to synchronize I/O requests with the callback structure of NDIS.
Definition at line 355 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_IoControl(), NPF_Open(), NPF_RequestComplete(), and NPF_UnbindAdapter(). |
|
Maintains the status of and OID request call, that will be passed to the application.
Definition at line 356 of file Packet.h. Referenced by NPF_IoControl(), and NPF_RequestComplete(). |
|
SpinLock that protects the mem_ex buffer.
Definition at line 375 of file Packet.h. Referenced by NPF_Open(), NPF_Read(), and NPF_tap(). |
|
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 366 of file Packet.h. Referenced by NPF_IoControl(), and NPF_SaveCurrentBuffer(). |
|
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 368 of file Packet.h. Referenced by NPF_IoControl(), and NPF_tap(). |
|
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 376 of file Packet.h. Referenced by NPF_BufferedWrite(), NPF_Open(), NPF_OpenAdapterComplete(), NPF_RequestComplete(), and NPF_Write(). |
|
Type of physical medium the underlying NDIS driver uses. See the documentation of NdisOpenAdapter in the MS DDK for details. Definition at line 319 of file Packet.h. Referenced by NPF_Open(), and NPF_StartDump(). |
|
Memory used by the TME virtual co-processor.
Definition at line 373 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_IoControl(), NPF_Open(), NPF_OpenAdapterComplete(), and NPF_tap(). |
|
Minimum amount of data in the circular buffer that unlocks a read. Set with the BIOCSMINTOCOPY IOCTL. Definition at line 342 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_Read(), NPF_tap(), and NPF_TransferDataComplete(). |
|
Working mode of the driver. See PacketSetMode() for details.
Definition at line 347 of file Packet.h. Referenced by NPF_Close(), NPF_IoControl(), NPF_Open(), NPF_Read(), NPF_tap(), NPF_TransferDataComplete(), and NPF_UnbindAdapter(). |
|
Counts the number of times a single write has already physically repeated.
Definition at line 353 of file Packet.h. Referenced by NPF_Open(), NPF_SendComplete(), and NPF_Write(). |
|
Amount of bytes accepted by the filter when this instance is in statistical mode.
Definition at line 348 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_Read(), and NPF_tap(). |
|
Number of packets accepted by the filter when this instance is in statistical mode.
Definition at line 349 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_Read(), and NPF_tap(). |
|
Number of times a single write must be physically repeated. See NPF driver internals manual for an explanation Definition at line 351 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_SendComplete(), and NPF_Write(). |
|
Pointer used to store the open/close IRP requests and provide them to the callbacks of NDIS. Definition at line 322 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_Open(), and NPF_OpenAdapterComplete(). |
|
Pool of NDIS_PACKET structures used to transfer the packets from and to the NIC driver.
Definition at line 321 of file Packet.h. Referenced by NPF_BufferedWrite(), NPF_Close(), NPF_CloseAdapterComplete(), NPF_Open(), NPF_OpenAdapterComplete(), NPF_tap(), and NPF_Write(). |
|
Sequence number of the next packet to be read from the pool of kernel buffers.
Definition at line 379 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), and NPF_Read(). |
|
Pointer to the event on which the read calls on this instance must wait.
Definition at line 329 of file Packet.h. Referenced by NPF_Close(), NPF_Open(), NPF_Read(), NPF_SaveCurrentBuffer(), NPF_tap(), NPF_TransferDataComplete(), and NPF_UnbindAdapter(). |
|
Handle of the event on which the read calls on this instance must wait.
Definition at line 330 of file Packet.h. Referenced by NPF_Close(), NPF_Open(), NPF_OpenAdapterComplete(), and NPF_UnbindAdapter(). |
|
Name of the event on which the read calls on this instance must wait. The event is created with a name, so it can be used at user level to know when it is possible to access the driver without being blocked. This fiels stores the name that and is used by the BIOCGEVNAME IOCTL call. Definition at line 331 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_IoControl(), NPF_Open(), and NPF_OpenAdapterComplete(). |
|
List of pending OID requests.
Definition at line 325 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_OpenAdapterComplete(), and NPF_RequestComplete(). |
|
Array of structures that wrap every single OID request.
Definition at line 327 of file Packet.h. Referenced by NPF_Open(). |
|
SpinLock used to synchronize the OID requests.
Definition at line 324 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_OpenAdapterComplete(), NPF_RequestComplete(), and NPF_ResetComplete(). |
|
List of pending adapter reset requests.
Definition at line 326 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), and NPF_ResetComplete(). |
|
Size of each kernel buffer contained in the CpuData field.
Definition at line 382 of file Packet.h. Referenced by NPF_Close(), NPF_CloseAdapterComplete(), NPF_DumpThread(), NPF_IoControl(), NPF_Open(), NPF_Read(), NPF_tap(), and NPF_TransferDataComplete(). |
|
Flag. When set to 1, the tap discards each packet. It is set to 1 by the IOCTLs that modify some "sensible" fields of the Open structure (e.g. they reallocate the pool of kernel buffers, or change the filter program Definition at line 383 of file Packet.h. Referenced by NPF_IoControl(), and NPF_tap(). |
|
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 344 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), and NPF_Read(). |
|
Data structure containing the virtualization of the TME co-processor.
Definition at line 374 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_Read(), and NPF_tap(). |
|
Event used to synchronize the multiple write process.
Definition at line 354 of file Packet.h. Referenced by NPF_Open(), NPF_SendComplete(), and NPF_Write(). |
|
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 380 of file Packet.h. Referenced by NPF_IoControl(), NPF_Open(), NPF_tap(), and NPF_TransferDataComplete(). |
documentation. Copyright (c) 2002-2003 Politecnico di Torino. All rights reserved.