Main Page   Modules   Data Structures   File List   Data Fields   Globals  

Packet.c File Reference

#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. More...

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. More...

VOID NPF_Unload (IN PDRIVER_OBJECT DriverObject)
 Function called by the OS when NPF is unloaded. More...

NTSTATUS NPF_IoControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 Handles the IOCTL calls. More...

VOID NPF_RequestComplete (IN NDIS_HANDLE ProtocolBindingContext, IN PNDIS_REQUEST NdisRequest, IN NDIS_STATUS Status)
 Ends an OID request. More...

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. More...

VOID NPF_StatusComplete (IN NDIS_HANDLE ProtocolBindingContext)
 Callback for NDIS StatusCompleteHandler. Not used by NPF. More...

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. More...

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. More...


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. More...

time_conv G_Start_Time
NDIS_SPIN_LOCK Opened_Instances_Lock


Function Documentation

PWCHAR getAdaptersList void   
 

Definition at line 295 of file Packet.c.

References AdapterListKey, and tcpLinkageKeyName.

Referenced by DriverEntry.

PKEY_VALUE_PARTIAL_INFORMATION getTcpBindings void   
 

Definition at line 422 of file Packet.c.

References bindValueName, and tcpLinkageKeyName.

Referenced by DriverEntry.


Variable Documentation

NDIS_STRING AdapterListKey
 

Initial value:

 NDIS_STRING_CONST("\\Registry\\Machine\\System"
                                L"\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}")

Definition at line 52 of file Packet.c.

Referenced by getAdaptersList.

WCHAR* bindP = NULL
 

Global variable that points to the names of the bound adapters.

Definition at line 58 of file Packet.c.

Referenced by DriverEntry, and NPF_Unload.

NDIS_STRING bindValueName = NDIS_STRING_CONST("Bind")
 

Definition at line 54 of file Packet.c.

Referenced by getTcpBindings.

NDIS_STRING devicePrefix = NDIS_STRING_CONST("\\Device\\")
 

Definition at line 48 of file Packet.c.

Referenced by createDevice.

struct time_conv G_Start_Time
 

Definition at line 60 of file Packet.c.

Referenced by NPF_IoControl.

PDEVICE_EXTENSION GlobalDeviceExtension
 

Definition at line 42 of file Packet.c.

NDIS_STRING NPF_Prefix = NDIS_STRING_CONST("NPF_")
 

Definition at line 47 of file Packet.c.

Referenced by createDevice.

NDIS_SPIN_LOCK Opened_Instances_Lock
 

Definition at line 62 of file Packet.c.

Referenced by DriverEntry.

NDIS_STRING symbolicLinkPrefix = NDIS_STRING_CONST("\\DosDevices\\")
 

Definition at line 49 of file Packet.c.

NDIS_STRING tcpLinkageKeyName
 

Initial value:

 NDIS_STRING_CONST("\\Registry\\Machine\\System"
                                L"\\CurrentControlSet\\Services\\Tcpip\\Linkage")

Definition at line 50 of file Packet.c.

Referenced by getAdaptersList, and getTcpBindings.


documentation. Copyright (c) 2002 Politecnico di Torino. All rights reserved.