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
appear to be part of the definition and is not done in the UDP case.
event: I moved the close notify into it's own function so that it can be
worked on separately.
svn path=/trunk/; revision=9665
that was causing a bugcheck in the 'ping to us' case. The memory was detected
tracked twice (correctly).
This condition was detected by mifritcher after I checked in.
svn path=/trunk/; revision=9659
networking code.
There is individual change info on the branch arty_20040329.
Here is a summary of what changed:
tcpip:
- Added a mostly working transport/tcp branch based on oskittcp
(checked in at drivers/lib/oskittcp). This code shares almost nothing
with the previous version.
- Regularized IRP handling
- Fixed ownership of buffers throughout tcpip.sys. Buffers are now
required to be copied in a few more cases, but everybody can call
anybody else and not have to worry about keeping a buffer alive
for any specific reason.
- Also moved lots more operations onto the stack (small datastructures
and pointers). This will result in a further simplification of the
code here.
- Made each completion routine solely responsible for freeing memory
from the corresponding action.
- Removed reference counted small address structures in favor if inlines
- Changed and clarified ownership rules almost everwhere
- Fixed a few more type punning style errors
- Added more info used by iphlpapi
- Added some memory tracing stuff
ndis:
- Fixed one or two type punning errors
ws2_32:
- Added getservbyname and getprotobyname (partial)
oskittcp:
- Diagnostics everywhere
- Eliminated dependence on raw_ip input
- Simplified buffering and signalling model a bit
- Added memory checking as in tcpip
- more to come
svn path=/trunk/; revision=9647
Broke out some functions in info.c -- They still don't work properly but
are improving.
Added setting of netmask in datalink/lan.c from the registry, broke out
registry reading function.
svn path=/trunk/; revision=8661
Connected ControlChannel handle type.
Allowed empty EaInfo in create -> ControlChannel.
Added TDI entity for interfaces.
Fixed IPSnmpInfo interface number report.
Fixed returned buffer size report in DispTdiQueryInformationExComplete
Added IPROUTE_ENTRY struct.
What works:
tcpquery lists three entities, two builtin and one IF_ENTITY
tcpquery -i reports 1 interface and 1 address for me (addr=127.0.0.1)
TODO:
Type information for each entity (only two builtin entities are supported now)
Interface info out (IFEntry)
Route info in/out (IPRouteEntry)
svn path=/trunk/; revision=8588
* drivers/net/tcpip/datalink/loopback.c: Reformat.
* drivers/net/tcpip/network/neighbor.c: Ditto.
* drivers/net/tcpip/tcpip/info.c: Ditto.
* drivers/net/tcpip/transport/datagram/datagram.c: Cleanup.
If there is an out-of-resources situation, don't transmit the
datagram out of order.
svn path=/trunk/; revision=8381
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
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
- Updated includes in csq.c
- Added IPv6 ethertype in lan.h
- Fixed a typo in ip.c
- Added csqtest driver for testing cancel-safe queues
svn path=/trunk/; revision=8107