TDI_CONNECT IRP problem

hi,
i am using a TDI filter to do some testing. Now??I can get TDI_CONNECT IRP,
get IO_STACK_LOCATION by IoGetCurrentIrpStackLocation, and print these information
, such as ipaddress, port…
Now, I want to know, how can I do modify the IRP information, and let it connnect
another ipaddress?
For example, I connect 192.168.200.232(a fake ip address) in the user space with WinSock.
In the TDI driver, I modify the 192.168.200.232 to 10.1.0.232(one ip in my lan box).
Best Regards
Ouyang Kai

Here is code to change remote port of in TDI_CONNECT

PTDI_REQUEST_KERNEL_CONNECT request = (PTDI_REQUEST_KERNEL_CONNECT)
(&Irps->Parameters) ;
TA_ADDRESS *remote_addr = ((TRANSPORT_ADDRESS
*)(request->RequestConnectionInformation->RemoteAddress))->Address ;

// Changing Remote Addr to 10.1.0.232 == ntohl () ==> 0xE800010A
((TDI_ADDRESS_IP *) (remote_addr->Address))->in_addr = 0xE800010A ;

Cheers
Rajesh
----- Original Message -----
From: “oyk”
To: “Windows System Software Devs Interest List”
Sent: Friday, April 02, 2004 8:59 AM
Subject: [ntdev] TDI_CONNECT IRP problem

hi,
i am using a TDI filter to do some testing. Now£¬I can get TDI_CONNECT
IRP,
get IO_STACK_LOCATION by IoGetCurrentIrpStackLocation, and print these
information
, such as ipaddress, port…
Now, I want to know, how can I do modify the IRP information, and let it
connnect
another ipaddress?
For example, I connect 192.168.200.232(a fake ip address) in the user
space with WinSock.
In the TDI driver, I modify the 192.168.200.232 to 10.1.0.232(one ip in my
lan box).
Best Regards
Ouyang Kai


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@hotmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi??Rajesh Nikam

Thank your help!
I test the SSH connection, it is no problem.
About the Windows folder sharing, it does not work.
I use the SCManager to load the TDI filter driver, without rebooting my winxp box.
What else work should I do?

Best Regards
Ouyang Kai

Here is code to change remote port of in TDI_CONNECT

PTDI_REQUEST_KERNEL_CONNECT request = (PTDI_REQUEST_KERNEL_CONNECT)
(&Irps->Parameters) ;
TA_ADDRESS *remote_addr = ((TRANSPORT_ADDRESS
*)(request->RequestConnectionInformation->RemoteAddress))->Address ;

// Changing Remote Addr to 10.1.0.232 == ntohl () ==> 0xE800010A
((TDI_ADDRESS_IP *) (remote_addr->Address))->in_addr = 0xE800010A ;

Cheers
Rajesh
----- Original Message -----
From: “oyk”
>To: “Windows System Software Devs Interest List”
>Sent: Friday, April 02, 2004 8:59 AM
>Subject: [ntdev] TDI_CONNECT IRP problem
>
>
>hi,
> i am using a TDI filter to do some testing. Now??I can get TDI_CONNECT
>IRP,
>get IO_STACK_LOCATION by IoGetCurrentIrpStackLocation, and print these
>information
>, such as ipaddress, port…
> Now, I want to know, how can I do modify the IRP information, and let it
>connnect
>another ipaddress?
> For example, I connect 192.168.200.232(a fake ip address) in the user
>space with WinSock.
>In the TDI driver, I modify the 192.168.200.232 to 10.1.0.232(one ip in my
>lan box).
>Best Regards
> Ouyang Kai
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>.

I test the SSH connection, it is no problem.
About the Windows folder sharing, it does not work.
=>
For file sharing problem exists means now all traffic of original
destination will be diverted to
to changed machine. What do you mean by file sharing does not work ?

I use the SCManager to load the TDI filter driver, without rebooting my
winxp box.
What else work should I do?

Best Regards
Ouyang Kai

Here is code to change remote port of in TDI_CONNECT

PTDI_REQUEST_KERNEL_CONNECT request = (PTDI_REQUEST_KERNEL_CONNECT)
(&Irps->Parameters) ;
TA_ADDRESS *remote_addr = ((TRANSPORT_ADDRESS
*)(request->RequestConnectionInformation->RemoteAddress))->Address ;

// Changing Remote Addr to 10.1.0.232 == ntohl () ==> 0xE800010A
((TDI_ADDRESS_IP *) (remote_addr->Address))->in_addr = 0xE800010A ;

Cheers
Rajesh
----- Original Message -----
From: “oyk”
>To: “Windows System Software Devs Interest List”
>Sent: Friday, April 02, 2004 8:59 AM
>Subject: [ntdev] TDI_CONNECT IRP problem
>
>
>hi,
> i am using a TDI filter to do some testing. Now£¬I can get TDI_CONNECT
>IRP,
>get IO_STACK_LOCATION by IoGetCurrentIrpStackLocation, and print these
>information
>, such as ipaddress, port…
> Now, I want to know, how can I do modify the IRP information, and let it
>connnect
>another ipaddress?
> For example, I connect 192.168.200.232(a fake ip address) in the user
>space with WinSock.
>In the TDI driver, I modify the 192.168.200.232 to 10.1.0.232(one ip in my
>lan box).
>Best Regards
> Ouyang Kai
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>—
>Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@hotmail.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi??Rajesh Nikam

For file sharing problem exists means now all traffic of original
destination will be diverted to
to changed machine. What do you mean by file sharing does not work ?

Yes, The fellow are my testing.
I change IP from 192.168.0.232 to 10.1.0.232.
I can use ‘net use * \10.1.0.232\Video’ or '\10.1.0.232’successfully.
I try to use ‘net use * \192.168.0.232\Video’ or ‘\192.168.0.232’,
it fails.
The Dbg info shows the ip address is changed.

Best Regards
Ouyang Kai

Loading TDI filter driver using SCM is a bad idea. NetBT opens the file object long before your driver is started.
Set the load order properly so that your filter starts before NetBT. Your file sharing will work

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of oyk
Sent: Thursday, April 01, 2004 10:00 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] TDI_CONNECT IRP problem

Hi$B!$(JRajesh Nikam
>For file sharing problem exists means now all traffic of original
>destination will be diverted to to changed machine. What do
you mean by
>file sharing does not work ?
>
Yes, The fellow are my testing.
I change IP from 192.168.0.232 to 10.1.0.232.
I can use ‘net use * \10.1.0.232\Video’ or
'\10.1.0.232’successfully.
I try to use ‘net use * \192.168.0.232\Video’ or
‘\192.168.0.232’, it fails.
The Dbg info shows the ip address is changed.

Best Regards
Ouyang Kai


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi??Srin_Kumar
If I want to dynamic load/unload my filter driver, how can I do?
Best Regards
Ouyang Kai

Loading TDI filter driver using SCM is a bad idea. NetBT opens the file object long before your driver is started.
Set the load order properly so that your filter starts before NetBT. Your file sharing will work

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
> Sent: Thursday, April 01, 2004 10:00 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>
> Hi$B!$(JRajesh Nikam
> >For file sharing problem exists means now all traffic of original
> >destination will be diverted to to changed machine. What do
> you mean by
> >file sharing does not work ?
> >
> Yes, The fellow are my testing.
> I change IP from 192.168.0.232 to 10.1.0.232.
> I can use ‘net use * \10.1.0.232\Video’ or
> '\10.1.0.232’successfully.
> I try to use ‘net use * \192.168.0.232\Video’ or
> ‘\192.168.0.232’, it fails.
> The Dbg info shows the ip address is changed.
>
> Best Regards
> Ouyang Kai
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
To unsubscribe send a blank email to xxxxx@lists.osr.com

.

You cannot. Plain and simple.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “oyk”
To: “Windows System Software Devs Interest List”
Sent: Sunday, April 04, 2004 3:00 PM
Subject: RE: [ntdev] TDI_CONNECT IRP problem

> Hi??Srin_Kumar
> If I want to dynamic load/unload my filter driver, how can I do?
> Best Regards
> Ouyang Kai
> >Loading TDI filter driver using SCM is a bad idea. NetBT opens the file
object long before your driver is started.
> >Set the load order properly so that your filter starts before NetBT. Your
file sharing will work
> >
> >> -----Original Message-----
> >> From: xxxxx@lists.osr.com
> >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
> >> Sent: Thursday, April 01, 2004 10:00 AM
> >> To: Windows System Software Devs Interest List
> >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
> >>
> >> Hi$B!$(JRajesh Nikam
> >> >For file sharing problem exists means now all traffic of original
> >> >destination will be diverted to to changed machine. What do
> >> you mean by
> >> >file sharing does not work ?
> >> >
> >> Yes, The fellow are my testing.
> >> I change IP from 192.168.0.232 to 10.1.0.232.
> >> I can use ‘net use * \10.1.0.232\Video’ or
> >> '\10.1.0.232’successfully.
> >> I try to use ‘net use * \192.168.0.232\Video’ or
> >> ‘\192.168.0.232’, it fails.
> >> The Dbg info shows the ip address is changed.
> >>
> >> Best Regards
> >> Ouyang Kai
> >>
> >>
> >>
> >>
> >> —
> >> Questions? First check the Kernel Driver FAQ at
> >> http://www.osronline.com/article.cfm?id=256
> >>
> >> You are currently subscribed to ntdev as: xxxxx@nai.com
> >> To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >.
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Hi??Maxim S. Shatskih
How can I make sure of the TDI filter driver is started before netbios?
My means is that I register the filter driver, and reboot my xp box, the netbios
does not work also.
I ‘regini’ \registry\machine\system\currentcontrolset\services\TDITEST
and reboot my box, then i ‘net start TDITEST’, the netbios doesn’t work.
Best Regards
Ouyang Kai

You cannot. Plain and simple.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “oyk”
>To: “Windows System Software Devs Interest List”
>Sent: Sunday, April 04, 2004 3:00 PM
>Subject: RE: [ntdev] TDI_CONNECT IRP problem
>
>
>> Hi??Srin_Kumar
>> If I want to dynamic load/unload my filter driver, how can I do?
>> Best Regards
>> Ouyang Kai
>> >Loading TDI filter driver using SCM is a bad idea. NetBT opens the file
>object long before your driver is started.
>> >Set the load order properly so that your filter starts before NetBT. Your
>file sharing will work
>> >
>> >> -----Original Message-----
>> >> From: xxxxx@lists.osr.com
>> >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
>> >> Sent: Thursday, April 01, 2004 10:00 AM
>> >> To: Windows System Software Devs Interest List
>> >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>> >>
>> >> Hi$B!$(JRajesh Nikam
>> >> >For file sharing problem exists means now all traffic of original
>> >> >destination will be diverted to to changed machine. What do
>> >> you mean by
>> >> >file sharing does not work ?
>> >> >
>> >> Yes, The fellow are my testing.
>> >> I change IP from 192.168.0.232 to 10.1.0.232.
>> >> I can use ‘net use * \10.1.0.232\Video’ or
>> >> '\10.1.0.232’successfully.
>> >> I try to use ‘net use * \192.168.0.232\Video’ or
>> >> ‘\192.168.0.232’, it fails.
>> >> The Dbg info shows the ip address is changed.
>> >>
>> >> Best Regards
>> >> Ouyang Kai
>> >>
>> >>
>> >>
>> >>
>> >> —
>> >> Questions? First check the Kernel Driver FAQ at
>> >> http://www.osronline.com/article.cfm?id=256
>> >>
>> >> You are currently subscribed to ntdev as: xxxxx@nai.com
>> >> To unsubscribe send a blank email to xxxxx@lists.osr.com
>> >>
>> >
>> >—
>> >Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>> >
>> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>> >
>> >.
>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>.

Play with the load orders and tag values of NetBt and your driver.You can
change them to make your driver load before netbt.Search for Knowledge Base
article(sorry i forgot the number(:slight_smile: which demonstrate this technique.

Subodh
Software Architect
Knowledge Architects Web India.
+91-9892335325

----- Original Message -----
From: “oyk”
To: “Windows System Software Devs Interest List”
Sent: Monday, April 05, 2004 8:30 AM
Subject: Re: [ntdev] TDI_CONNECT IRP problem

Hi£¬Maxim S. Shatskih
How can I make sure of the TDI filter driver is started before netbios?
My means is that I register the filter driver, and reboot my xp box, the
netbios
does not work also.
I ‘regini’ \registry\machine\system\currentcontrolset\services\TDITEST
and reboot my box, then i ‘net start TDITEST’, the netbios doesn’t work.
Best Regards
Ouyang Kai
> You cannot. Plain and simple.
>
>Maxim Shatskih, Windows DDK MVP
>StorageCraft Corporation
>xxxxx@storagecraft.com
>http://www.storagecraft.com
>
>
>----- Original Message -----
>From: “oyk”
>To: “Windows System Software Devs Interest List”
>Sent: Sunday, April 04, 2004 3:00 PM
>Subject: RE: [ntdev] TDI_CONNECT IRP problem
>
>
>> Hi£¬Srin_Kumar
>> If I want to dynamic load/unload my filter driver, how can I do?
>> Best Regards
>> Ouyang Kai
>> >Loading TDI filter driver using SCM is a bad idea. NetBT opens the file
>object long before your driver is started.
>> >Set the load order properly so that your filter starts before NetBT.
Your
>file sharing will work
>> >
>> >> -----Original Message-----
>> >> From: xxxxx@lists.osr.com
>> >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
>> >> Sent: Thursday, April 01, 2004 10:00 AM
>> >> To: Windows System Software Devs Interest List
>> >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>> >>
>> >> Hi$B!$(JRajesh Nikam
>> >> >For file sharing problem exists means now all traffic of original
>> >> >destination will be diverted to to changed machine. What do
>> >> you mean by
>> >> >file sharing does not work ?
>> >> >
>> >> Yes, The fellow are my testing.
>> >> I change IP from 192.168.0.232 to 10.1.0.232.
>> >> I can use ‘net use * \10.1.0.232\Video’ or
>> >> '\10.1.0.232’successfully.
>> >> I try to use ‘net use * \192.168.0.232\Video’ or
>> >> ‘\192.168.0.232’, it fails.
>> >> The Dbg info shows the ip address is changed.
>> >>
>> >> Best Regards
>> >> Ouyang Kai
>> >>
>> >>
>> >>
>> >>
>> >> —
>> >> Questions? First check the Kernel Driver FAQ at
>> >> http://www.osronline.com/article.cfm?id=256
>> >>
>> >> You are currently subscribed to ntdev as: xxxxx@nai.com
>> >> To unsubscribe send a blank email to xxxxx@lists.osr.com
>> >>
>> >
>> >—
>> >Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>> >
>> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>> >
>> >.
>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>
>
>—
>Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>.


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

Hi??subodh gupta
Thanks, I add MyFilterTest into PNP_TDI group, and set the NetBT’s DependOnSerivce key
include MyFilterTest.
I test the ssh connection and ‘net use * \192.168.0.232’, only ssh connection could sucessfully.
The NetBT could not work. I think it maybe is udp problem.

About UDP, there are two ways to comminucation in user space.

One is socket->sendto->recvfrom->close. So, I can do my redirect thing in the TDI_SEND_DATAGRAM.

The other is socket->connect->send->recv->close. I do not know how to deal with this problem?

Thanks!!

Best Regards
Ouyang Kai

Play with the load orders and tag values of NetBt and your driver.You can
change them to make your driver load before netbt.Search for Knowledge Base
article(sorry i forgot the number(:slight_smile: which demonstrate this technique.

Subodh
Software Architect
Knowledge Architects Web India.
+91-9892335325

----- Original Message -----
From: “oyk”
>To: “Windows System Software Devs Interest List”
>Sent: Monday, April 05, 2004 8:30 AM
>Subject: Re: [ntdev] TDI_CONNECT IRP problem
>
>
>Hi??Maxim S. Shatskih
>How can I make sure of the TDI filter driver is started before netbios?
>My means is that I register the filter driver, and reboot my xp box, the
>netbios
>does not work also.
> I ‘regini’ \registry\machine\system\currentcontrolset\services\TDITEST
>and reboot my box, then i ‘net start TDITEST’, the netbios doesn’t work.
>Best Regards
> Ouyang Kai
>> You cannot. Plain and simple.
>>
>>Maxim Shatskih, Windows DDK MVP
>>StorageCraft Corporation
>>xxxxx@storagecraft.com
>>http://www.storagecraft.com
>>
>>
>>----- Original Message -----
>>From: “oyk”
>>To: “Windows System Software Devs Interest List”
>>Sent: Sunday, April 04, 2004 3:00 PM
>>Subject: RE: [ntdev] TDI_CONNECT IRP problem
>>
>>
>>> Hi??Srin_Kumar
>>> If I want to dynamic load/unload my filter driver, how can I do?
>>> Best Regards
>>> Ouyang Kai
>>> >Loading TDI filter driver using SCM is a bad idea. NetBT opens the file
>>object long before your driver is started.
>>> >Set the load order properly so that your filter starts before NetBT.
>Your
>>file sharing will work
>>> >
>>> >> -----Original Message-----
>>> >> From: xxxxx@lists.osr.com
>>> >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
>>> >> Sent: Thursday, April 01, 2004 10:00 AM
>>> >> To: Windows System Software Devs Interest List
>>> >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>>> >>
>>> >> Hi$B!$(JRajesh Nikam
>>> >> >For file sharing problem exists means now all traffic of original
>>> >> >destination will be diverted to to changed machine. What do
>>> >> you mean by
>>> >> >file sharing does not work ?
>>> >> >
>>> >> Yes, The fellow are my testing.
>>> >> I change IP from 192.168.0.232 to 10.1.0.232.
>>> >> I can use ‘net use * \10.1.0.232\Video’ or
>>> >> '\10.1.0.232’successfully.
>>> >> I try to use ‘net use * \192.168.0.232\Video’ or
>>> >> ‘\192.168.0.232’, it fails.
>>> >> The Dbg info shows the ip address is changed.
>>> >>
>>> >> Best Regards
>>> >> Ouyang Kai
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> —
>>> >> Questions? First check the Kernel Driver FAQ at
>>> >> http://www.osronline.com/article.cfm?id=256
>>> >>
>>> >> You are currently subscribed to ntdev as: xxxxx@nai.com
>>> >> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>> >>
>>> >
>>> >—
>>> >Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>> >
>>> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>>> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>>> >
>>> >.
>>>
>>>
>>>
>>>
>>> —
>>> Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>>
>>> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
>>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>
>>
>>
>>—
>>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>>
>>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>
>>.
>
>
>
>
>—
>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
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>.

Hi??guys
I have solved the NetBT problem. MyFilterTest doesn’t add 1 to the sacksize of the device.
After I add 1 based on “tcp/ip” device’s stacksize, it works.
Thank everyone!

About UDP, my simple udp echo program doesn’t work(The second working way in my last email).
How can I deal with the udp connection and implement the ip/port redirection?

Best Regards
Ouyang Kai

Hi??subodh gupta
Thanks, I add MyFilterTest into PNP_TDI group, and set the NetBT’s DependOnSerivce key
include MyFilterTest.
I test the ssh connection and ‘net use * \192.168.0.232’, only ssh connection could sucessfully.
The NetBT could not work. I think it maybe is udp problem.

About UDP, there are two ways to comminucation in user space.

One is socket->sendto->recvfrom->close. So, I can do my redirect thing in the TDI_SEND_DATAGRAM.

The other is socket->connect->send->recv->close. I do not know how to deal with this problem?

Thanks!!

Best Regards
Ouyang Kai
>Play with the load orders and tag values of NetBt and your driver.You can
>change them to make your driver load before netbt.Search for Knowledge Base
>article(sorry i forgot the number(:slight_smile: which demonstrate this technique.
>
>Subodh
>Software Architect
>Knowledge Architects Web India.
>+91-9892335325
>
>----- Original Message -----
>From: “oyk”
>>To: “Windows System Software Devs Interest List”
>>Sent: Monday, April 05, 2004 8:30 AM
>>Subject: Re: [ntdev] TDI_CONNECT IRP problem
>>
>>
>>Hi??Maxim S. Shatskih
>>How can I make sure of the TDI filter driver is started before netbios?
>>My means is that I register the filter driver, and reboot my xp box, the
>>netbios
>>does not work also.
>> I ‘regini’ \registry\machine\system\currentcontrolset\services\TDITEST
>>and reboot my box, then i ‘net start TDITEST’, the netbios doesn’t work.
>>Best Regards
>> Ouyang Kai
>>> You cannot. Plain and simple.
>>>
>>>Maxim Shatskih, Windows DDK MVP
>>>StorageCraft Corporation
>>>xxxxx@storagecraft.com
>>>http://www.storagecraft.com
>>>
>>>
>>>----- Original Message -----
>>>From: “oyk”
>>>To: “Windows System Software Devs Interest List”
>>>Sent: Sunday, April 04, 2004 3:00 PM
>>>Subject: RE: [ntdev] TDI_CONNECT IRP problem
>>>
>>>
>>>> Hi??Srin_Kumar
>>>> If I want to dynamic load/unload my filter driver, how can I do?
>>>> Best Regards
>>>> Ouyang Kai
>>>> >Loading TDI filter driver using SCM is a bad idea. NetBT opens the file
>>>object long before your driver is started.
>>>> >Set the load order properly so that your filter starts before NetBT.
>>Your
>>>file sharing will work
>>>> >
>>>> >> -----Original Message-----
>>>> >> From: xxxxx@lists.osr.com
>>>> >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
>>>> >> Sent: Thursday, April 01, 2004 10:00 AM
>>>> >> To: Windows System Software Devs Interest List
>>>> >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>>>> >>
>>>> >> Hi$B!$(JRajesh Nikam
>>>> >> >For file sharing problem exists means now all traffic of original
>>>> >> >destination will be diverted to to changed machine. What do
>>>> >> you mean by
>>>> >> >file sharing does not work ?
>>>> >> >
>>>> >> Yes, The fellow are my testing.
>>>> >> I change IP from 192.168.0.232 to 10.1.0.232.
>>>> >> I can use ‘net use * \10.1.0.232\Video’ or
>>>> >> '\10.1.0.232’successfully.
>>>> >> I try to use ‘net use * \192.168.0.232\Video’ or
>>>> >> ‘\192.168.0.232’, it fails.
>>>> >> The Dbg info shows the ip address is changed.
>>>> >>
>>>> >> Best Regards
>>>> >> Ouyang Kai
>>>> >>
>>>> >>
>>>> >>
>>>> >>
>>>> >> —
>>>> >> Questions? First check the Kernel Driver FAQ at
>>>> >> http://www.osronline.com/article.cfm?id=256
>>>> >>
>>>> >> You are currently subscribed to ntdev as: xxxxx@nai.com
>>>> >> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>> >>
>>>> >
>>>> >—
>>>> >Questions? First check the Kernel Driver FAQ at
>>>http://www.osronline.com/article.cfm?id=256
>>>> >
>>>> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>>>> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>> >
>>>> >.
>>>>
>>>>
>>>>
>>>>
>>>> —
>>>> Questions? First check the Kernel Driver FAQ at
>>>http://www.osronline.com/article.cfm?id=256
>>>>
>>>> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
>>>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>>
>>>
>>>
>>>—
>>>Questions? First check the Kernel Driver FAQ at
>>http://www.osronline.com/article.cfm?id=256
>>>
>>>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>>>
>>>
>>>.
>>
>>
>>
>>
>>—
>>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
>>
>>
>>—
>>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>>
>>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>.
>
>
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>.

Hi oyk,
I also is facing the same problem , ie, NetBT issue in my TDI filter
driver. Can you please explain the steps to solve this issue?
Rgds,
Prasanth

----- Original Message -----
From: “oyk”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, April 06, 2004 2:30 PM
Subject: Re: [ntdev] TDI_CONNECT IRP problem

> Hi??guys
> I have solved the NetBT problem. MyFilterTest doesn’t add 1 to the
sacksize of the device.
> After I add 1 based on “tcp/ip” device’s stacksize, it works.
> Thank everyone!
>
> About UDP, my simple udp echo program doesn’t work(The second working
way in my last email).
> How can I deal with the udp connection and implement the ip/port
redirection?
>
> Best Regards
> Ouyang Kai
> >Hi??subodh gupta
> > Thanks, I add MyFilterTest into PNP_TDI group, and set the NetBT’s
DependOnSerivce key
> >include MyFilterTest.
> > I test the ssh connection and ‘net use * \192.168.0.232’, only ssh
connection could sucessfully.
> >The NetBT could not work. I think it maybe is udp problem.
> >
> > About UDP, there are two ways to comminucation in user space.
> >
> >One is socket->sendto->recvfrom->close. So, I can do my redirect thing in
the TDI_SEND_DATAGRAM.
> >
> >The other is socket->connect->send->recv->close. I do not know how to
deal with this problem?
> >
> > Thanks!!
> >
> >Best Regards
> > Ouyang Kai
> >>Play with the load orders and tag values of NetBt and your driver.You
can
> >>change them to make your driver load before netbt.Search for Knowledge
Base
> >>article(sorry i forgot the number(:slight_smile: which demonstrate this technique.
> >>
> >>Subodh
> >>Software Architect
> >>Knowledge Architects Web India.
> >>+91-9892335325
> >>
> >>----- Original Message -----
> >>From: “oyk”
> >>To: “Windows System Software Devs Interest List”
> >>Sent: Monday, April 05, 2004 8:30 AM
> >>Subject: Re: [ntdev] TDI_CONNECT IRP problem
> >>
> >>
> >>Hi??Maxim S. Shatskih
> >>How can I make sure of the TDI filter driver is started before netbios?
> >>My means is that I register the filter driver, and reboot my xp box, the
> >>netbios
> >>does not work also.
> >> I ‘regini’
\registry\machine\system\currentcontrolset\services\TDITEST
> >>and reboot my box, then i ‘net start TDITEST’, the netbios doesn’t work.
> >>Best Regards
> >> Ouyang Kai
> >>> You cannot. Plain and simple.
> >>>
> >>>Maxim Shatskih, Windows DDK MVP
> >>>StorageCraft Corporation
> >>>xxxxx@storagecraft.com
> >>>http://www.storagecraft.com
> >>>
> >>>
> >>>----- Original Message -----
> >>>From: “oyk”
> >>>To: “Windows System Software Devs Interest List”
> >>>Sent: Sunday, April 04, 2004 3:00 PM
> >>>Subject: RE: [ntdev] TDI_CONNECT IRP problem
> >>>
> >>>
> >>>> Hi??Srin_Kumar
> >>>> If I want to dynamic load/unload my filter driver, how can I do?
> >>>> Best Regards
> >>>> Ouyang Kai
> >>>> >Loading TDI filter driver using SCM is a bad idea. NetBT opens the
file
> >>>object long before your driver is started.
> >>>> >Set the load order properly so that your filter starts before NetBT.
> >>Your
> >>>file sharing will work
> >>>> >
> >>>> >> -----Original Message-----
> >>>> >> From: xxxxx@lists.osr.com
> >>>> >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
> >>>> >> Sent: Thursday, April 01, 2004 10:00 AM
> >>>> >> To: Windows System Software Devs Interest List
> >>>> >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
> >>>> >>
> >>>> >> Hi$B!$(JRajesh Nikam
> >>>> >> >For file sharing problem exists means now all traffic of original
> >>>> >> >destination will be diverted to to changed machine. What do
> >>>> >> you mean by
> >>>> >> >file sharing does not work ?
> >>>> >> >
> >>>> >> Yes, The fellow are my testing.
> >>>> >> I change IP from 192.168.0.232 to 10.1.0.232.
> >>>> >> I can use ‘net use * \10.1.0.232\Video’ or
> >>>> >> '\10.1.0.232’successfully.
> >>>> >> I try to use ‘net use * \192.168.0.232\Video’ or
> >>>> >> ‘\192.168.0.232’, it fails.
> >>>> >> The Dbg info shows the ip address is changed.
> >>>> >>
> >>>> >> Best Regards
> >>>> >> Ouyang Kai
> >>>> >>
> >>>> >>
> >>>> >>
> >>>> >>
> >>>> >> —
> >>>> >> Questions? First check the Kernel Driver FAQ at
> >>>> >> http://www.osronline.com/article.cfm?id=256
> >>>> >>
> >>>> >> You are currently subscribed to ntdev as: xxxxx@nai.com
> >>>> >> To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >>>> >>
> >>>> >
> >>>> >—
> >>>> >Questions? First check the Kernel Driver FAQ at
> >>>http://www.osronline.com/article.cfm?id=256
> >>>> >
> >>>> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
> >>>> >To unsubscribe send a blank email to
xxxxx@lists.osr.com
> >>>> >
> >>>> >.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> —
> >>>> Questions? First check the Kernel Driver FAQ at
> >>>http://www.osronline.com/article.cfm?id=256
> >>>>
> >>>> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> >>>> To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>>>
> >>>
> >>>
> >>>—
> >>>Questions? First check the Kernel Driver FAQ at
> >>http://www.osronline.com/article.cfm?id=256
> >>>
> >>>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
> >>>To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>>
> >>>
> >>>.
> >>
> >>
> >>
> >>
> >>—
> >>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
> >>
> >>
> >>—
> >>Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >>
> >>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
> >>To unsubscribe send a blank email to xxxxx@lists.osr.com
> >>
> >>.
> >
> >
> >
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >.
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@calsoft.co.in
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Hi??Prasanth M
You can get TCP device pointer — pTargetDev by IoGetDeviceObjectPointer.
Your filter device is pFilterDev, you created it by IoCreateDevice.
Now, you can set pFilterDev->StackSize = pTargetDev->StackSize + 1;
But I don’t know why the other tcp application(such as ssh, telnet…) could work without this.
Hope sb could tell me the reason.
BTW, you must make sure of your filter driver be loaded before the NetBT.

As DDK(from 3270):
CCHAR StackSize
Specifies the minimum number of stack locations in IRPs to be sent to this driver. IoCreateDevice and IoCreateDeviceSecure sets this field to one in newly created device objects; lowest-level drivers can therefore ignore this field. The I/O manager automatically sets the StackSize field in a higher-level driver??s device object to the appropriate value if the driver calls IoAttachDevice or IoAttachDeviceToDeviceStack. Only a higher-level driver that chains itself over another driver with IoGetDeviceObjectPointer must explicitly set the value of StackSize in its own device object(s) to (1 + the StackSize value of the next-lower driver??s device object).

Good Luck
Best Regards
Ouyang Kai

Hi oyk,
I also is facing the same problem , ie, NetBT issue in my TDI filter
driver. Can you please explain the steps to solve this issue?
Rgds,
Prasanth

----- Original Message -----
From: “oyk”
>To: “Windows System Software Devs Interest List”
>Sent: Tuesday, April 06, 2004 2:30 PM
>Subject: Re: [ntdev] TDI_CONNECT IRP problem
>
>
>> Hi??guys
>> I have solved the NetBT problem. MyFilterTest doesn’t add 1 to the
>sacksize of the device.
>> After I add 1 based on “tcp/ip” device’s stacksize, it works.
>> Thank everyone!
>>
>> About UDP, my simple udp echo program doesn’t work(The second working
>way in my last email).
>> How can I deal with the udp connection and implement the ip/port
>redirection?
>>
>> Best Regards
>> Ouyang Kai
>> >Hi??subodh gupta
>> > Thanks, I add MyFilterTest into PNP_TDI group, and set the NetBT’s
>DependOnSerivce key
>> >include MyFilterTest.
>> > I test the ssh connection and ‘net use * \192.168.0.232’, only ssh
>connection could sucessfully.
>> >The NetBT could not work. I think it maybe is udp problem.
>> >
>> > About UDP, there are two ways to comminucation in user space.
>> >
>> >One is socket->sendto->recvfrom->close. So, I can do my redirect thing in
>the TDI_SEND_DATAGRAM.
>> >
>> >The other is socket->connect->send->recv->close. I do not know how to
>deal with this problem?
>> >
>> > Thanks!!
>> >
>> >Best Regards
>> > Ouyang Kai
>> >>Play with the load orders and tag values of NetBt and your driver.You
>can
>> >>change them to make your driver load before netbt.Search for Knowledge
>Base
>> >>article(sorry i forgot the number(:slight_smile: which demonstrate this technique.
>> >>
>> >>Subodh
>> >>Software Architect
>> >>Knowledge Architects Web India.
>> >>+91-9892335325
>> >>
>> >>----- Original Message -----
>> >>From: “oyk”
>> >>To: “Windows System Software Devs Interest List”
>> >>Sent: Monday, April 05, 2004 8:30 AM
>> >>Subject: Re: [ntdev] TDI_CONNECT IRP problem
>> >>
>> >>
>> >>Hi??Maxim S. Shatskih
>> >>How can I make sure of the TDI filter driver is started before netbios?
>> >>My means is that I register the filter driver, and reboot my xp box, the
>> >>netbios
>> >>does not work also.
>> >> I ‘regini’
>\registry\machine\system\currentcontrolset\services\TDITEST
>> >>and reboot my box, then i ‘net start TDITEST’, the netbios doesn’t work.
>> >>Best Regards
>> >> Ouyang Kai
>> >>> You cannot. Plain and simple.
>> >>>
>> >>>Maxim Shatskih, Windows DDK MVP
>> >>>StorageCraft Corporation
>> >>>xxxxx@storagecraft.com
>> >>>http://www.storagecraft.com
>> >>>
>> >>>
>> >>>----- Original Message -----
>> >>>From: “oyk”
>> >>>To: “Windows System Software Devs Interest List”
>> >>>Sent: Sunday, April 04, 2004 3:00 PM
>> >>>Subject: RE: [ntdev] TDI_CONNECT IRP problem
>> >>>
>> >>>
>> >>>> Hi??Srin_Kumar
>> >>>> If I want to dynamic load/unload my filter driver, how can I do?
>> >>>> Best Regards
>> >>>> Ouyang Kai
>> >>>> >Loading TDI filter driver using SCM is a bad idea. NetBT opens the
>file
>> >>>object long before your driver is started.
>> >>>> >Set the load order properly so that your filter starts before NetBT.
>> >>Your
>> >>>file sharing will work
>> >>>> >
>> >>>> >> -----Original Message-----
>> >>>> >> From: xxxxx@lists.osr.com
>> >>>> >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
>> >>>> >> Sent: Thursday, April 01, 2004 10:00 AM
>> >>>> >> To: Windows System Software Devs Interest List
>> >>>> >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>> >>>> >>
>> >>>> >> Hi$B!$(JRajesh Nikam
>> >>>> >> >For file sharing problem exists means now all traffic of original
>> >>>> >> >destination will be diverted to to changed machine. What do
>> >>>> >> you mean by
>> >>>> >> >file sharing does not work ?
>> >>>> >> >
>> >>>> >> Yes, The fellow are my testing.
>> >>>> >> I change IP from 192.168.0.232 to 10.1.0.232.
>> >>>> >> I can use ‘net use * \10.1.0.232\Video’ or
>> >>>> >> '\10.1.0.232’successfully.
>> >>>> >> I try to use ‘net use * \192.168.0.232\Video’ or
>> >>>> >> ‘\192.168.0.232’, it fails.
>> >>>> >> The Dbg info shows the ip address is changed.
>> >>>> >>
>> >>>> >> Best Regards
>> >>>> >> Ouyang Kai
>> >>>> >>
>> >>>> >>
>> >>>> >>
>> >>>> >>
>> >>>> >> —
>> >>>> >> Questions? First check the Kernel Driver FAQ at
>> >>>> >> http://www.osronline.com/article.cfm?id=256
>> >>>> >>
>> >>>> >> You are currently subscribed to ntdev as: xxxxx@nai.com
>> >>>> >> To unsubscribe send a blank email to
>xxxxx@lists.osr.com
>> >>>> >>
>> >>>> >
>> >>>> >—
>> >>>> >Questions? First check the Kernel Driver FAQ at
>> >>>http://www.osronline.com/article.cfm?id=256
>> >>>> >
>> >>>> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>> >>>> >To unsubscribe send a blank email to
>xxxxx@lists.osr.com
>> >>>> >
>> >>>> >.
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> —
>> >>>> Questions? First check the Kernel Driver FAQ at
>> >>>http://www.osronline.com/article.cfm?id=256
>> >>>>
>> >>>> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
>> >>>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>> >>>>
>> >>>
>> >>>
>> >>>—
>> >>>Questions? First check the Kernel Driver FAQ at
>> >>http://www.osronline.com/article.cfm?id=256
>> >>>
>> >>>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>> >>>To unsubscribe send a blank email to xxxxx@lists.osr.com
>> >>>
>> >>>
>> >>>.
>> >>
>> >>
>> >>
>> >>
>> >>—
>> >>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
>> >>
>> >>
>> >>—
>> >>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>> >>
>> >>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>> >>To unsubscribe send a blank email to xxxxx@lists.osr.com
>> >>
>> >>.
>> >
>> >
>> >
>> >
>> >—
>> >Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>> >
>> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>> >To unsubscribe send a blank email to xxxxx@lists.osr.com
>> >
>> >
>> >.
>>
>>
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@calsoft.co.in
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
>To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>.

Maxim,
So you are saying that if we have a TDI filter driver where we trap NetBIOS
traffic, it is impossible to get file shares workign without doing a reboot.
I understand why reboot is required because NetBT creates IRPs when system
is being booted, before even our TDI filter driver is loaded.

Do u have any ideas if we can avoid this reboot (i.e. file drive mapping shd
work once the driver is installed).
Thx,
Sanjay

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Sunday, April 04, 2004 3:04 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] TDI_CONNECT IRP problem

You cannot. Plain and simple.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “oyk”
To: “Windows System Software Devs Interest List”
Sent: Sunday, April 04, 2004 3:00 PM
Subject: RE: [ntdev] TDI_CONNECT IRP problem

> Hi$B!$(JSrin_Kumar
> If I want to dynamic load/unload my filter driver, how can I do?
> Best Regards
> Ouyang Kai
> >Loading TDI filter driver using SCM is a bad idea. NetBT opens the
> >file
object long before your driver is started.
> >Set the load order properly so that your filter starts before NetBT.
> >Your
file sharing will work
> >
> >> -----Original Message-----
> >> From: xxxxx@lists.osr.com
> >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
> >> Sent: Thursday, April 01, 2004 10:00 AM
> >> To: Windows System Software Devs Interest List
> >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
> >>
> >> Hi$B!$(JRajesh Nikam
> >> >For file sharing problem exists means now all traffic of original
> >> >destination will be diverted to to changed machine. What do
> >> you mean by
> >> >file sharing does not work ?
> >> >
> >> Yes, The fellow are my testing.
> >> I change IP from 192.168.0.232 to 10.1.0.232.
> >> I can use ‘net use * \10.1.0.232\Video’ or
> >> '\10.1.0.232’successfully. I try to use ‘net use *
> >> \192.168.0.232\Video’ or ‘\192.168.0.232’, it fails.
> >> The Dbg info shows the ip address is changed.
> >>
> >> Best Regards
> >> Ouyang Kai
> >>
> >>
> >>
> >>
> >> —
> >> Questions? First check the Kernel Driver FAQ at
> >> http://www.osronline.com/article.cfm?id=256
> >>
> >> You are currently subscribed to ntdev as: xxxxx@nai.com To
> >> unsubscribe send a blank email to xxxxx@lists.osr.com
> >>
> >
> >—
> >Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
> >
> >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
> >To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >.
>
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@neoteris.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

You cannot unload the driver, but you can switch it to “pass all data, does
not block anything” mode.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Sanjay Chadda”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, April 06, 2004 9:48 PM
Subject: RE: [ntdev] TDI_CONNECT IRP problem

> Maxim,
> So you are saying that if we have a TDI filter driver where we trap NetBIOS
> traffic, it is impossible to get file shares workign without doing a reboot.
> I understand why reboot is required because NetBT creates IRPs when system
> is being booted, before even our TDI filter driver is loaded.
>
> Do u have any ideas if we can avoid this reboot (i.e. file drive mapping shd
> work once the driver is installed).
> Thx,
> Sanjay
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
> Sent: Sunday, April 04, 2004 3:04 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>
>
> You cannot. Plain and simple.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “oyk”
> To: “Windows System Software Devs Interest List”
> Sent: Sunday, April 04, 2004 3:00 PM
> Subject: RE: [ntdev] TDI_CONNECT IRP problem
>
>
> > Hi$B!$(BSrin_Kumar
> > If I want to dynamic load/unload my filter driver, how can I do?
> > Best Regards
> > Ouyang Kai
> > >Loading TDI filter driver using SCM is a bad idea. NetBT opens the
> > >file
> object long before your driver is started.
> > >Set the load order properly so that your filter starts before NetBT.
> > >Your
> file sharing will work
> > >
> > >> -----Original Message-----
> > >> From: xxxxx@lists.osr.com
> > >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
> > >> Sent: Thursday, April 01, 2004 10:00 AM
> > >> To: Windows System Software Devs Interest List
> > >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
> > >>
> > >> Hi$B!$(BRajesh Nikam
> > >> >For file sharing problem exists means now all traffic of original
> > >> >destination will be diverted to to changed machine. What do
> > >> you mean by
> > >> >file sharing does not work ?
> > >> >
> > >> Yes, The fellow are my testing.
> > >> I change IP from 192.168.0.232 to 10.1.0.232.
> > >> I can use ‘net use * \10.1.0.232\Video’ or
> > >> '\10.1.0.232’successfully. I try to use ‘net use *
> > >> \192.168.0.232\Video’ or ‘\192.168.0.232’, it fails.
> > >> The Dbg info shows the ip address is changed.
> > >>
> > >> Best Regards
> > >> Ouyang Kai
> > >>
> > >>
> > >>
> > >>
> > >> —
> > >> Questions? First check the Kernel Driver FAQ at
> > >> http://www.osronline.com/article.cfm?id=256
> > >>
> > >> You are currently subscribed to ntdev as: xxxxx@nai.com To
> > >> unsubscribe send a blank email to xxxxx@lists.osr.com
> > >>
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn
> > >To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >.
> >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@neoteris.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

I am not sure if I understand what you meant by that.

In my case, I Install a product which requires a kernel mode TDI driver to
be installed. I change the load order so that my driver loads before NetBT.
During my product install, I also launch a user mode service which listens
for connections being redirected from the driver since we change IP
addresses in the driver.

Once our product is installed, without doing a reboot, I don$B!G(Jt see the file
share traffic coming to our driver at all. If we do a reboot, it does come.
That is why I asked if there is any technique whereby we can avoid this
reboot.
Sanjay

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
Sent: Tuesday, April 06, 2004 11:02 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] TDI_CONNECT IRP problem

You cannot unload the driver, but you can switch it to “pass all data,
does not block anything” mode.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Sanjay Chadda”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, April 06, 2004 9:48 PM
Subject: RE: [ntdev] TDI_CONNECT IRP problem

> Maxim,
> So you are saying that if we have a TDI filter driver where we trap
> NetBIOS traffic, it is impossible to get file shares workign without
> doing a reboot. I understand why reboot is required because NetBT
> creates IRPs when system is being booted, before even our TDI filter
> driver is loaded.
>
> Do u have any ideas if we can avoid this reboot (i.e. file drive
> mapping shd work once the driver is installed). Thx,
> Sanjay
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
> Shatskih
> Sent: Sunday, April 04, 2004 3:04 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>
>
> You cannot. Plain and simple.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: “oyk”
> To: “Windows System Software Devs Interest List”
> Sent: Sunday, April 04, 2004 3:00 PM
> Subject: RE: [ntdev] TDI_CONNECT IRP problem
>
>
> > Hi$B!$(JSrin_Kumar
> > If I want to dynamic load/unload my filter driver, how can I do?
> > Best Regards
> > Ouyang Kai
> > >Loading TDI filter driver using SCM is a bad idea. NetBT opens the
> > >file
> object long before your driver is started.
> > >Set the load order properly so that your filter starts before
> > >NetBT. Your
> file sharing will work
> > >
> > >> -----Original Message-----
> > >> From: xxxxx@lists.osr.com
> > >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
> > >> Sent: Thursday, April 01, 2004 10:00 AM
> > >> To: Windows System Software Devs Interest List
> > >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
> > >>
> > >> Hi$B!$(JRajesh Nikam
> > >> >For file sharing problem exists means now all traffic of
> > >> >original destination will be diverted to to changed machine.
> > >> >What do
> > >> you mean by
> > >> >file sharing does not work ?
> > >> >
> > >> Yes, The fellow are my testing.
> > >> I change IP from 192.168.0.232 to 10.1.0.232.
> > >> I can use ‘net use * \10.1.0.232\Video’ or
> > >> '\10.1.0.232’successfully. I try to use ‘net use *
> > >> \192.168.0.232\Video’ or ‘\192.168.0.232’, it fails. The Dbg
> > >> info shows the ip address is changed.
> > >>
> > >> Best Regards
> > >> Ouyang Kai
> > >>
> > >>
> > >>
> > >>
> > >> —
> > >> Questions? First check the Kernel Driver FAQ at
> > >> http://www.osronline.com/article.cfm?id=256
> > >>
> > >> You are currently subscribed to ntdev as: xxxxx@nai.com To
> > >> unsubscribe send a blank email to
> > >> xxxxx@lists.osr.com
> > >>
> > >
> > >—
> > >Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> > >
> > >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn To
> > >unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> > >.
> >
> >
> >
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@neoteris.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@neoteris.com To
unsubscribe send a blank email to xxxxx@lists.osr.com

> That is why I asked if there is any technique whereby we can avoid this

reboot.

No, you cannot avoid this reboot if you want to filter NetBT IRP's in your
filter
driver. Other approach is hooking which is not recommended.

HTH,

-Farooque Khan

"Sanjay Chadda" wrote in message news:xxxxx@ntdev...
> I am not sure if I understand what you meant by that.
>
> In my case, I Install a product which requires a kernel mode TDI driver to
> be installed. I change the load order so that my driver loads before
NetBT.
> During my product install, I also launch a user mode service which listens
> for connections being redirected from the driver since we change IP
> addresses in the driver.
>
> Once our product is installed, without doing a reboot, I don$B!G(Bt see the
file
> share traffic coming to our driver at all. If we do a reboot, it does
come.
> That is why I asked if there is any technique whereby we can avoid this
> reboot.
> Sanjay
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S. Shatskih
> Sent: Tuesday, April 06, 2004 11:02 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] TDI_CONNECT IRP problem
>
>
> You cannot unload the driver, but you can switch it to "pass all data,
> does not block anything" mode.
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> ----- Original Message -----
> From: "Sanjay Chadda"
> To: "Windows System Software Devs Interest List"
> Sent: Tuesday, April 06, 2004 9:48 PM
> Subject: RE: [ntdev] TDI_CONNECT IRP problem
>
>
> > Maxim,
> > So you are saying that if we have a TDI filter driver where we trap
> > NetBIOS traffic, it is impossible to get file shares workign without
> > doing a reboot. I understand why reboot is required because NetBT
> > creates IRPs when system is being booted, before even our TDI filter
> > driver is loaded.
> >
> > Do u have any ideas if we can avoid this reboot (i.e. file drive
> > mapping shd work once the driver is installed). Thx,
> > Sanjay
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Maxim S.
> > Shatskih
> > Sent: Sunday, April 04, 2004 3:04 PM
> > To: Windows System Software Devs Interest List
> > Subject: Re: [ntdev] TDI_CONNECT IRP problem
> >
> >
> > You cannot. Plain and simple.
> >
> > Maxim Shatskih, Windows DDK MVP
> > StorageCraft Corporation
> > xxxxx@storagecraft.com
> > http://www.storagecraft.com
> >
> >
> > ----- Original Message -----
> > From: "oyk"
> > To: "Windows System Software Devs Interest List"
> > Sent: Sunday, April 04, 2004 3:00 PM
> > Subject: RE: [ntdev] TDI_CONNECT IRP problem
> >
> >
> > > Hi$B!$(BSrin_Kumar
> > > If I want to dynamic load/unload my filter driver, how can I do?
> > > Best Regards
> > > Ouyang Kai
> > > >Loading TDI filter driver using SCM is a bad idea. NetBT opens the
> > > >file
> > object long before your driver is started.
> > > >Set the load order properly so that your filter starts before
> > > >NetBT. Your
> > file sharing will work
> > > >
> > > >> -----Original Message-----
> > > >> From: xxxxx@lists.osr.com
> > > >> [mailto:xxxxx@lists.osr.com] On Behalf Of oyk
> > > >> Sent: Thursday, April 01, 2004 10:00 AM
> > > >> To: Windows System Software Devs Interest List
> > > >> Subject: Re: [ntdev] TDI_CONNECT IRP problem
> > > >>
> > > >> Hi$B!$(BRajesh Nikam
> > > >> >For file sharing problem exists means now all traffic of
> > > >> >original destination will be diverted to to changed machine.
> > > >> >What do
> > > >> you mean by
> > > >> >file sharing does not work ?
> > > >> >
> > > >> Yes, The fellow are my testing.
> > > >> I change IP from 192.168.0.232 to 10.1.0.232.
> > > >> I can use 'net use * \10.1.0.232\Video' or
> > > >> '\10.1.0.232'successfully. I try to use 'net use *
> > > >> \192.168.0.232\Video' or '\192.168.0.232', it fails. The Dbg
> > > >> info shows the ip address is changed.
> > > >>
> > > >> Best Regards
> > > >> Ouyang Kai
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> ---
> > > >> Questions? First check the Kernel Driver FAQ at
> > > >> http://www.osronline.com/article.cfm?id=256
> > > >>
> > > >> You are currently subscribed to ntdev as: xxxxx@nai.com To
> > > >> unsubscribe send a blank email to
> > > >> xxxxx@lists.osr.com
> > > >>
> > > >
> > > >---
> > > >Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > > >
> > > >You are currently subscribed to ntdev as: xxxxx@wtwh.com.cn To
> > > >unsubscribe send a blank email to xxxxx@lists.osr.com
> > > >
> > > >.
> > >
> > >
> > >
> > >
> > > ---
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> > >
> > > You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> > > unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> > ---
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@neoteris.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > ---
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@storagecraft.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> ---
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@neoteris.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>

Look at these 2 sentenses:

be installed. I change the load order so that my driver loads before NetBT.

and:

Once our product is installed, without doing a reboot, I don$B!G(Bt see the file

Do you see the contradiction?

Your software cannot be installed without a reboot, since the driver must be
loaded before NetBT, and, on running machine, NetBT is already started. So, you
need the reboot just to restart NetBT, since it cannot be stopped.

NDIS IM drivers can be installed and uninstalled without a reboot, but they are
absolutely unaware of the application context and you will not be able to
associate the TCP or UDP port numbers with the app’s EXE name or with the user
SID.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com