#include "stdarg.h"
#include "ntddk.h"
#include "ntiologc.h"
#include "ndis.h"
#include "ntddpack.h"
#include "debug.h"
#include "packet.h"
#include "win_bpf.h"
#include "win_bpf_filter_init.h"
#include "tme.h"
Go to the source code of this file.
Functions | |
NTSTATUS | DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath) |
The initialization routine of the driver. | |
PWCHAR | getAdaptersList (void) |
PKEY_VALUE_PARTIAL_INFORMATION | getTcpBindings (void) |
BOOLEAN | createDevice (IN OUT PDRIVER_OBJECT adriverObjectP, IN PUNICODE_STRING amacNameP, NDIS_HANDLE aProtoHandle) |
Creates a device for a given MAC. | |
VOID | NPF_Unload (IN PDRIVER_OBJECT DriverObject) |
Function called by the OS when NPF is unloaded. | |
NTSTATUS | NPF_IoControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) |
Handles the IOCTL calls. | |
VOID | NPF_RequestComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_REQUEST NdisRequest, IN NDIS_STATUS Status) |
Ends an OID request. | |
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. | |
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. | |
Variables | |
PDEVICE_EXTENSION | GlobalDeviceExtension |
NDIS_STRING | NPF_Prefix = NDIS_STRING_CONST("NPF_") |
NDIS_STRING | devicePrefix = NDIS_STRING_CONST("\\Device\\") |
NDIS_STRING | symbolicLinkPrefix = NDIS_STRING_CONST("\\DosDevices\\") |
NDIS_STRING | tcpLinkageKeyName |
NDIS_STRING | AdapterListKey |
NDIS_STRING | bindValueName = NDIS_STRING_CONST("Bind") |
WCHAR * | bindP = NULL |
Global variable that points to the names of the bound adapters. | |
time_conv | G_Start_Time |
Global start time. Used as an absolute reference for timestamp conversion. | |
NDIS_SPIN_LOCK | Opened_Instances_Lock |
ULONG | NCpu |
|
Creates a device for a given MAC.
Definition at line 405 of file Packet.c. References _DEVICE_EXTENSION::AdapterName, devicePrefix, _DEVICE_EXTENSION::ExportString, _DEVICE_EXTENSION::NdisProtocolHandle, NPF_Prefix, and symbolicLinkPrefix. Referenced by DriverEntry(). |
|
The initialization routine of the driver.
Definition at line 81 of file Packet.c. References bindP, createDevice(), getAdaptersList(), getTcpBindings(), NCpu, NPF_BindAdapter(), NPF_Close(), NPF_CloseAdapterComplete(), NPF_IoControl(), NPF_Open(), NPF_OpenAdapterComplete(), NPF_Read(), NPF_ReceiveComplete(), NPF_RequestComplete(), NPF_ResetComplete(), NPF_SendComplete(), NPF_Status(), NPF_StatusComplete(), NPF_tap(), NPF_TransferDataComplete(), NPF_UnbindAdapter(), NPF_Unload(), and NPF_Write(). |
|
Definition at line 206 of file Packet.c. References tcpLinkageKeyName. Referenced by DriverEntry(). |
|
Definition at line 333 of file Packet.c. References tcpLinkageKeyName. Referenced by DriverEntry(). |
|
|
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. Definition at line 1354 of file Packet.c. Referenced by NPF_ReadRegistry(). |
|
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. Definition at line 1257 of file Packet.c. References NPF_QueryRegistryRoutine(). |
|
Ends an OID request.
Definition at line 1139 of file Packet.c. References BIOCQUERYOID, BIOCSETOID, _INTERNAL_REQUEST::Internal, _OPEN_INSTANCE::IOEvent, _OPEN_INSTANCE::IOStatus, _INTERNAL_REQUEST::Irp, _INTERNAL_REQUEST::ListElement, _OPEN_INSTANCE::MaxFrameSize, PPACKET_OID_DATA, _INTERNAL_REQUEST::Request, _OPEN_INSTANCE::RequestList, and _OPEN_INSTANCE::RequestSpinLock. Referenced by DriverEntry(), NPF_IoControl(), and NPF_OpenAdapterComplete(). |
|
Callback for NDIS StatusHandler. Not used by NPF.
Definition at line 1224 of file Packet.c. Referenced by DriverEntry(). |
|
Callback for NDIS StatusCompleteHandler. Not used by NPF.
Definition at line 1242 of file Packet.c. Referenced by DriverEntry(). |
|
Function called by the OS when NPF is unloaded.
Definition at line 506 of file Packet.c. References _DEVICE_EXTENSION::AdapterName, _DEVICE_EXTENSION::ExportString, and _DEVICE_EXTENSION::NdisProtocolHandle. Referenced by DriverEntry(). |
|
Initial value: NDIS_STRING_CONST("\\Registry\\Machine\\System" L"\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}") |
|
Global variable that points to the names of the bound adapters.
Definition at line 69 of file Packet.c. Referenced by DriverEntry(). |
|
|
|
Definition at line 59 of file Packet.c. Referenced by createDevice(). |
|
Global start time. Used as an absolute reference for timestamp conversion.
|
|
|
|
Definition at line 75 of file Packet.c. Referenced by DriverEntry(), NPF_IoControl(), NPF_Read(), and NPF_tap(). |
|
Definition at line 58 of file Packet.c. Referenced by createDevice(). |
|
|
|
Definition at line 60 of file Packet.c. Referenced by createDevice(). |
|
Initial value: NDIS_STRING_CONST("\\Registry\\Machine\\System" L"\\CurrentControlSet\\Services\\Tcpip\\Linkage") Definition at line 61 of file Packet.c. Referenced by getAdaptersList(), and getTcpBindings(). |
documentation. Copyright (c) 2002-2003 Politecnico di Torino. All rights reserved.