Commit Graph
168 Commits
Author SHA1 Message Date
Timo Kreuzer f9c2afd00a Sync with trunk r43000
svn path=/branches/ros-amd64-bringup/; revision=43079
2009-09-19 13:58:16 +00:00
Stefan Ginsberg ea23cd10c2 - Start deprecating TAG()
- Fix inverted tags in prntfont.h, stdunk.h and win32k/objects/font.c

svn path=/trunk/; revision=42915
2009-08-24 17:12:25 +00:00
Cameron Gutman da1fa88e1c - Fix receiving packets on an interface's broadcast address while bound to an undefined address
- Simplify binding to a certain interface

svn path=/trunk/; revision=42811
2009-08-20 17:25:39 +00:00
Cameron Gutman 9757ce3f97 - Allow binding to an interface's broadcast address
- Set address type

svn path=/trunk/; revision=42787
2009-08-20 00:54:27 +00:00
Cameron Gutman e90b905e0b - Fix a NULL pointer dereference if ExAllocatePool fails
- Move some sanity checks into the right location
 - Fix another NULL pointer dereference if there is not a socket on the queue
 - Also spotted by Amine Khaldi

svn path=/trunk/; revision=42660
2009-08-13 23:42:21 +00:00
Cameron Gutman 347e34f1b4 - Rewrite most of the loopback code
- The new code is faster, uses less memory, and is less complex than the previous code
 - Add a NULL check to fix a potential crash

svn path=/trunk/; revision=42578
2009-08-10 03:27:39 +00:00
Stefan Ginsberg e8aa4b4280 - Silence a soundblaster warning on release build
svn path=/trunk/; revision=42516
2009-08-08 14:41:50 +00:00
Stefan Ginsberg ac7daf7ccf - winddk.h: Don't define NTSYSAPI and NTSYSCALLAPI -- this is defined in ntdef.h. Use NTSYSAPI for HalDispatchTable instead of DECLSPEC_IMPORT (see below).
- wdm.h: Properly define NTKERNELAPI.
- ntifs.h: Properly define NTKERNELAPI, and don't redefine NTSYSAPI.
- ntoskrnl: Apply the WDK hack for our headers (and gcc) too. Also redefine NTHALAPI for NDK so we don't auto-import KdComPortInUse -- ld complains about this.
- Apply this for cmlib, csq and rossym too.
- Use this in HAL too, and redefine NTSYSAPI so we don't auto import some structures from the kernel. Also, don't define __declspec(dllimport) to nothing -- this doesn't work with gcc, and doesn't seem to be necessary. I tried building HAL with the WDK and this wasn't an issue.

svn path=/trunk/; revision=42461
2009-08-07 10:45:59 +00:00
Cameron Gutman f1b8d48df1 - Send a gratuitous ARP packet when our IP address changes
svn path=/trunk/; revision=42455
2009-08-07 03:21:56 +00:00
Cameron Gutman 353d0a8d27 - Fix a bug resulting in ROS discarding all gratuitous ARP packets
- Remove an unnecessary check

svn path=/trunk/; revision=42453
2009-08-07 02:39:38 +00:00
Cameron Gutman 083150d2cd - Add missing locking to DeallocatePort
svn path=/trunk/; revision=42399
2009-08-04 23:35:50 +00:00
Cameron Gutman 1b403e9be7 Broadcast fixes
- Treat 255.255.255.255 as an undefined address
 - Choose the first interface when sending a broadcast packet (fixes failing with STATUS_NETWORK_UNREACHABLE when trying to send a broadcast packet)
 - Fix a broadcast address check so 255.255.255.255 will also pass (fixes sending queued broadcast packets)
 - Now a broadcast packet can be successfully sent from an interface with a valid IP address (previously they could only be sent when the interface didn't have an NCE entry)

svn path=/trunk/; revision=42375
2009-08-03 20:10:47 +00:00
Stefan Ginsberg 7aa73a6110 - strmini.h: Include windef.h so CDECL gets defined for msvc version of DEFINE_GUIDEX in ks.h
- Fix misc msvc issues in paint, setup, mmsys and mmebuddy
- Simplify the way kernel32 is built, reverting the "test" from 14241

svn path=/trunk/; revision=42362
2009-08-03 13:46:37 +00:00
Cameron Gutman b85fb3bd9f - Don't hold the spin lock when calling the request completion handler
svn path=/trunk/; revision=42355
2009-08-03 00:23:55 +00:00
Cameron Gutman e975dfead9 - Copy the datagram data to all matching receive requests instead of just the first one we find
- Fix (completely broken) datagram truncation

svn path=/trunk/; revision=42354
2009-08-02 23:17:39 +00:00
Timo Kreuzer 250d69afc8 Sync to trunk head (r42241)
svn path=/branches/ros-amd64-bringup/; revision=42244
2009-07-26 23:21:27 +00:00
Stefan Ginsberg dd27bbdbb7 - Leftover 2 from 42210
svn path=/trunk/; revision=42212
2009-07-25 14:55:52 +00:00
Cameron Gutman 985618d74e - Update TotalLength based on the fragment size
- Make fragment offset into 8-byte units
 - Don't perform a useless checksum calculation
 - Fixes datagram fragmentation (tested using ping with a packet size of 16000)
 - This also seems to fix DHCP over a bridged NIC in vbox

svn path=/trunk/; revision=42104
2009-07-20 19:46:54 +00:00
Cameron Gutman 54b3d22e33 - Generate a random ID for use during datagram reassembly
svn path=/trunk/; revision=42088
2009-07-19 17:40:36 +00:00
Cameron Gutman b43fbb516b - Properly implement ICMP
- Now Raw IP works correctly because it isn't being hacked to handle ICMP packets

svn path=/trunk/; revision=42087
2009-07-19 14:48:48 +00:00
Cameron Gutman 2fe1aab7fe - Send all waiting packets instead of only the first one to prevent a buildup of queued packets on a non-sendable NCE which becomes sendable later
svn path=/trunk/; revision=42076
2009-07-19 07:06:08 +00:00
Johannes Anderwald 3e07d5777f - Don't hardcode the sound kernel buffersize and maximum buffer count and make it possible to override it because kernel streaming pins have specific frame size requirements.
- See KSALLOCATOR_FRAMING struct

svn path=/trunk/; revision=41996
2009-07-17 09:24:11 +00:00
Cameron Gutman 202957e751 - Start reporting packet statistics
- We currently only report received bytes, sent bytes, discarded packets due to unknown protocol, send errors, and receive errors
 - The network adapter properties window now shows correct send/receive bytes info

svn path=/trunk/; revision=41962
2009-07-15 03:14:13 +00:00
Johannes Anderwald 1ad4b7ad1f - Fix build (2/X)
svn path=/trunk/; revision=41904
2009-07-12 00:37:48 +00:00
Johannes Anderwald 56e5803f59 [MMEBUDDY]
- Pass DeviceId to GetDeviceCapabilities function
[WDMAUD.DRV]
- Use DeviceId to determine the capabilities of the requested device, not just always the first one

svn path=/trunk/; revision=41902
2009-07-11 23:49:24 +00:00
Johannes Anderwald 85cde828b2 - Implement retrieving position
svn path=/trunk/; revision=41899
2009-07-11 23:21:09 +00:00
Cameron Gutman 08df2017e3 - Initialize remote address to 0 if the caller didn't specify one
svn path=/trunk/; revision=41858
2009-07-11 04:54:44 +00:00
Cameron Gutman 4837e387d0 - Recommit r41782 now that DHCP is ready for the fix
- Start the indexes at 0 (Software loopback will take index 0)

svn path=/trunk/; revision=41797
2009-07-07 05:29:37 +00:00
Cameron Gutman bfee1bad64 - Remove a bad ASSERT
- TCPPacketSendComplete isn't called from oskittcp

svn path=/trunk/; revision=41796
2009-07-07 04:47:48 +00:00
Cameron Gutman 5e7a8d3a1a - TCPIP lock rewrite (part 3 of 3)
- Use a spin lock to protect the signalled connections list
 - Add a debug ASSERT into each function that depends on the TCPLock being held
 - Release TCPLock before completing the IRP
 - Add some locking where it was forgotten
 - Optimize HandleSignalledConnection

svn path=/trunk/; revision=41752
2009-07-03 06:28:59 +00:00
Cameron Gutman 4c8e421fe9 - TCPIP locking rewrite (part 2 of x)
- Add locking in places that need it
 - Eliminate double acquisition of TCPLock for the same request
 - Next step: Verify that all places that need locking have it

svn path=/trunk/; revision=41751
2009-07-03 00:57:47 +00:00
Cameron Gutman 21929c948e - tcpip locking rewrite (part 1 of x)
- Use ExInterlocked list functions to manipulate the request lists
 - Fix usage of the wrong lock to protect the listen request list
 - Next step: Optimize usage of TCPLock

svn path=/trunk/; revision=41737
2009-07-02 07:16:50 +00:00
Cameron Gutman 661d9e889c - Don't cancel already completed requests
- Fix potential NULL pointer access
 - Actually disassociate the address file and connection in DispTdiDisassociateAddress
 - Insert new requests at the end of the list not the beginning

svn path=/trunk/; revision=41736
2009-07-02 06:51:34 +00:00
Cameron Gutman fdb5cd14fe - Fix corruption of ARP target protocol address
- We were copying the address type (1 byte) and 3 bytes of the target address instead of all 4 bytes of the target address

svn path=/trunk/; revision=41723
2009-07-01 05:14:56 +00:00
Cameron Gutman fd848cadad - Put the correct source address in Raw IP and UDP packets
- Remove (now unused) IPGetDefaultAddress which just broke things
 - Fixes responses from different IP addresses when trying to ping the loopback adapter
 - See issue #4573 for more details

svn path=/trunk/; revision=41720
2009-06-30 21:14:21 +00:00
Cameron Gutman fdf20e8c9a - Memtrack enhancements
- It now warns us when it detects an entry that wasn't freed by a memtrack-enabled function
 - It also provides some info when it detects a double free
 - Removed some extra tag tracking junk

svn path=/trunk/; revision=41705
2009-06-30 02:30:36 +00:00
Cameron Gutman 6bed52e321 - Allocate IP_PACKET on the stack
- Reduces non-paged memory consumption

svn path=/trunk/; revision=41698
2009-06-29 20:18:32 +00:00
Cameron Gutman a932210bfa - Always call the completion handler so we don't leak packet descriptors
- Don't remove the NCE if we fail because it may not be ours
 - Mark the IRPs pending before we insert them into our queue
 - Check that the addresses match so we don't receive somebody else's packets
 - Part 1 of 2

svn path=/trunk/; revision=41638
2009-06-27 08:48:58 +00:00
Christoph von Wittich 5a526879a4 tabs -> spaces
use more consistent indentation

svn path=/trunk/; revision=41635
2009-06-27 07:38:02 +00:00
Cameron Gutman 2d20864907 - Use the timeout that the caller gives us if it is nonzero so we don't block forever if nobody wakes us
svn path=/trunk/; revision=41633
2009-06-27 07:03:45 +00:00
Cameron Gutman 9722b61095 - The timeout value passed to tsleep is in milliseconds and so_linger is in seconds so convert to milliseconds
svn path=/trunk/; revision=41632
2009-06-27 06:59:22 +00:00
Cameron Gutman dabb3e9f98 - Don't leave the listen IRP in the queue when cancelling the listen request
- Kill all the requests before closing the socket
 - Notify oskittcp when we are cancelling requests so it can properly close the socket

svn path=/trunk/; revision=41630
2009-06-27 03:23:10 +00:00
Timo Kreuzer 4135e99ab6 Merge trunk head (r41474)
svn path=/branches/ros-amd64-bringup/; revision=41488
2009-06-20 13:45:51 +00:00
Stefan Ginsberg 88e9b2a513 - In Win32 DBG is defined to 0 for a non-debug build and to 1 for a debug build. In ReactOS we do this slightly different: DBG is correctly defined to 1 for debug, but not defined at all on non-debug/release build. Because gcc is awesome we can then check for debug compilation with both #ifdef DBG and #if DBG (error free! yay gcc!), and so we have mixed usage all over the tree.
- Fix this by defining DBG on non-debug build too and deprecate all usage of #ifdef DBG.

svn path=/trunk/; revision=41436
2009-06-17 12:44:05 +00:00
Cameron Gutman b917a5c401 - Fix a typo
- Found by Fireball

svn path=/trunk/; revision=41219
2009-05-31 13:17:42 +00:00
Timo Kreuzer 1e6ef30c73 Sync trunk head (r41026)
svn path=/branches/ros-amd64-bringup/; revision=41032
2009-05-21 18:39:21 +00:00
Cameron Gutman 3c69a5f48e - Restore the old loopback implementation
- Should fix the buildbot test hang

svn path=/trunk/; revision=40934
2009-05-16 01:44:20 +00:00
Cameron Gutman 691ef7c32a - Set up the TCP interface data as needed in TCPFindInterface
svn path=/trunk/; revision=40933
2009-05-16 01:24:21 +00:00
Cameron Gutman 0931b86d7c - Use FindOnLinkInterface to get the interface
- Return NULL if TCPContext is NULL (which means we don't have a valid IP address)
 - Should fix a crash when using multiple NICs but they still won't work (DHCP bug?)

svn path=/trunk/; revision=40909
2009-05-13 01:16:30 +00:00
Cameron Gutman ef95fbe0bc - Fix build
svn path=/trunk/; revision=40723
2009-04-28 22:39:36 +00:00