Leaned interface between tcpip and ip lib to not include ndis buffers and
such, as well as datagram request structs. This both eliminates code
setting up these structs as well as making use of ip lib easier from userland.
Moved ndis buffer routines to tcpip/buffer.c. They are a bit separate from
the neutral routines functions.
svn path=/trunk/; revision=11171
from kernel land, or from userland with the help of drivers/lib/undis.
Hopefully, I'll be able to simulate a sufficient environment with undis
that we'll be able to test most problems with the ip system in userland.
This follows my general priniciple of getting most interesting code into
a place where we can really examine it and work with it. The interface
to the ip library is still a bit raw. I was hoping to do a better job
of isolating it and especially digging nt kernel dependencies out into
the remaining framework files (tcpip/dispatch.c, tcpip/fileobjs.c), but
it was taking too long. Hopefully I can return to that later.
svn path=/trunk/; revision=11127
the ambiguously linked library starts being used in km. There are further
cleanups i need to do, but hopefully having this checked in will help others
who are eager to help work on it.
svn path=/trunk/; revision=11126
Added a work item in lan.c re: dpc callback from the adapter. This keeps
us from needing mdl functions at dpc level.
Track IRPs to be completed with memtrack.
svn path=/trunk/; revision=11051
event: Don't report eof if we have bytes to deliver still.
Made a mistake moving statuses around. Requeue the request on
STATUS_PENDING.
svn path=/trunk/; revision=11016
Read : notify ourselves that the buffer is empty and reset the pointers.
Tdi : since the handler part is an inner function, don't return from it
but instead set Status and return afterward.
svn path=/trunk/; revision=11015
case because we can't contend with outselves in passive level.
Realized subtle bug in select.
Select needs a referenced file object rather than a handle. Will change
this when i get time.
svn path=/trunk/; revision=10993
Socket destruction is correct. When IRPs are left to cancel, the socket
will remain until all pending irps complete. The DestroySocket function
does this. It is always safe to call DestroySocket at any time after the
FsContext member of the FileObject has been nulled.
Fixed UDP data delivery in. UDP send still has a problem but it seems to
be in tcpip.sys more than likely. I've sliced another 6000 lines out of
tcpip.sys that i will debug as a userspace library and link to tcpip.
Fixed poll reeval (old reported bug fix I hadn't committed yet).
Miscellaneously better sanity in a few rough spots.
svn path=/trunk/; revision=10785
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
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
Regularized TCPSendData and TCPReceiveData parameters and calling.
Added number of bytes IoStatus for TDI_SEND_DATAGRAM and TDI_SEND as
specified in the OSR entry for TDI_SEND_DATAGRAM.
Fixed IRQL in packet send event. We now use KeRaiseIrql to make sure we're
in DISPATCH_LEVEL.
Fixed socket state callback for new afd. Now fully based on io completion.
svn path=/trunk/; revision=10032
- Standardized on recvfrom request and reply everywhere
- Added a continuous parameter to FillWSABuffers for stream sockets
- Added function TryToSatisfyRecvRequest
- Create MDLs for the WSABUFS. These are needed because we aren't in our
home process when tcpip calls back with data.
- Removed extraneous and potentially confusing lock ReadRequestQueueLock
Now both ReadRequestQueue and ReceiveQueue rely on ReceiveQueueLock
svn path=/trunk/; revision=9669