Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
I want to send ip adresses stored in json file to wfp driver and block those ip's. But I am not getting how can I pass the buffer from
buffer = Irp->AssociatedIrp.SystemBuffer; to the clasifyfn or Addfilter function to match the ips.
|Upcoming OSR Seminars|
|OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!|
|Kernel Debugging||30 January 2023||Live, Online|
|Developing Minifilters||20 March 2023||Live, Online|
|Internals & Software Drivers||17 April 2023||Live, Online|
|Writing WDF Drivers||22 May 2023||Live, Online|
Global variable? Or am I missing something?
are you asking how to parse JSON in KM? or how to make a copy of the memory passed in an IRP that you can then use in another context?
My fault, I was trying to parse the json (using user mode libraries) in kernel mode.
I did it by parsing json in user application and then send the data.
It should be noted that parsing JSON in KM is also doable. Just like any other string format, the key is to understand the bounding conditions and create a state machine for the expected format. The central problem is always what to do when the data supplied is not in the expected format. UM implementations usually have features based on runtime type information, and usually fail by throwing exceptions, but a KM version has to expect specific elements and fail in a structured way. Once those requirements are certain, it is usually as simple as a while(i < len) loop with some state variables. Some prefer for loops, but I hate that idiom