tcpip: provide malloc + free, sleep + wakeup functions
oskittcp: remove functions and headers that imply km and supply them from the
user.
tcp_usrreq: i was printing a possibly free mbuf here.
svn path=/trunk/; revision=10734
Closing a socket doesn't crash but still hangs. Needs work.
oskittcp: corrected problem with send data, trying out slightly different
scheme of dealing with closed socket.
tcpip: added support for SEL_FIN in socket state callback and corrected
support for returning error in TCPReceiveData.
svn path=/trunk/; revision=10650
no deleted code this time around. all properly ifdef'd
more use of bsd style adapter structs and adapter queries with provided
support by tcpip.sys.
correct prototypes
some diff output is reformatting
tcpip: some bug fixes, -Wall -Werror on, all prototypes in
remove the need for MaxLLHeaderSize anywhere except lan.c
unify meaning of Header and Data members of IP_PACKET
unify PCHAR types in routines.c
move one more address into the struct, eliminating management and extra
poll alloc in NCE
eliminate wrong use of PIP_INTERFACE as NTE pointer in dispatch functions
other fixes
svn path=/trunk/; revision=10601
Tail.Overlay.Thread member themselves in the new Irp. These calls
to IoAllocateIrp were not followed by setting the thread.
svn path=/trunk/; revision=10502
- Don't call IoBuildAsynchronousFsdRequest with NULL buffer for read/write requests. It's explicitly prohibited per DDK documentation and causes crashes on Windows (R) NT systems.
svn path=/trunk/; revision=10395
FAT*FindAndMarkAvailableCluster which have incorporated the setting of
EOF marker in the File Allocation Table for the returned cluster.
- Rewritten FAT32CountAvailableClusters, FAT32FindAndMarkAvailableCluster,
FAT16CountAvailableClusters and FAT16FindAndMarkAvailableCluster for
better performance. These functions were using one big loop for traversing
the FAT and had a block of code in the loop for requesting cache manger
for next chunk of FAT *if necessary* (which commonly wasn't the case).
Now it's changed to request always a whole FAT chunk and process it at once
in a nested loop.
- Cache last offset + cluster pair while reading/writing from/to file. This
ensures almost linear times when doing sequential reads/writes, because the
whole FAT traversing for the file is not done again for every request.
Previously there was code for this, but it was neither correctly used
nor working. It stored the last offset + cluster pair in file CCB structure
(that is unique for each opened file handle) and not FCB structure (which
is shared among all instances of the same file). This resulted in
inconsistent cluster + offset number when the file allocation chain was
changed (eg. by enlarging/shrinking the file), but since the cached offsets
weren't actully used it went unnoticed.
- Remove old hack from NextCluster and fix the call to it in VfatAddEntry.
Not much to say about it, there was an temporary hack in NextCluster and
with fixed VfatAddEntry it's now no longer needed.
- Add pointers to WriteCluster, FindAndMarkAvailableCluster and
GetNextCluster functions to device extension (set during mount) and use
them at appropriate locations. This avoids some nasty if's in the code
and causes some unnoticable performance improvment in the low-level
FAT code.
- Lock the directory FCB in VfatAddEntry while modifying it. This should
propably be done on more places, but it needs more investigations.
- Increase the file cache allocation size in VfatRead/VfatWrite. It boosts
the overall speed of the driver a lot.
svn path=/trunk/; revision=10344
Fixed subtle bug in miniport.c: if exactly one protocol is registered we
would skip it in MiniIndicateData because we took the .Flink value from the
list head, then compared CurrentEntry->Flink to the list head address.
svn path=/trunk/; revision=10307
http://www.osr.com/ddk/network/103ndisx_51pu.htm
NdisMEthIndicateReceive passes an NDIS_HANDLE (Specifically,
MiniportAdapterHandle), rather than the ETH_FILTER structure. God knows why
this wasn't caught before but it did awfully strange stuff including the
occasional crash, and more importantly, seemingly randomly corrupting the
LAN_ADAPTER and IP_INTERFACE structures in tcpip.sys when we landed in
packet receiving in datalink/lan.c. Fixed now.
svn path=/trunk/; revision=10276
Added some tracing.
Converted afd.sys to use METHOD_NEITHER in the correct places.
oskittcp: Added some tracking in tcp_input and tcp_output to help look for
the ack bug.
tcpip: some cleaning. Realized that an NTE was getting sent to IPReceive as
the Context parameter, but was later treated as IP_INTERFACE. Changed
prototypes to keep this from happening again.
svn path=/trunk/; revision=10207