TDI driver help

Hi all,

I’ve written a TDI driver that filters TCP and UDP by attaching to the
devices in DriverEntry.

What I would like to know what changes I would need to make so that an
AddDevice function can be called for each TDI device already present (e.g.
TCP, UDP, RawIP etc) in a similar way to how an NDIS IM driver initializes a
new device for each network adapter present.

Thanks in advance,
Simon

Simon,

Look at the TDI documentation in the DDK, specifically the
TdiRegisterPnPHandler() function or if you need to go back a bit,
TdiRegisterNotificationHandler().

When you register a notification handler (pnp handler) TDI will call your
handler to notify you of every transport device in the system. Later, when
a transports come and go, you will be called with notifications.

And caveat emptor! There are some oddities when using this function,
especially with TCPIP. If you register before TCPIP, when the callout
occurs on TCPIP creating, for instance, \Device\Tcp, you may not be able to
lookup and reference the device object yet since TCPIP does not mark the DO
as ready before calling to register it.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development

“Simon Dale” wrote in message news:xxxxx@ntdev…
> Hi all,
>
> I’ve written a TDI driver that filters TCP and UDP by attaching to the
> devices in DriverEntry.
>
> What I would like to know what changes I would need to make so that an
> AddDevice function can be called for each TDI device already present (e.g.
> TCP, UDP, RawIP etc) in a similar way to how an NDIS IM driver initializes
> a new device for each network adapter present.
>
> Thanks in advance,
> Simon
>
>
>