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

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

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: 12,966
    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: 4,984

    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,211

    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: 4,984

    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
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA