Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


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/


LAN disconnection

Alexey_YerakhavetsAlexey_Yerakhavets Member - All Emails Posts: 32

Hello!
I want to write a filter driver for my usb device, which disconnects the local network and access to the Internet when the device is connected to the system. Tried to use IOCTL_PF_SET_EXTENSION_POINTER, but the callback function is never called. The device should work on Windows XP and newer. Maybe there is some kind of universal solution?

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,401
    via Email
    On May 4, 2019, at 1:28 AM, Alexey_Yerakhavets wrote:
    >
    > I want to write a filter driver for my usb device, which disconnects the local network and access to the Internet when the device is connected to the system. Tried to use IOCTL_PF_SET_EXTENSION_POINTER, but the callback function is never called. The device should work on Windows XP and newer. Maybe there is some kind of universal solution?

    The task you describe would be much easier and much safer as a user-mode service. You can monitor for Plug-N-Play notifications, and when you see your device, you can manipulate the network configuration to your heart's content.

    Roberts Rule Number 1: Never do anything in kernel mode that can be done just as well in user mode.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • anton_bassovanton_bassov Member Posts: 5,158

    Roberts Rule Number 1: Never do anything in kernel mode that can be done just as well in user mode.

    Well, one may continue "The List of Roberts Rules" the following way

    Roberts Rule Number 2: Do one thing and do it well,

    Roberts Rule Number 3: Small is beautiful,

    Roberts Rule Number 4: Separate mechanisms from policy,

    and, probably,even

    Roberts Rule Number 5: Text stream is a universal interface

    At this point one has to recall that Windows NT kernel has been designed with exactly the opposite principles in mind......

    Anton Bassov

  • Peter_Viscarola_(OSR)Peter_Viscarola_(OSR) Administrator Posts: 7,802

    At this point one has to recall

    LOL... it is at this point one has to recall that you really shouldn’t be so overt in your trolling.

    Peter

    Peter Viscarola
    OSR
    @OSRDrivers

  • anton_bassovanton_bassov Member Posts: 5,158

    LOL... it is at this point one has to recall that you really shouldn’t be so overt in your trolling.

    Actually, I did not even mean to troll - as you must have noticed, these days I am trying to be a "positive character" who does not troll either overtly or otherwise....

    To be honest, I was just amused by Tim's attempt to "appropriate" one of the fundamental cornerstones of UNUX philosophy, and extended "The List of Roberts Rules"....

    Anton Bassov

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA