Hi,

I am new on driver development so my question may be stupid for guru ^_^...

My driver is base on passthru NDIS from DDK, I try to develop an IP filter
and HTTP-DNS content filter.

I want to use SQLite to store a big list of ip and rules. I want to put this
code on a service.

My design question is :
- Is this solution is correct ( speed, complexity,... ).
- How my driver can communicate with the db service.

I see some info on WMI, but I have some interrogation on performance.

Thanks for your help,

A++

Re: Driver design interogation... by Mark

Mark
Mon Jun 19 06:53:19 CDT 2006

On Sun, 18 Jun 2006 06:24:01 -0700, wp78
<wp78@discussions.microsoft.com> wrote:

>Hi,
>
>I am new on driver development so my question may be stupid for guru ^_^...
>
>My driver is base on passthru NDIS from DDK, I try to develop an IP filter
>and HTTP-DNS content filter.
>
>I want to use SQLite to store a big list of ip and rules. I want to put this
>code on a service.
>
>My design question is :
> - Is this solution is correct ( speed, complexity,... ).
> - How my driver can communicate with the db service.
>
>I see some info on WMI, but I have some interrogation on performance.
>
>Thanks for your help,
>
>A++


The standard mechanism for driver to application (or service)
communication is the 'inverted call model'. This uses IOCTLs (private
IOCTLs that you design) for IRP based communication. The Application
is responsible for pending one or more of your private IOCTLs with
your driver. Your driver initiates a request by completing one of
these IOCTLS, putting the parameters for the request into the data
returned tot he application. The application then processes the
request and returns information to the driver using a second IOCTL. If
concurrency is a requirement then the request and response have to
have a token shared between them so that the driver can correlate the
response to its related request.

There is an NtInsider article detailing this mechanism - go to
www.osronline.com and look it up.


=====================
Mark Roddy DDK MVP
Windows Vista/2003/XP/2000 Consulting
Device and Filesystem Drivers
Hollis Technology Solutions 603-321-1032
www.hollistech.com

Re: Driver design interogation... by wp78

wp78
Mon Jun 19 12:05:02 CDT 2006

Thanks Mark, I found an other article on CodeProject, but yours is much
better, I already search on OSR, but I cannot be able to found it...

Thanks a lot,

Arnaud

_|||||_
o(^_^)o
<>o<>



"Mark Roddy" wrote:

> On Sun, 18 Jun 2006 06:24:01 -0700, wp78
> <wp78@discussions.microsoft.com> wrote:
>
> >Hi,
> >
> >I am new on driver development so my question may be stupid for guru ^_^...
> >
> >My driver is base on passthru NDIS from DDK, I try to develop an IP filter
> >and HTTP-DNS content filter.
> >
> >I want to use SQLite to store a big list of ip and rules. I want to put this
> >code on a service.
> >
> >My design question is :
> > - Is this solution is correct ( speed, complexity,... ).
> > - How my driver can communicate with the db service.
> >
> >I see some info on WMI, but I have some interrogation on performance.
> >
> >Thanks for your help,
> >
> >A++
>
>
> The standard mechanism for driver to application (or service)
> communication is the 'inverted call model'. This uses IOCTLs (private
> IOCTLs that you design) for IRP based communication. The Application
> is responsible for pending one or more of your private IOCTLs with
> your driver. Your driver initiates a request by completing one of
> these IOCTLS, putting the parameters for the request into the data
> returned tot he application. The application then processes the
> request and returns information to the driver using a second IOCTL. If
> concurrency is a requirement then the request and response have to
> have a token shared between them so that the driver can correlate the
> response to its related request.
>
> There is an NtInsider article detailing this mechanism - go to
> www.osronline.com and look it up.
>
>
> =====================
> Mark Roddy DDK MVP
> Windows Vista/2003/XP/2000 Consulting
> Device and Filesystem Drivers
> Hollis Technology Solutions 603-321-1032
> www.hollistech.com
>

Re: Driver design interogation... by Maxim

Maxim
Mon Jun 19 13:42:06 CDT 2006

> I want to use SQLite to store a big list of ip and rules. I want to put this
> code on a service.

No, firewall rules are always kept in kernel memory. Surely the persistent form
of them is kept somewhere on app level, for instance, in text files - but the
"operating" rules table is in the kernel memory.

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