LAN disconnection

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?

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, timr@probo.com
Providenza & Boekelheide, Inc.

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

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

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