Art Yerkes
28bfa5fcdd
Implemented non-blocking recv and recvfrom.
...
Fixed address pass-through in afd.
Fixed some address cruft in udp and datagram regarding incoming
datagrams.
svn path=/trunk/; revision=11671
2004-11-15 18:24:57 +00:00
Art Yerkes
323b7c4460
UDP working.
...
svn path=/trunk/; revision=11657
2004-11-14 19:45:16 +00:00
Art Yerkes
dea7f87980
Prevent some deadlock scenarios by unlocking the FCB while calling into
...
tcpip.sys.
svn path=/trunk/; revision=11625
2004-11-12 07:34:56 +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
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
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
Art Yerkes
0999a0ef81
Preliminary version of recv.
...
svn path=/trunk/; revision=9666
2004-06-14 03:22:27 +00:00
Filip Navara
1f2169eb29
2004-04-04 Filip Navara <xnavara@volny.cz>
...
* drivers/net/afd/afd/dispatch.c (AfdDispGetName): Implement.
* drivers/net/afd/include/afd.h (TdiQueryInformation): Declare.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiQueryInformation):
Partially implement for TDI_QUERY_ADDRESS_INFO request.
* drivers/net/tcpip/transport/tcp/tcp.c (TCPiBuildPacket):
Don't use variable name NdisBuffer, because it causes conficts.
svn path=/trunk/; revision=8543
2004-03-05 00:48:11 +00:00
Casper Hornstrup
318a90741d
2004-03-04 Casper S. Hornstrup <chorns@users.sourceforge.net>
...
* drivers/net/tcpip/tcpip/i386: New directory.
* drivers/net/tcpip/tcpip/i386/checksum.S: New file.
* drivers/net/tcpip/notes.txt: New file.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): Signal ACCEPT
network event.
(AfdDispEventSelect): Reference event handle.
* drivers/net/afd/afd/tdi.c (TdiListen): Remove unused event.
Move Iosb and RequestConnectionInfo to AFD_LISTEN_REQUEST structure.
* drivers/net/afd/include/afd.h (AFDFCB): Replace EventObjects with
EventObject of type PKEVENT.
* drivers/net/tcpip/makefile (ARCH_OBJECTS): New variable.
(TARGET_OBJECTS): Add ARCH_OBJECTS.
* drivers/net/tcpip/include/address.h (AddrCloneAddress): New prototype.
* drivers/net/tcpip/include/checksum.h (ChecksumFold, csum_partial): New
prototype.
(TCPv4Checksum): New macro.
(CorrectChecksum): Rename to IPv4CorrectChecksum.
(TCPv4CorrectChecksum): New macro.
* drivers/net/tcpip/include/ip.h (IPv4_DF_MASK): New constant.
* drivers/net/tcpip/include/tcp.h (TCP_XXX): Correct constants.
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment): Prototype.
* drivers/net/tcpip/include/titypes.h (TCP_SEND_REQUEST): Add SequenceNumber
and AckNumber.
(TCP_SEGMENT): New structure.
(CONNECTION_ENDPOINT): Add ListenRequest and ReceivedSegments.
* drivers/net/tcpip/network/transmit.c (SendFragments): Release memory
for Data on failure.
* drivers/net/tcpip/tcpip/address.c (AddrCloneAddress): New function.
* drivers/net/tcpip/tcpip/checksum.c (ChecksumFold): Factor out folding
from ChecksumCompute.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiListen): Support asynchronous
operation.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't cast to
PTDI_ADDRESS_IP.
Initialize ReceivedSegments.
* drivers/net/tcpip/tcpip/routines.c (DisplayIPHeader): New function.
(DisplayIPPacket): Call DisplayIPHeader().
(DisplayTCPHeader): Change format strings.
* drivers/net/tcpip/transport/tcp/tcp.c (IPIdentification,
TCPSegmentList): Add.
(TCPCreateSegment, TCPFreeSegment, TCPAddSegment,
TCPBuildAndTransmitSendRequest2, TCPiSelectISS, TCPiReceiveListen,
TCPiReceiveSynSent, TCPiReceiveSynReceived, TCPiReceiveData): New
function.
(TCPiBuildPacket): Build segment.
(TCPStartup): Initialize TCPSegmentList.
(TCPShutdown): Cleanup TCPSegmentList.
svn path=/trunk/; revision=8537
2004-03-04 20:45:39 +00:00
Filip Navara
daaf2a72b8
- Build AFD, TCPIP and TDI with w32api headers.
...
- Removed the old TDI headers from include/net.
svn path=/trunk/; revision=8508
2004-03-02 18:18:15 +00:00
Art Yerkes
8c9fd64030
Edited includes for new tcp ioctl needed by iphlpapi.
...
tcpioctl.h: new
I resolved a conflict between iptypes, structs and nspapi regarding some
core structures.
afd.h: removed definitions needed by both user land and kernel land.
tdiinfo.h: added needed definitions.
svn path=/trunk/; revision=8173
2004-02-14 21:27:35 +00:00
Filip Navara
8ccf098ee6
reactos/drivers/net/afd/afd/afd.c (AfdDispatch): Correctly set
...
Irp->IoStatus.Information.
(AfdUnload): Make it STDCALL.
(DriverEntry): Don't cast function pointers.
reactos/drivers/net/afd/afd/dispatch.c (AfdDispGetName): New function, still
incomplete.
reactos/drivers/net/afd/include/afd.h (AfdDispGetName): Declare.
reactos/drivers/net/tcpip/tcpip/main.c (TiDispatchOpenClose):
Use STDCALL instead of STDCALL_FUNC.
(TiUnload): Make it STDCALL.
(DriverEntry): Don't cast function pointers.
reactos/drivers/net/tcpip/transport/tcp/tcp.c (TCPConnect):
Don't free the NDIS buffer, it's already done on another place and return
STATUS_PENDING to avoid completing the Irp two times.
reactos/lib/msafd/misc/stubs.c (WSPGetSockName, WSPGetPeerName):
Moved to ...
reactos/lib/msafd/misc/dllmain.c (WSPGetSockName, WSPGetPeerName):
... here, direct the calls to afd.sys.
svn path=/trunk/; revision=8132
2004-02-10 17:12:42 +00:00
Eric Kohl
cdcb7ec378
Remove ntos.h and roskrnl.h from kernel-mode code.
...
svn path=/trunk/; revision=7900
2004-01-28 20:55:50 +00:00
Filip Navara
73b404c2ea
- Removed some obsolete headers.
...
- Converted some of the (mostly network) stuff to compile with W32API.
svn path=/trunk/; revision=7573
2004-01-11 20:46:06 +00:00
Casper Hornstrup
08ba5babf3
2003-12-25 Casper S. Hornstrup <chorns@users.sourceforge.net>
...
* apps/utils/net/roshttpd/error.cpp (ReportErrorStr): Cast to wchar_t*,
not __wchar_t*.
* apps/utils/net/roshttpd/makefile (TARGET_CPPFLAGS): Add -Wno-deprecated.
(TARGET_GCCLIBS): Add stdc++.
* apps/utils/net/roshttpd/common/socket.cpp: Include <string.h>.
* apps/utils/net/roshttpd/common/thread.cpp (CThread::CThread): Fix
warning.
* drivers/net/afd/afd/afd.c (ListenRequestLookasideList): New variable.
(DriverEntry): Initialize ListenRequestLookasideList.
* drivers/net/afd/afd/dispatch.c (AfdDispCompleteListen): New function.
(AfdDispListen): Partial implement.
* drivers/net/afd/afd/opnclose.c (AfdInitializeFCB): Initialize
NewFCB->ListenRequestQueue.
(AfdKillListenRequests): New function.
(AfdClose): Call AfdKillListenRequests.
* drivers/net/afd/afd/routines.c (DumpName): New function.
* drivers/net/afd/afd/tdi.c (TdiAddressSizeFromType): New function.
(TdiBuildConnectionInfo): Initialize ConnInfo->OptionsLength.
(TdiBuildNullConnectionInfo): New function.
(TdiOpenAddressFileIPv4, TdiOpenConnectionEndpointFile): EaName is
0-terminated.
(TdiListen): New function.
* drivers/net/afd/include/afd.h (AFDFCB): Add ListenRequestQueue.
(AFD_LISTEN_REQUEST): New structure.
(ListenRequestLookasideList): Declare.
(DumpName, TdiListen): Add prototypes.
* drivers/net/tcpip/datalink/lan.c (BindAdapter): Initialize
AnsiAddress.Length and AnsiAddress.MaximumLength.
* drivers/net/tcpip/include/debug.h: Define DEBUG_TCP.
* drivers/net/tcpip/include/routines.h (DisplayTCPPacket): Add
prototype.
(DISPLAY_TCP_PACKET): Define.
* drivers/net/tcpip/include/tcp.h (TCPListen): Add prototype.
* drivers/net/tcpip/include/titypes.h (ADDRESS_FILE): Add Connection.
* drivers/net/tcpip/network/ip.c (IPLocateNTEOnInterface): Cleanup.
* drivers/net/tcpip/tcpip/address.c (AddrSearchNext): Port is in
network byte order.
* drivers/net/tcpip/tcpip/dispatch.c (DispTdiAssociateAddress):
Initialize AddrFile->Connection.
(DispTdiListen): Implement.
* drivers/net/tcpip/tcpip/fileobjs.c (FileOpenAddress): Don't
initialize AddrFile->Connections.
* drivers/net/tcpip/tcpip/routines.c: Include <tcp.h>.
(DisplayIPPacket): Enable.
(DisplayTCPHeader, DisplayTCPPacket): New functions.
* drivers/net/tcpip/transport/tcp/tcp.c: Include <routines.h>.
(TCPListen, TCPiReceive): New functions.
(TCPReceive): Partial implement.
* lib/msafd/misc/helpers.c (CreateHelperDLLDatabase): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
* lib/ntdll/ldr/utils.c (LdrLoadDll): Print name of DLL if not found.
* lib/ws2_32/include/ws2_32.h (Initialized): Declare.
(WINSOCK_THREAD_BLOCK): Remove Initialized member.
* (WSAINITIALIZED, WSASETINITIALIZED): Update.
* lib/ws2_32/misc/catalog.c (CreateCatalog): Add
{SOCK_STREAM,IPPROTO_TCP,0} and {SOCK_DGRAM,IPPROTO_UDP,0} mappings.
(Initialized): New variable.
(DllMain): Don't initialize p->Initialized.
* ntoskrnl/dbg/kdb.c: Include <ctype.h>.
* subsys/win32k/ntuser/message.c (NtUserDispatchMessage): Kill noisy
message.
svn path=/trunk/; revision=7232
2003-12-25 14:06:15 +00:00
Casper Hornstrup
922b9fdf46
2003-06-07 Casper S. Hornstrup <chorns@users.sourceforge.net>
...
Changes for compiling with w32api
* include/ddk/cctypes.h (PREACTOS_COMMON_FCB_HEADER): Remove.
(FSRTL_COMMON_FCB_HEADER): Add.
* include/ddk/iotypes.h (FILE_OBJECT): Rename field
SectionObjectPointers to SectionObjectPointer.
* ntoskrnl/cc/copy.c, ntoskrnl/cc/misc.c, ntoskrnl/cc/pin.c,
ntoskrnl/cc/view.c, ntoskrnl/io/rawfs.c, ntoskrnl/mm/section.c,
drivers/fs/cdfs/cleanup.c, drivers/fs/cdfs/fcb.c,
drivers/fs/cdfs/fsctl.c, drivers/fs/ntfs/fcb.c, drivers/fs/ntfs/fsctl.c,
drivers/fs/vfat/close.c, drivers/fs/vfat/create.c,
drivers/fs/vfat/finfo.c, drivers/fs/vfat/fcb.c, drivers/fs/vfat/fsctl.c:
Use new FILE_OBJECT structure.
* drivers/fs/cdfs/cdfs.h, drivers/fs/ntfs/ntfs.h, drivers/fs/vfat/vfat.h:
Use new FSRTL_COMMON_FCB_HEADER structure.
* drivers/net/afd/include/afd.h (FSRTL_COMMON_FCB_HEADER): Remove.
* include/ddk/ketypes.h (KQUEUE): Match w32api structure.
* ntoskrnl/ke/queue.c, ntoskrnl/ke/wait.c: Use new structure.
* ntoskrnl/ke/spinlock.c (KeAcquireSpinLockAtDpcLevel,
KeReleaseSpinLockFromDpcLevel): Undefine before declaring.
svn path=/trunk/; revision=4865
2003-06-07 11:34:36 +00:00
Casper Hornstrup
17c0b5798e
Reverted latest changes.
...
svn path=/trunk/; revision=3473
2002-09-08 10:23:54 +00:00
Casper Hornstrup
387d432884
Use free Windows DDK and compile with latest MinGW releases.
...
svn path=/trunk/; revision=3466
2002-09-07 15:13:13 +00:00
Casper Hornstrup
3a9de284ad
Updated clean rules.
...
Implemented sequenced lists and lookaside lists.
Started on TCP/IP connection endpoints.
Save process window station in EPROCESS instead of PEB.
NOTICE: please do a make win32k_clean or you might experience a crash
svn path=/trunk/; revision=2036
2001-07-04 20:40:24 +00:00
Casper Hornstrup
a3ba68ae58
More work on winsock stack (ping is now working)
...
svn path=/trunk/; revision=1971
2001-06-15 17:48:43 +00:00
Casper Hornstrup
514cb6a689
Raw IP and ICMP fixes
...
More work on winsock stack (not usable yet though)
Support for loading symbols for user mode modules
svn path=/trunk/; revision=1941
2001-06-04 11:26:13 +00:00
Casper Hornstrup
1debf1a12d
Work on winsock stack and indentation corrections.
...
svn path=/trunk/; revision=1849
2001-05-01 22:44:07 +00:00
Casper Hornstrup
05ccbb2696
Some work on winsock stack
...
svn path=/trunk/; revision=1514
2001-01-14 17:44:38 +00:00