Use Windbg Latest and Select View->Verbose output it will show you when your filter is being loaded.
Regards
Subodh
Software Architect
Knowledge Architects
+91-9892335325
www.karchitects.com
----- Original Message -----
From: JothiKumar
To: Windows System Software Devs Interest List
Sent: Wednesday, May 05, 2004 3:32 PM
Subject: Re: [ntdev] Request not coming in TDI Filter
Hi,
I modified the installer code to change tag value of my filter,TCPIP,NetBT. After installing my driver, I looked the loading order of my driver(xnetdrv.sys) in registry. Hope It is loading before NetBT.
Group Order key details
Base - 10 00 00 00 0E 00 00 00
01 00 00 00 02 00 00 00
03 00 00 00 04 00 00 00
05 00 00 00 06 00 00 00
07 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00
0B 00 00 00 0C 00 00 00
0D 00 00 00 0F 00 00 00
10 00 00 00
PNP_TDI tag value is as follows
PNP_TDI - 09 00 00 00 02 00 00 00
03 00 00 00 04 00 00 00
06 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00
01 00 00 00 05 00 00 00
My TDI Filter details are as follows in the registry…
Group - PNP_TDI
Start - 0x01
Tag - 0x01
Type - 0x01
TCPIP details are as follows in the registry…
Group - PNP_TDI
Start - 0x01
Tag - 0x04
Type - 0x01
NetBT registry details are as follows
Group - PNP_TDI
Start - 0x01
Tag - 0x05
Type - 0x01
Please confirm me whether my driver is loaded before NetBT or not…
Still i am not getting request in my driver for \machinename
I think, somthing wrong on my stack attachments.
My Code starts here:
++++++++++++++++
NTSTATUS
CreateDevice(IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT PhysicalDeviceObject)
{
UNICODE_STRING
name,
linkname;
NTSTATUS
status;
UNICODE_STRING
str;
PDEVICE_EXTENSION
pDeviceExtension,
pTcpFilterDeviceExt,
pUdpFilterDeviceExt;
PDEVICE_OBJECT
pDeviceControlObject,
pTcpfltDevObject,
pTcpoldDevObject,
pUdpfltDevObject,
pUdpoldDevObject;
// creating device of our own for user mode application
RtlInitUnicodeString(&name, L"\Device\xnetdrv");
status = IoCreateDevice(DriverObject,
DEVICE_EXTENSION_SIZE,
&name,
0,
0,
FALSE,
&pDeviceControlObject);
if (status != STATUS_SUCCESS) {
KdPrint((“[Nortel_tdi_flt] DriverEntry: IoCreateDevice(control): 0x%x!\n”, status));
return status;
}
pDeviceExtension = (PDEVICE_EXTENSION) pDeviceControlObject->DeviceExtension;
RtlZeroMemory(pDeviceExtension,DEVICE_EXTENSION_SIZE);
g_ulServiceKey = 0; //init servicekey
//naming the deviceobject to access by the user mode application
RtlInitUnicodeString(&linkname, L"\??\xnetdrv");
status = IoCreateSymbolicLink(&linkname, &name);
if (status != STATUS_SUCCESS) {
KdPrint((“[Nortel_tdi_flt] DriverEntry: IoCreateSymbolicLink: 0x%x!\n”, status));
return status;
}
//InitializeListHead(&g_AppListHead);
KeInitializeSpinLock(&g_AppListLock);
//KeInitializeSpinLock(&g_query_conn_list_guard);
KeInitializeSpinLock(&g_conn_ctx_list_guard);
KeInitializeSpinLock(&g_nat_list_lock);
KeInitializeSpinLock(&g_irp_list_guard);
KeInitializeSpinLock(&g_network_list_guard);
InitNetworkList();
InitAppList();
InitIRPList();//init the Pended IRP list
InitProcessList();//init the process name and ID list
InitNATList();
InitEventList();
InitQueryConnList();
//InitIrpByProtocol(); //XXX
/* create filter device for TCP*/
status = IoCreateDevice(DriverObject,
DEVICE_EXTENSION_SIZE,
NULL,
FILE_DEVICE_UNKNOWN,
0,
TRUE,
&pTcpfltDevObject);
if (status != STATUS_SUCCESS) {
KdPrint((“[Nortel_tdi_flt] CreateDevice: TCP IoCreateDevice Failed : 0x%x\n”, status));
return status;
}
pTcpFilterDeviceExt = (PDEVICE_EXTENSION) pTcpfltDevObject->DeviceExtension;
RtlZeroMemory(pTcpFilterDeviceExt,DEVICE_EXTENSION_SIZE);
pTcpfltDevObject->Flags |= DO_DIRECT_IO;
//Attach our filter device to stack (lower TCP device )
RtlInitUnicodeString(&str, L"\Device\Tcp");
status = IoAttachDevice(pTcpfltDevObject, &str, &pTcpoldDevObject);
if (status != STATUS_SUCCESS)
{
DbgPrint(“[Nortel_tdi_flt] CreateDevice: IoAttachDevice FAILED: 0x%x\n”, status);
return status;
}
/* create filter device for UDP*/
status = IoCreateDevice(DriverObject,
DEVICE_EXTENSION_SIZE,
NULL,
FILE_DEVICE_UNKNOWN,
0,
TRUE,
&pUdpfltDevObject);
if (status != STATUS_SUCCESS) {
KdPrint((“[Nortel_tdi_flt] CreateDevice: UDP IoCreateDevice failed : 0x%x\n”, status));
return status;
}
pUdpFilterDeviceExt = (PDEVICE_EXTENSION) pUdpfltDevObject->DeviceExtension;
RtlZeroMemory(pUdpFilterDeviceExt ,DEVICE_EXTENSION_SIZE);
pUdpfltDevObject->Flags |= DO_DIRECT_IO;
//Attach our filter device to stack (lower UDP device )
RtlInitUnicodeString(&str, L"\Device\Udp");
status = IoAttachDevice(pUdpfltDevObject, &str, &pUdpoldDevObject);
if (status != STATUS_SUCCESS)
{
DbgPrint(“[Nortel_tdi_flt] CreateDevice: IoAttachDevice FAILED: 0x%x\n”, status);
return status;
}
// bak up the device objects for future ref in the device extension
pTcpFilterDeviceExt->pDevControlObject = pDeviceControlObject;
pTcpFilterDeviceExt->pTcpfltDevObject = pTcpfltDevObject;
pTcpFilterDeviceExt->pTcpoldDevObject = pTcpoldDevObject;
pTcpFilterDeviceExt->pUdpfltDevObject = pUdpfltDevObject;
pTcpFilterDeviceExt->pUdpoldDevObject = pUdpoldDevObject;
pDeviceExtension->pTcpfltDevObject = pTcpfltDevObject;
pDeviceExtension->pDevControlObject = pDeviceControlObject;
pDeviceExtension->pTcpoldDevObject = pTcpoldDevObject;
pDeviceExtension->pUdpfltDevObject = pUdpfltDevObject;
pDeviceExtension->pUdpoldDevObject = pUdpoldDevObject;
pUdpFilterDeviceExt->pDevControlObject = pTcpfltDevObject;
pUdpFilterDeviceExt->pTcpfltDevObject = pDeviceControlObject;
pUdpFilterDeviceExt->pTcpoldDevObject = pTcpoldDevObject;
pUdpFilterDeviceExt->pUdpfltDevObject = pUdpfltDevObject;
pUdpFilterDeviceExt->pUdpoldDevObject = pUdpoldDevObject;
return STATUS_SUCCESS;
}
Anything wrong in my code?
Is there any other way to attach my filter over TCP using IoGetDeviceObjectPointer?
Please send me the details how can i proceed to get request in the filter…
Regards,
Jothi
----- Original Message -----
From: JothiKumar
To: Windows System Software Devs Interest List
Sent: Tuesday, May 04, 2004 5:00 PM
Subject: Re: [ntdev] Request not coming in TDI Filter
Hi,
I have to add some “c” code to change Tag value. Am i correct?
Where to add? In TDI filter itself?
My TDI Filter details are as follows in the registry…
Group - PNP_TDI
Start - 0x01
Tag - 0x01
Type - 0x01
NetBT registry details are as follows
Group - PNP_TDI
Start - 0x01
Tag - 0x05
Type - 0x01
Group Order key details
Base - 10 00 00 00 0E 00 00 00
01 00 00 00 02 00 00 00
03 00 00 00 04 00 00 00
05 00 00 00 06 00 00 00
07 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00
0B 00 00 00 0C 00 00 00
0D 00 00 00 0F 00 00 00
10 00 00 00
Could you please give me what value i have to initialize in the Tag to load my filter before NetBT.
Regards,
Jothi
----- Original Message -----
From: subodh gupta
To: Windows System Software Devs Interest List
Sent: Tuesday, May 04, 2004 2:51 PM
Subject: Re: [ntdev] Request not coming in TDI Filter
http://support.microsoft.com/default.aspx?scid=kb;en-us;q115486
is the key.
Regards
Subodh
Software Architect,
Knowledge Architects,
+91-9892335325
www.karchitects.com
----- Original Message -----
From: JothiKumar
To: Windows System Software Devs Interest List
Sent: Tuesday, May 04, 2004 1:53 PM
Subject: Re: [ntdev] Request not coming in TDI Filter
I downloaded osrloader.exe from OSR. I have doubt, this tool will help to change order of load or not.
As you said, NetBT is loaded before our filter getting loaded. we have to change the load order.
Please give me some more direction to change the load order of my filter.
– jothi
----- Original Message -----
From: subodh gupta
To: Windows System Software Devs Interest List
Sent: Tuesday, May 04, 2004 1:46 PM
Subject: Re: [ntdev] Request not coming in TDI Filter
Change the load order of your filter and make it load before netbt.
Subodh
----- Original Message -----
From: JothiKumar
To: Windows System Software Devs Interest List
Sent: Tuesday, May 04, 2004 1:03 PM
Subject: [ntdev] Request not coming in TDI Filter
Hi,
I am developing TDI filter driver for VPN client.In
my driver I handle both TCP and UDP request
which is coming from the user mode application.
Now my problem is with Network file shared/ Mapped
files/Drive,while accessing this the filesystem will send
this request to network redirector. So windows uses “NetBt”
if this is the case, then all the request of
this “NetBt” should come to tdi filter driver.But I didn’t
get any request in the filter driver while accessing the
network shared files/drive.
Regards,
Jothi
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@softhome.net
To unsubscribe send a blank email to xxxxx@lists.osr.com