TDI filter

Hello,

I am writing TDI filter driver.
What fields I have to initialize when using IoAllocateIrp instead of
TdiBuildInternalDeviceControlIrp?
I also want to copy packets (like TDI_CONNECT, TDI_DISCONNECT, TDI_SEND and
so on) and to send down my own packet instead. From DDK documentation it is
not clear what fields I have to copy from Irp and from stack location as
well.

Fro example, for TDI_CONNECT should I copy AssociatedIrp.SystemBuffer?

Thank you
Leonid

Leonid,
If you are using filter driver, why are you copying and creating
a new IRP. You could use the same IRP and have your own
IO_STACK_LOCATION.

-Srin.

-----Original Message-----
From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
Sent: Wednesday, July 02, 2003 9:10 AM
To: NT Developers Interest List
Subject: [ntdev] TDI filter

Hello,

I am writing TDI filter driver.
What fields I have to initialize when using IoAllocateIrp instead of
TdiBuildInternalDeviceControlIrp?
I also want to copy packets (like TDI_CONNECT, TDI_DISCONNECT,
TDI_SEND
and
so on) and to send down my own packet instead. From DDK documentation
it
is
not clear what fields I have to copy from Irp and from stack location
as
well.

Fro example, for TDI_CONNECT should I copy AssociatedIrp.SystemBuffer?

Thank you
Leonid


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

Look at the definition of TdiBuildInternalDeviceControlIrp in tdiknrl.h.

As for sending down “packets,” it’s not clear that you’re working with
packets at the TDI level. In fact, given that a TDI client is above
TCP/IP (usually), I’d say that you’re probably not, because I imagine
it’s TCP/IP that forms packets.

May I ask why you want to send down your own packet? VPN encapsulation,
perhaps? If so, I don’t think TDI the place to do that. Better an NDIS
IM driver.


If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP

Look at the code. TdiBuildInternalDeviceControlIrp is just a macro,
if I remember correctly.

-Jeff

-----Original Message-----
From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
Sent: Wednesday, July 02, 2003 12:10 PM
To: NT Developers Interest List
Subject: [ntdev] TDI filter

Hello,

I am writing TDI filter driver.
What fields I have to initialize when using IoAllocateIrp instead of
TdiBuildInternalDeviceControlIrp?
I also want to copy packets (like TDI_CONNECT, TDI_DISCONNECT, TDI_SEND and
so on) and to send down my own packet instead. From DDK documentation it is
not clear what fields I have to copy from Irp and from stack location as
well.

Fro example, for TDI_CONNECT should I copy AssociatedIrp.SystemBuffer?

Thank you
Leonid


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

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
the latest virus scan software available for the presence of computer
viruses.
**********************************************************************

Srin,
I would love to use my own IO_STACK_LOCATION, but IRP has been created by
another driver and I cannot increase number of stack location, can I?

Leonid
----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, July 02, 2003 12:42 PM
Subject: [ntdev] RE: TDI filter

Leonid,
If you are using filter driver, why are you copying and creating
a new IRP. You could use the same IRP and have your own
IO_STACK_LOCATION.

-Srin.

> -----Original Message-----
> From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> Sent: Wednesday, July 02, 2003 9:10 AM
> To: NT Developers Interest List
> Subject: [ntdev] TDI filter
>
> Hello,
>
> I am writing TDI filter driver.
> What fields I have to initialize when using IoAllocateIrp instead of
> TdiBuildInternalDeviceControlIrp?
> I also want to copy packets (like TDI_CONNECT, TDI_DISCONNECT,
TDI_SEND
> and
> so on) and to send down my own packet instead. From DDK documentation
it
> is
> not clear what fields I have to copy from Irp and from stack location
as
> well.
>
> Fro example, for TDI_CONNECT should I copy AssociatedIrp.SystemBuffer?
>
> Thank you
> Leonid
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


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

I use term ‘packet’ for IRP.
BTW, why TDI is not good place for VPN? I have already NDIS - VPN
implemented, but TDI have some attractive features also.
Leonid

----- Original Message -----
From: “James Antognini”
Newsgroups: ntdev
To: “NT Developers Interest List”
Sent: Wednesday, July 02, 2003 12:43 PM
Subject: [ntdev] Re: TDI filter

> Look at the definition of TdiBuildInternalDeviceControlIrp in tdiknrl.h.
>
> As for sending down “packets,” it’s not clear that you’re working with
> packets at the TDI level. In fact, given that a TDI client is above
> TCP/IP (usually), I’d say that you’re probably not, because I imagine
> it’s TCP/IP that forms packets.
>
> May I ask why you want to send down your own packet? VPN encapsulation,
> perhaps? If so, I don’t think TDI the place to do that. Better an NDIS
> IM driver.
>
> –
> If replying by e-mail, please remove “nospam.” from the address.
>
> James Antognini
> Windows DDK MVP
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@v-one.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Yes, you can. If you load at the right time, and set the device stack
count properly, the system allocates the right number of stack locations
for drivers sending IRPs. If you find the IO_STACK_LOCATIONS count is
not right and you are seeing a BSOD, you have to look at when your
driver is starting.
Believe me this all works well. You do not have to allocate a
new IRP. There were some bugs in netbt or some driver, but they were
fixed long time before, with latest service packs you do not have any
problems.

-Srin.

-----Original Message-----
From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
Sent: Wednesday, July 02, 2003 10:14 AM
To: NT Developers Interest List
Subject: [ntdev] RE: TDI filter

Srin,
I would love to use my own IO_STACK_LOCATION, but IRP has been created
by
another driver and I cannot increase number of stack location, can I?

Leonid
----- Original Message -----
From:
> To: “NT Developers Interest List”
> Sent: Wednesday, July 02, 2003 12:42 PM
> Subject: [ntdev] RE: TDI filter
>
>
> Leonid,
> If you are using filter driver, why are you copying and creating
> a new IRP. You could use the same IRP and have your own
> IO_STACK_LOCATION.
>
> -Srin.
>
> > -----Original Message-----
> > From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> > Sent: Wednesday, July 02, 2003 9:10 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] TDI filter
> >
> > Hello,
> >
> > I am writing TDI filter driver.
> > What fields I have to initialize when using IoAllocateIrp instead of
> > TdiBuildInternalDeviceControlIrp?
> > I also want to copy packets (like TDI_CONNECT, TDI_DISCONNECT,
> TDI_SEND
> > and
> > so on) and to send down my own packet instead. From DDK
documentation
> it
> > is
> > not clear what fields I have to copy from Irp and from stack
location
> as
> > well.
> >
> > Fro example, for TDI_CONNECT should I copy
AssociatedIrp.SystemBuffer?
> >
> > Thank you
> > Leonid
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@nai.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@v-one.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Leonid,
I believe you have to explain more at what you are doing. VPN at
TDI level does not look like a sane implementation to me. I may be
wrong, could you explain more?

-Srin.

-----Original Message-----
From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
Sent: Wednesday, July 02, 2003 10:17 AM
To: NT Developers Interest List
Subject: [ntdev] Re: TDI filter

I use term ‘packet’ for IRP.
BTW, why TDI is not good place for VPN? I have already NDIS - VPN
implemented, but TDI have some attractive features also.
Leonid

----- Original Message -----
From: “James Antognini”
> Newsgroups: ntdev
> To: “NT Developers Interest List”
> Sent: Wednesday, July 02, 2003 12:43 PM
> Subject: [ntdev] Re: TDI filter
>
>
> > Look at the definition of TdiBuildInternalDeviceControlIrp in
tdiknrl.h.
> >
> > As for sending down “packets,” it’s not clear that you’re working
with
> > packets at the TDI level. In fact, given that a TDI client is above
> > TCP/IP (usually), I’d say that you’re probably not, because I
imagine
> > it’s TCP/IP that forms packets.
> >
> > May I ask why you want to send down your own packet? VPN
encapsulation,
> > perhaps? If so, I don’t think TDI the place to do that. Better an
NDIS
> > IM driver.
> >
> > –
> > If replying by e-mail, please remove “nospam.” from the address.
> >
> > James Antognini
> > Windows DDK MVP
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@v-one.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Srin,

TDI filter driver is loaded after all protocol driver are loaded (after
\Device\Tcp and so on). In this case will TDI cliebt allocate right stack
location in the IRP?
I think you are right and I’ll try it.

Thank you
Leonid

----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, July 02, 2003 1:29 PM
Subject: [ntdev] RE: TDI filter

Yes, you can. If you load at the right time, and set the device stack
count properly, the system allocates the right number of stack locations
for drivers sending IRPs. If you find the IO_STACK_LOCATIONS count is
not right and you are seeing a BSOD, you have to look at when your
driver is starting.
Believe me this all works well. You do not have to allocate a
new IRP. There were some bugs in netbt or some driver, but they were
fixed long time before, with latest service packs you do not have any
problems.

-Srin.

> -----Original Message-----
> From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> Sent: Wednesday, July 02, 2003 10:14 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: TDI filter
>
> Srin,
> I would love to use my own IO_STACK_LOCATION, but IRP has been created
by
> another driver and I cannot increase number of stack location, can I?
>
> Leonid
> ----- Original Message -----
> From:
> To: “NT Developers Interest List”
> Sent: Wednesday, July 02, 2003 12:42 PM
> Subject: [ntdev] RE: TDI filter
>
>
> Leonid,
> If you are using filter driver, why are you copying and creating
> a new IRP. You could use the same IRP and have your own
> IO_STACK_LOCATION.
>
> -Srin.
>
> > -----Original Message-----
> > From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> > Sent: Wednesday, July 02, 2003 9:10 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] TDI filter
> >
> > Hello,
> >
> > I am writing TDI filter driver.
> > What fields I have to initialize when using IoAllocateIrp instead of
> > TdiBuildInternalDeviceControlIrp?
> > I also want to copy packets (like TDI_CONNECT, TDI_DISCONNECT,
> TDI_SEND
> > and
> > so on) and to send down my own packet instead. From DDK
documentation
> it
> > is
> > not clear what fields I have to copy from Irp and from stack
location
> as
> > well.
> >
> > Fro example, for TDI_CONNECT should I copy
AssociatedIrp.SystemBuffer?
> >
> > Thank you
> > Leonid
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@nai.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@v-one.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


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

Well, I believe that if LSP based VPN is working fine (even it has some
inherited problems) why TDI leven is not right place for VPN? I want
somebody explain me this approach is insane.
If you develope both client and server then it should work perfectly. If
client is going to work with third-party sever then some standard solution
(like IPSEC) has to be implemented.

Thank you
Leonid
----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, July 02, 2003 1:31 PM
Subject: [ntdev] Re: TDI filter

Leonid,
I believe you have to explain more at what you are doing. VPN at
TDI level does not look like a sane implementation to me. I may be
wrong, could you explain more?

-Srin.

> -----Original Message-----
> From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> Sent: Wednesday, July 02, 2003 10:17 AM
> To: NT Developers Interest List
> Subject: [ntdev] Re: TDI filter
>
> I use term ‘packet’ for IRP.
> BTW, why TDI is not good place for VPN? I have already NDIS - VPN
> implemented, but TDI have some attractive features also.
> Leonid
>
> ----- Original Message -----
> From: “James Antognini”
> Newsgroups: ntdev
> To: “NT Developers Interest List”
> Sent: Wednesday, July 02, 2003 12:43 PM
> Subject: [ntdev] Re: TDI filter
>
>
> > Look at the definition of TdiBuildInternalDeviceControlIrp in
tdiknrl.h.
> >
> > As for sending down “packets,” it’s not clear that you’re working
with
> > packets at the TDI level. In fact, given that a TDI client is above
> > TCP/IP (usually), I’d say that you’re probably not, because I
imagine
> > it’s TCP/IP that forms packets.
> >
> > May I ask why you want to send down your own packet? VPN
encapsulation,
> > perhaps? If so, I don’t think TDI the place to do that. Better an
NDIS
> > IM driver.
> >
> > –
> > If replying by e-mail, please remove “nospam.” from the address.
> >
> > James Antognini
> > Windows DDK MVP
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@v-one.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


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

I keep hearing of a TDI “filter driver,” but I’m not at all sure it’s a
robust solution, because only two approaches come to mind to do the
filtering: Overlaying TCP/IP’s dispatch points in its driver object, and
putting an entry into TCP/IP’s device stack(s). The first certainly
works but should be avoided because the approach will not pass WHQL (so
far as I can imagine) and, not unrelated, because it makes the driver
very closely dependent on the exact form that TCP/IP takes in a given
OS, service pack and so forth. The approach can be made to work, but
everything I’ve heard about it makes it sound like a solution that
requires a higher than usual expertise in the OS and sustained attention
to the possibility and fact of breakage.

The second approach is conceivable, but does anyone actually know that
TCP/IP allows – is designed and built for – such a stack, particularly
in view of the fact that NDIS is the approved approach and NDIS doesn’t
do its work at the IRP level?


If replying by e-mail, please remove “nospam.” from the address.

James Antognini
Windows DDK MVP

It’s not insane in general IMO, and I don’t know enough about your
application to know if it’s insane in this specific case. I imagine
it’s probably just fine though, if you’re designing your own VPN
system. IPSEC is another matter, of course.

-sd

On Wed, 2003-07-02 at 13:17, Leonid Meyerovich wrote:

Well, I believe that if LSP based VPN is working fine (even it has some
inherited problems) why TDI leven is not right place for VPN? I want
somebody explain me this approach is insane.
If you develope both client and server then it should work perfectly. If
client is going to work with third-party sever then some standard solution
(like IPSEC) has to be implemented.

Thank you
Leonid
----- Original Message -----
From:
> To: “NT Developers Interest List”
> Sent: Wednesday, July 02, 2003 1:31 PM
> Subject: [ntdev] Re: TDI filter
>
>
> Leonid,
> I believe you have to explain more at what you are doing. VPN at
> TDI level does not look like a sane implementation to me. I may be
> wrong, could you explain more?
>
> -Srin.
>
> > -----Original Message-----
> > From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> > Sent: Wednesday, July 02, 2003 10:17 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] Re: TDI filter
> >
> > I use term ‘packet’ for IRP.
> > BTW, why TDI is not good place for VPN? I have already NDIS - VPN
> > implemented, but TDI have some attractive features also.
> > Leonid
> >
> > ----- Original Message -----
> > From: “James Antognini”
> > Newsgroups: ntdev
> > To: “NT Developers Interest List”
> > Sent: Wednesday, July 02, 2003 12:43 PM
> > Subject: [ntdev] Re: TDI filter
> >
> >
> > > Look at the definition of TdiBuildInternalDeviceControlIrp in
> tdiknrl.h.
> > >
> > > As for sending down “packets,” it’s not clear that you’re working
> with
> > > packets at the TDI level. In fact, given that a TDI client is above
> > > TCP/IP (usually), I’d say that you’re probably not, because I
> imagine
> > > it’s TCP/IP that forms packets.
> > >
> > > May I ask why you want to send down your own packet? VPN
> encapsulation,
> > > perhaps? If so, I don’t think TDI the place to do that. Better an
> NDIS
> > > IM driver.
> > >
> > > –
> > > If replying by e-mail, please remove “nospam.” from the address.
> > >
> > > James Antognini
> > > Windows DDK MVP
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@v-one.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@nai.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@v-one.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@positivenetworks.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

I think that there is more than just another matter in TDI approach.
Firewall has to be configured to be able to pass IPSEC packets through, even
IPSEC is encapsulated into UDP/TCP (it is not easy to implement also).
Another matter is HTTP which usually goes through firewall without any
problems.

Thank you
Leonid

----- Original Message -----
From: “Steve Dispensa”
To: “NT Developers Interest List”
Sent: Wednesday, July 02, 2003 2:32 PM
Subject: [ntdev] Re: TDI filter

> It’s not insane in general IMO, and I don’t know enough about your
> application to know if it’s insane in this specific case. I imagine
> it’s probably just fine though, if you’re designing your own VPN
> system. IPSEC is another matter, of course.
>
> -sd
>
> On Wed, 2003-07-02 at 13:17, Leonid Meyerovich wrote:
> > Well, I believe that if LSP based VPN is working fine (even it has some
> > inherited problems) why TDI leven is not right place for VPN? I want
> > somebody explain me this approach is insane.
> > If you develope both client and server then it should work perfectly. If
> > client is going to work with third-party sever then some standard
solution
> > (like IPSEC) has to be implemented.
> >
> > Thank you
> > Leonid
> > ----- Original Message -----
> > From:
> > To: “NT Developers Interest List”
> > Sent: Wednesday, July 02, 2003 1:31 PM
> > Subject: [ntdev] Re: TDI filter
> >
> >
> > Leonid,
> > I believe you have to explain more at what you are doing. VPN at
> > TDI level does not look like a sane implementation to me. I may be
> > wrong, could you explain more?
> >
> > -Srin.
> >
> > > -----Original Message-----
> > > From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> > > Sent: Wednesday, July 02, 2003 10:17 AM
> > > To: NT Developers Interest List
> > > Subject: [ntdev] Re: TDI filter
> > >
> > > I use term ‘packet’ for IRP.
> > > BTW, why TDI is not good place for VPN? I have already NDIS - VPN
> > > implemented, but TDI have some attractive features also.
> > > Leonid
> > >
> > > ----- Original Message -----
> > > From: “James Antognini”
> > > Newsgroups: ntdev
> > > To: “NT Developers Interest List”
> > > Sent: Wednesday, July 02, 2003 12:43 PM
> > > Subject: [ntdev] Re: TDI filter
> > >
> > >
> > > > Look at the definition of TdiBuildInternalDeviceControlIrp in
> > tdiknrl.h.
> > > >
> > > > As for sending down “packets,” it’s not clear that you’re working
> > with
> > > > packets at the TDI level. In fact, given that a TDI client is above
> > > > TCP/IP (usually), I’d say that you’re probably not, because I
> > imagine
> > > > it’s TCP/IP that forms packets.
> > > >
> > > > May I ask why you want to send down your own packet? VPN
> > encapsulation,
> > > > perhaps? If so, I don’t think TDI the place to do that. Better an
> > NDIS
> > > > IM driver.
> > > >
> > > > –
> > > > If replying by e-mail, please remove “nospam.” from the address.
> > > >
> > > > James Antognini
> > > > Windows DDK MVP
> > > >
> > > >
> > > >
> > > > —
> > > > You are currently subscribed to ntdev as: xxxxx@v-one.com
> > > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > > >
> > >
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@nai.com
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@v-one.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@positivenetworks.net
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@v-one.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

Ok. I did not imagine a VPN solution which is not IPSEC.

-Srin.

-----Original Message-----
From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
Sent: Wednesday, July 02, 2003 11:18 AM
To: NT Developers Interest List
Subject: [ntdev] Re: TDI filter

Well, I believe that if LSP based VPN is working fine (even it has
some
inherited problems) why TDI leven is not right place for VPN? I want
somebody explain me this approach is insane.
If you develope both client and server then it should work perfectly.
If
client is going to work with third-party sever then some standard
solution
(like IPSEC) has to be implemented.

Thank you
Leonid
----- Original Message -----
From:
> To: “NT Developers Interest List”
> Sent: Wednesday, July 02, 2003 1:31 PM
> Subject: [ntdev] Re: TDI filter
>
>
> Leonid,
> I believe you have to explain more at what you are doing. VPN at
> TDI level does not look like a sane implementation to me. I may be
> wrong, could you explain more?
>
> -Srin.
>
> > -----Original Message-----
> > From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> > Sent: Wednesday, July 02, 2003 10:17 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] Re: TDI filter
> >
> > I use term ‘packet’ for IRP.
> > BTW, why TDI is not good place for VPN? I have already NDIS - VPN
> > implemented, but TDI have some attractive features also.
> > Leonid
> >
> > ----- Original Message -----
> > From: “James Antognini”
> > Newsgroups: ntdev
> > To: “NT Developers Interest List”
> > Sent: Wednesday, July 02, 2003 12:43 PM
> > Subject: [ntdev] Re: TDI filter
> >
> >
> > > Look at the definition of TdiBuildInternalDeviceControlIrp in
> tdiknrl.h.
> > >
> > > As for sending down “packets,” it’s not clear that you’re working
> with
> > > packets at the TDI level. In fact, given that a TDI client is
above
> > > TCP/IP (usually), I’d say that you’re probably not, because I
> imagine
> > > it’s TCP/IP that forms packets.
> > >
> > > May I ask why you want to send down your own packet? VPN
> encapsulation,
> > > perhaps? If so, I don’t think TDI the place to do that. Better an
> NDIS
> > > IM driver.
> > >
> > > –
> > > If replying by e-mail, please remove “nospam.” from the address.
> > >
> > > James Antognini
> > > Windows DDK MVP
> > >
> > >
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@v-one.com
> > > To unsubscribe send a blank email to
xxxxx@lists.osr.com
> > >
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@nai.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@v-one.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Srin,

You are right, in IoAttachDeviceToDeviceStack approach modify StackSize
value in DEVICE_OBJECT, so we always will have anough stack location.

Thank you
Leonid
----- Original Message -----
From:
To: “NT Developers Interest List”
Sent: Wednesday, July 02, 2003 1:29 PM
Subject: [ntdev] RE: TDI filter

Yes, you can. If you load at the right time, and set the device stack
count properly, the system allocates the right number of stack locations
for drivers sending IRPs. If you find the IO_STACK_LOCATIONS count is
not right and you are seeing a BSOD, you have to look at when your
driver is starting.
Believe me this all works well. You do not have to allocate a
new IRP. There were some bugs in netbt or some driver, but they were
fixed long time before, with latest service packs you do not have any
problems.

-Srin.

> -----Original Message-----
> From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> Sent: Wednesday, July 02, 2003 10:14 AM
> To: NT Developers Interest List
> Subject: [ntdev] RE: TDI filter
>
> Srin,
> I would love to use my own IO_STACK_LOCATION, but IRP has been created
by
> another driver and I cannot increase number of stack location, can I?
>
> Leonid
> ----- Original Message -----
> From:
> To: “NT Developers Interest List”
> Sent: Wednesday, July 02, 2003 12:42 PM
> Subject: [ntdev] RE: TDI filter
>
>
> Leonid,
> If you are using filter driver, why are you copying and creating
> a new IRP. You could use the same IRP and have your own
> IO_STACK_LOCATION.
>
> -Srin.
>
> > -----Original Message-----
> > From: Leonid Meyerovich [mailto:xxxxx@v-one.com]
> > Sent: Wednesday, July 02, 2003 9:10 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] TDI filter
> >
> > Hello,
> >
> > I am writing TDI filter driver.
> > What fields I have to initialize when using IoAllocateIrp instead of
> > TdiBuildInternalDeviceControlIrp?
> > I also want to copy packets (like TDI_CONNECT, TDI_DISCONNECT,
> TDI_SEND
> > and
> > so on) and to send down my own packet instead. From DDK
documentation
> it
> > is
> > not clear what fields I have to copy from Irp and from stack
location
> as
> > well.
> >
> > Fro example, for TDI_CONNECT should I copy
AssociatedIrp.SystemBuffer?
> >
> > Thank you
> > Leonid
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@nai.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@v-one.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@nai.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


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

Look at TdiBuildInternalDeviceControlIrp macro definition.

----- Original Message -----
From: “Leonid Meyerovich”
To: “NT Developers Interest List”
Sent: Wednesday, July 02, 2003 8:09 PM
Subject: [ntdev] TDI filter

> Hello,
>
> I am writing TDI filter driver.
> What fields I have to initialize when using IoAllocateIrp instead of
> TdiBuildInternalDeviceControlIrp?
> I also want to copy packets (like TDI_CONNECT, TDI_DISCONNECT,
TDI_SEND and
> so on) and to send down my own packet instead. From DDK
documentation it is
> not clear what fields I have to copy from Irp and from stack
location as
> well.
>
> Fro example, for TDI_CONNECT should I copy
AssociatedIrp.SystemBuffer?
>
> Thank you
> Leonid
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com

> I believe you have to explain more at what you are doing. VPN at

TDI level does not look like a sane implementation to me. I may be

Why not? The VPN driver will have a CoNDISWAN miniport upper edge and
a TDI client lower edge.

Max