Combining multiple types of drivers

Hello all, new here with a little question. First the scenario:

  1. Am have recently been hired to maintain and expand a suite of drivers.
  2. The structure of the driver is this: 1 CDO driver that handles the user mode communication and process starts and registry filtering. 1 file system minifilter driver for file systems. 1 Ndis driver for filtering network. and 1 kernel dll to share memory between all three.
  3. I am thinking of rewriting all of them, or at least doing any consolidation work I can.

The question: Is it possible to roll all three actual drivers into one driver? I know it is completely possible to do file system, registry, and process notification all in one driver as I have done this before, but can you fit the network stuff in too?

I think your plan to consolidate these drivers is likely to be a mistake. It sounds to me, without having all the details you do of course, that the suite of drivers you inherited was pretty well designed.

Separate drivers, especially when the drivers use very different driver models, are simpler and easier to maintain in the long run. It makes updates easier. It keeps separate functionality separate. Why combine things into a tangled mess?

Peter

Peter, Thanks for the reply. The reason is to do away with the shared memory dll. My gut is to separate the drivers into three separate drivers and create a unified user mode communication layer. Other developers are leaning to the unification, so that’s why I asked that way. The drivers are old and were not written the best way originally (e.g. using extensive c++ before it was supported and similar issues). I am trying to gather all possible remedies and doing research so that I can make a good recommendation on what to do going forward. If we come to the decision not to change the design, it will still require significant refactoring to implement the new functionality i am being requested to implement. Also, because the reliance on the shared memory, all drivers are version locked anyway.

Are you looking something like this…
https://github.com/OSRDrivers/kmexts