On 6/24/05, Casper Hornstrup ch@csh-consult.dk wrote:
-----Original Message----- From: ros-dev-bounces@reactos.com [mailto:ros-dev-bounces@reactos.com] On Behalf Of Andrei Homescu Sent: 24. juni 2005 13:50 To: ros-dev@reactos.com Subject: [ros-dev] NDIS development
Hello!
I've been studying the sources for ndis.sys for a while and I started writing some functions, until now simple ones (wrappers for kernel calls). I would like to implement NdisAllocatePacketPoolEx and NdisPacketPoolUsage, but I don't think I can without modifying NDIS_PACKET_POOL in w32api/include/ddk/ndis.h. Is that data structure internal to ndis.sys or is publicly documented (and thus I can't touch it)? I would like to add a couple of new members to count the overflow packets and the used packets.
You can usually overlay the public structure with an internal NDIS structure to access internal fields from within NDIS.
Yeah, but what I'm asking is if it's safe to add new members to it without breaking existing drivers. It's not used in the Windows DDK anywhere, nor in the ReactOS sources. I think it would be safe, but maybe someone could prove me wrong. The structure itself is internal to NDIS. Maybe I could move it from the DDK header to the NDIS internal headers. As far as I have seen in the source code, any such variable is only referenced by a pointer.
I've also been reading "Undocumented Windows NT" and I have a few questions regarding some legal issues. Are the function declarations for documented functions copied&pasted from the DDK?
Most likely they are from MSDN or the Microsoft DDK documentation. If they are not documented, then they are either different from the structures used in Windows or from the DDK headers (needed if compatibility is required). No matter where they came from, they should have another format and the headers should have different layouts. If not, then you should rearrange or reformat them to avoid violating any copyright. Having identical structure layouts is not violating any copyright. It may violate some crazy patent though ;-(
The undocumented function declarations are obtained by disassembly of Windows sources? Doesn't snooping around kernel code violate any copyright law?
It depends on which country you are in. In Denmark where I live, it is legal to reverse engineer software for which you own a license to. See http://reactos.com/wiki/index.php/Intellectual_Property_Policy for more information.
Thank you, I hadn't read that document. It did clear up some pretty big issues for me. I live in Romania and AFAIK, the software laws here aren't very mature, so reverse-engineering of software isn't even covered (I'll have to check on that, though).
Thanks, Andrei Homescu