Re: IOCTL + XP SP2
From: Thomas F. Divine [DDK MVP] (tdivine_at_NOpcausaSPAM.com)
Date: 11/05/04
- Next message: microsoft: "Re: Time out for IOCTL_XOFF_COUNTER too short"
- Previous message: Philip F. Garofalo: "Re: WDM Support for Old School ISA Card"
- In reply to: Paolo Puricelli: "IOCTL + XP SP2"
- Next in thread: Calvin Guan: "Re: IOCTL + XP SP2"
- Reply: Calvin Guan: "Re: IOCTL + XP SP2"
- Reply: Maxim S. Shatskih: "Re: IOCTL + XP SP2"
- Reply: Paolo Puricelli: "Re: IOCTL + XP SP2"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 5 Nov 2004 10:20:57 -0500
Unfortunately, IOCTL_NDIS_QUERY_GLOBAL_STATS has always been defined to be a
query-only (read-only) interface. At least for many years developers have
been able to use the this simple API to perform some NIC management.
The behavior of IOCTL_NDIS_QUERY_GLOBAL_STATS certainly did change with XP
SP2. The changes are almost certainly related to security. In fact, I
suspect that they would like make the API dispappear altogether. I didn't
see the problem that you reported. However, I did see that on XP SP2 they
apparently make some strict buffer alignment tests on the input buffer
before they even attempt to handle the OID. The bug that I saw was that they
tested for 64-bit alignment even if the query was for a 32-bit value.
You might want to make the transition to using WMI or a companion NDIS
protocol driver to facilitate communication beteween your application and
your virtual NIC.
Good luck,
Thomas F. Divine, Windows DDK MVP
http://www.rawether.net
"Paolo Puricelli" <Paolo Puricelli@discussions.microsoft.com> wrote in
message news:6E4288FC-26CF-40E7-B4D2-913F09FB4D6C@microsoft.com...
> In year 2000 I developed a simple Virtual Network Driver in order to
> exchange
> messages from/to Microsoft IP to/from my user-space application that
> performs my
> proprietary data-link protocol (on both serial ports and modems).
>
> IP exchanges messages with my NIC in the standard way and my application
> puts/gets messages into/from my NIC through DeviceIoControl() function.
>
> I use the same IOCTL method with 2 different NDIS_OIDs to put messages
> into
> the
> NIC and to get messages from the NIC.
>
> #define IOCTL_NDIS_QUERY_GLOBAL_STATS \
> _NDIS_CONTROL_CODE(0, METHOD_OUT_DIRECT)
>
> The NIC was developed for Windows NT 4 (conforming to NDIS 4.0 miniport
> interface specifications) and it works also on Windows 2000 and on Windows
> XP.
>
> Now with Windows XP Service Pack 2 my application can correctly put into
> my
> NIC
> messages smaller than or equal to 278 bytes; when the application puts
> into
> my
> NIC messages larger than 278 bytes the messages that IP receives from NIC
> contain "dirty" information.
>
> What is the reason of this behaviour ?
> Maybe is it due to some kind of buffer overrun protection in Windows
> kernel
> message ?
>
> Thank you
> Paolo Puricelli
>
- Next message: microsoft: "Re: Time out for IOCTL_XOFF_COUNTER too short"
- Previous message: Philip F. Garofalo: "Re: WDM Support for Old School ISA Card"
- In reply to: Paolo Puricelli: "IOCTL + XP SP2"
- Next in thread: Calvin Guan: "Re: IOCTL + XP SP2"
- Reply: Calvin Guan: "Re: IOCTL + XP SP2"
- Reply: Maxim S. Shatskih: "Re: IOCTL + XP SP2"
- Reply: Paolo Puricelli: "Re: IOCTL + XP SP2"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|