Commit graph

210 commits

Author SHA1 Message Date
Art Yerkes 8eb5ca6ffa Final propogation of TDI_CONNECTION_INFORMATION/TRANSPORT_ADDRESS changes.
svn path=/trunk/; revision=11175
2004-10-03 21:44:43 +00:00
Art Yerkes bab3b21d32 Propogating TDI address changes.
svn path=/trunk/; revision=11174
2004-10-03 21:16:31 +00:00
Art Yerkes fc4b179d93 New file buffer.c which contains NDIS_BUFFER and NDIS_PACKET routines.
svn path=/trunk/; revision=11172
2004-10-03 20:39:19 +00:00
Art Yerkes 5394560307 Fixed UDP protocol.
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
2004-10-03 20:38:48 +00:00
Art Yerkes a52618ca99 Fixed use of TA_ADDRESS in favor of TRANSPORT_ADDRESS. This still confuses
me.
write, read: Handle errors correctly.

svn path=/trunk/; revision=11170
2004-10-03 20:36:46 +00:00
Art Yerkes 7b91f0c3fb Fixed makefile. Wrong name for ip.a
svn path=/trunk/; revision=11132
2004-09-30 16:30:43 +00:00
Art Yerkes 0bccb9dbb0 Most files moved to linkable library drivers/lib/ip, which can be linked
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
2004-09-30 06:00:42 +00:00
Art Yerkes 4ec1a851b9 Changes to the interface to componentized ip library. This commit is where
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
2004-09-30 05:44:10 +00:00
Art Yerkes e1741d6626 Use the recursive mutex to lock the TCP.
svn path=/trunk/; revision=11057
2004-09-25 21:32:56 +00:00
Art Yerkes 3a4c09d746 More experimental detritus. Sorry about that.
svn path=/trunk/; revision=11055
2004-09-25 21:08:53 +00:00
Art Yerkes 91fea9194d Previously checked in with some detritus from some experimental rtl stuff.
Fixed.

svn path=/trunk/; revision=11052
2004-09-25 20:38:46 +00:00
Art Yerkes 3725308f3e Fixed connection locking in tcp.c
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
2004-09-25 20:24:00 +00:00
Art Yerkes d7a6bf353f Also wait in the success, no data case in socket state change.
svn path=/trunk/; revision=11022
2004-09-24 00:56:39 +00:00
Art Yerkes 2c75d67c33 Fix send function as well to properly deallocate the irp on failure on
MmProbeAndLockPages.

svn path=/trunk/; revision=11021
2004-09-24 00:51:31 +00:00
Art Yerkes b0f758cf33 tcp: print error when we can't allocate a bucket.
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
2004-09-23 20:51:46 +00:00
Art Yerkes e91d1416ab Write: print bytes returned so we can see it.
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
2004-09-23 20:48:40 +00:00
Art Yerkes d774499bf8 event.c: Don't infinite loop while completing a zero-length read.
tcp.c: Correctly pass on length in recv.

svn path=/trunk/; revision=10999
2004-09-23 14:16:27 +00:00
Art Yerkes 51580f3182 Fixes: Lock does not need to acquire a spinlock in the non-passive-level
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
2004-09-23 06:42:16 +00:00
Art Yerkes 83fc2a9406 Removed arp.h until the arp part is finished.
svn path=/trunk/; revision=10885
2004-09-17 15:51:07 +00:00
Art Yerkes 885107a541 lan.sys is a simple driver providing access to ndis. This stuff is
ripped from tcpip.sys in preparation for a big breakup.

svn path=/trunk/; revision=10884
2004-09-17 15:50:16 +00:00
Gé van Geldorp d3275bbd8b Get rid of .edf files
svn path=/trunk/; revision=10871
2004-09-16 10:25:18 +00:00
Art Yerkes 703e2aa5f9 Fixes:
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
2004-09-05 04:26:30 +00:00
Art Yerkes 8e1426d027 Implement WSHGetWildcardAddress
svn path=/trunk/; revision=10766
2004-09-01 03:39:29 +00:00
Art Yerkes 9980d7cf9c Since system services are now provided by the client, we need the
callback struct first.

svn path=/trunk/; revision=10743
2004-08-30 18:12:30 +00:00
Art Yerkes aa3eb8fc7c Oskit can now be linked from userland. This is part one of my plan.
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
2004-08-29 20:04:42 +00:00
Art Yerkes c24ef8433f AFD: Fixed handling of cancelling in flight requests when closing the socket.
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
2004-08-22 18:42:42 +00:00
Art Yerkes 36d2e136c7 Fixed missing unlock in write.
svn path=/trunk/; revision=10649
2004-08-22 02:15:57 +00:00
Art Yerkes 5eef6d16e3 Removed ASSERT_KM macro. It's not used any longer.
svn path=/trunk/; revision=10619
2004-08-20 16:26:10 +00:00
Magnus Olsen ee97250d94 fix
gcc 3.3.x stop comiling and give a error msg
network/icmp.c: In function `SendICMPComplete':
network/icmp.c:28: warning: unused variable `IPPacket'
make[1]: *** [network/icmp.o] Error 1
make: *** [tcpip] Error 2

svn path=/trunk/; revision=10615
2004-08-20 09:44:20 +00:00
Art Yerkes 9d7db6ee1c oskittcp: new import. less diff output versus pure sources.
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
2004-08-19 21:39:00 +00:00
Casper Hornstrup ad002d5bd9 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/include/.cvsignore: New file.
	* drivers/net/tcpip/include/precomp.h: New file.
	* drivers/net/tcpip/Makefile (TARGET_PCH): Set to include/precomp.h.
	* drivers/net/tcpip/tests/Makefile (TARGET_PCH): Reset.
	* drivers/net/tcpip/*/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10569
2004-08-15 23:41:26 +00:00
Casper Hornstrup 455ea22b67 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/ndis/include/.cvsignore: New file.
	* drivers/net/ndis/.cvsignore: Add *.d.
	* drivers/net/ndis/Makefile (TARGET_PCH): Set to include/ndissys.h.
	* drivers/net/ndis/*.c: Use pre-compiled header.

svn path=/trunk/; revision=10568
2004-08-15 23:12:33 +00:00
Casper Hornstrup 7ffd28c060 2004-08-16 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/afd/include/.cvsignore: New file.
	* drivers/net/afd/include/tdiconn.h: Don't include <afd.h>.
	* drivers/net/afd/.cvsignore: Add *.d.
	* drivers/net/afd/makefile (TARGET_PCH): Set to include/afd.h.

svn path=/trunk/; revision=10567
2004-08-15 22:51:57 +00:00
Filip Navara a5154371b4 - Use NDIS_DbgPrint instead of DbgPrint for NDIS buffer messages.
svn path=/trunk/; revision=10383
2004-08-04 00:19:11 +00:00
Thomas Bluemel 7d74fb9d99 fixed compiling errors with gcc 3.4.x
svn path=/trunk/; revision=10311
2004-07-29 16:46:22 +00:00
Art Yerkes bc0ec8c03d Fixed includes so that DBG keys on roscfg.h
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
2004-07-29 05:00:43 +00:00
Art Yerkes c14c59021f Accidentally missed one breakpoint from the previous debugging session.
svn path=/trunk/; revision=10306
2004-07-29 04:10:53 +00:00
Art Yerkes c0dd64494d Fixed memory overwrite due to too-small allocation.
svn path=/trunk/; revision=10305
2004-07-29 04:09:06 +00:00
Art Yerkes a85dce53e9 According to this osr page:
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
2004-07-24 04:48:01 +00:00
Filip Navara bdedaa4fe0 - Support for deserialized miniports (experimental).
svn path=/trunk/; revision=10255
2004-07-22 18:54:36 +00:00
Art Yerkes 659a6041bc Forgot to add file tilists.h
svn path=/trunk/; revision=10220
2004-07-19 04:30:04 +00:00
Art Yerkes 6a793b2703 Fixed after prototype change.
svn path=/trunk/; revision=10212
2004-07-18 22:53:59 +00:00
Art Yerkes 0f1eb55991 First commit of afd and msafd onto head.
tcpip: Turned off debug info in CVS.

svn path=/trunk/; revision=10210
2004-07-18 22:49:18 +00:00
Art Yerkes 6ac4bce416 msafd + afd: Changed type of PVOID args to PAFD_WSABUF, avoiding some casts.
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
2004-07-18 22:03:49 +00:00
Art Yerkes e6f5d067e0 oskittcp: fixed handling of uio in send.
afd: fixed send.
tcpip: fixed double-complete of send irp.

svn path=/trunk/; revision=10122
2004-07-15 03:21:47 +00:00
Art Yerkes 494edc04e5 Fixed for TCPIP
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
2004-07-08 06:36:04 +00:00
Gé van Geldorp 20180bf59f Silence debug messages
svn path=/trunk/; revision=10006
2004-07-07 08:39:54 +00:00
Filip Navara 8fab52126f - Fix errors during optimized build.
svn path=/trunk/; revision=9983
2004-07-03 17:40:27 +00:00
Art Yerkes 5954327e76 Change from unclegarlic: Don't overwrite packet length.
svn path=/trunk/; revision=9718
2004-06-19 02:03:33 +00:00
Art Yerkes 5fd39d97bb recv now works every time
- 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
2004-06-15 02:56:13 +00:00