Commit graph

487 commits

Author SHA1 Message Date
Timo Kreuzer fae2044a23 [CMAKE]
Integrate cmake stuff into trunk
Only files added.

svn path=/trunk/; revision=51783
2011-05-16 13:12:07 +00:00
Matthias Kupfer 7ce75cdf13 fix accidentally set property svn:executable
svn path=/trunk/; revision=51374
2011-04-17 09:50:07 +00:00
Rafal Harabien 7e914b6e08 [NDIS]
Correct Length value in case string is truncated

svn path=/trunk/; revision=51159
2011-03-26 15:12:23 +00:00
Roel Messiant ba15ac9cfc [DRIVERS]
- Change () to (VOID) in function declarators. Part 5/XX.

svn path=/trunk/; revision=51054
2011-03-15 18:41:17 +00:00
Aleksey Bragin a5dcd02b08 [TDI]
- Oleg Baikalow: Finish CTE timers. CTE implementation is complete now.

svn path=/trunk/; revision=50552
2011-01-29 14:03:41 +00:00
Aleksey Bragin 10c56cc21a [TDI]
- Move CTE routines into corresponding events.c and timer.c source code files before further applying Oleg's patches.

svn path=/trunk/; revision=50551
2011-01-29 13:07:06 +00:00
Aleksey Bragin fa2a65b537 [TDI]
- Oleg Baikalow: Implement basic event and delayed event support functions for CTE. Structure names are made up, but their contents should be compatible with what Windows 2003 tdi.sys uses. Formatting and coding style fixes by the committer.

svn path=/trunk/; revision=50550
2011-01-29 11:13:51 +00:00
Aleksey Bragin 3ade810715 - Oleg Baikalow: TDI exported function prototypes are documented in WDK 7, so use them in our driver instead of old, probably NT4-aged stubs full of unknown variables.
- Oleg Baikalow: Don't use psdk's tdi.h but use a real tdikrnl.h (adding a _TDI_ global define so it's recognized as a tdi driver itself).

svn path=/trunk/; revision=50546
2011-01-28 22:13:44 +00:00
Timo Kreuzer a34ed64ca4 [DRIVERS]
Add missing breaks. Patch by Samuel Serapion.

svn path=/trunk/; revision=50197
2010-12-28 18:20:28 +00:00
Cameron Gutman cbbeec3a07 [NDIS]
- Fix sizeof typo
- CID 10400

svn path=/trunk/; revision=50072
2010-12-20 20:57:22 +00:00
Cameron Gutman 3e169e3cb2 [NDIS]
- Add a missing spin lock release in a failure case
- Fix incomplete copying of NDIS 5.1 miniport characteristics

svn path=/trunk/; revision=49961
2010-12-06 04:39:57 +00:00
Cameron Gutman e14624d8ca [NDIS]
- Disable timer queuing code (hackfix for various network driver failures)
- Also needs to be merged into 0.3.12

svn path=/trunk/; revision=48968
2010-10-03 15:18:57 +00:00
Cameron Gutman 12d05b7eb8 [TCPIP]
- Process the timer event directly from the DPC instead of queuing a work item then raising to DISPATCH_LEVEL later when acquiring a spin lock
- Optimize the spin lock operations in NBTimeout and IPDatagramReassemblyTimeout for being called at DISPATCH_LEVEL

svn path=/trunk/; revision=48833
2010-09-20 19:08:40 +00:00
Cameron Gutman 804899ffc6 [NDIS]
- Fix timer queuing
- See issue #5461 for details

svn path=/trunk/; revision=48752
2010-09-12 11:57:55 +00:00
Cameron Gutman c8ff03d682 [TCPIP]
- Don't allocate pool if there is nothing in the route table
- Fixes bug 5493

svn path=/trunk/; revision=48637
2010-08-29 02:29:10 +00:00
Cameron Gutman 0553d5160c [OSKITTCP]
- Prevent multiple wakeups for the same event which caused nasty problems for the SEL_FIN event because we dereferenced our connection context 3 times which not only caused the connection endpoint to be freed while holding its spin lock but made the reference count negative
[TCPIP]
- Disassociate the address file from the connection endpoint before dereferencing/closing it to avoid a double dereference of the address file (not as harmful in this case as in the connection endpoint case)
[IP]
- Dereference the connection endpoint again if it was associated with an address file as the connection endpoint to fix a reference leak

svn path=/trunk/; revision=48624
2010-08-26 02:29:38 +00:00
Cameron Gutman 8d77a3fe00 [TCPIP]
- Read the IP information from the interface key inside the Tcpip service key (confirmed on XP)
- Fix a logic error in my code (no idea how I missed it)
- Restores static IP functionality (still waiting on janderwald to fix netcfgx's DNS value writing)

svn path=/trunk/; revision=48602
2010-08-23 01:17:41 +00:00
Amine Khaldi 0fb515fa5b [XDK]
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions.
[DDK]
- Update XDK generated headers to reflect the recent changes.
- Update some header guards.
- Add some missing new lines at the end of files.
- Fix PUSB_DEVICE_HANDLE guard.
- Introduce some _ANONYMOUS_STRUCT and NONAMELESSUNION based definitions.
[PSDK]
- Update some header guards.
- Add missing new line at the end of driverspecs.h
[NDIS]
- Update the ndis header guard.

svn path=/trunk/; revision=48511
2010-08-10 13:53:10 +00:00
Cameron Gutman 9088c79a22 There is nothing to say about this...
svn path=/trunk/; revision=48410
2010-08-02 03:52:52 +00:00
Cameron Gutman caa555a453 [AFD]: BytesAvailable needs to be updated even when peeking so we don't run off the end of our buffer
svn path=/trunk/; revision=48405
2010-08-01 23:52:23 +00:00
Cameron Gutman a7c693ea78 Forgetting to save really sucks. Sorry again for the wasted commit.
svn path=/trunk/; revision=48404
2010-08-01 23:46:57 +00:00
Cameron Gutman e98fc993d1 [AFD]: Fix read data corruption when peeking at network data (TDI_RECEIVE_PEEK is specified for a stream socket)
svn path=/trunk/; revision=48403
2010-08-01 23:42:33 +00:00
Cameron Gutman be40e4a043 Fix a typo
svn path=/trunk/; revision=48402
2010-08-01 23:20:31 +00:00
Cameron Gutman 4e63fd0e5a Fix a copy-paste mistake and remove an unused variable
svn path=/trunk/; revision=48401
2010-08-01 21:08:53 +00:00
Cameron Gutman 14fc97df0c [AFD]: Revert r42674 and part of r47156
svn path=/trunk/; revision=48400
2010-08-01 21:00:40 +00:00
Cameron Gutman 869cdbce37 - Fix epic naming fail (DhcpEnabled -> EnableDHCP
[DHCPCSVC]: Verify that the length is correct
[TCPIP]: Make sure DHCP is enabled before reading IP information

svn path=/trunk/; revision=48221
2010-07-24 00:25:59 +00:00
Cameron Gutman 59081046c2 - Remove some debug info that I forgot about
svn path=/trunk/; revision=48216
2010-07-23 22:33:09 +00:00
Cameron Gutman 63dfd0ccaa [NETCFGX]
- Create the DhcpEnabled value in the registry
[TCPIP]
- Apply the static IP address configuration data
[DHCPCSVC]
- Remove the static IP address code

svn path=/trunk/; revision=48215
2010-07-23 22:30:27 +00:00
Cameron Gutman 3d5cb94c4a [NDIS]
- Verify that each adapter has been initialized before passing it to the protocol's BindAdapter function
- Also verify that each adapter has not already been bound to the protocol
- Miniport drivers can now function without a reboot (needed to use 3rd-party NIC drivers on the live CD)

svn path=/trunk/; revision=48212
2010-07-23 16:34:35 +00:00
Amine Khaldi 2aa6e09c17 [NDIS]
- Convert NDIS_ERROR_CODE from a typedef to a define.
- Add some missing NDIS_STATUS_* definitions.
- Some _ANONYMOUS_UNION/_ANONYMOUS_STRUCT/__GNU_EXTENSION -> __MINGW_EXTENSION conversions.
- Update NDIS_REQUEST_TYPE and NDIS_PER_PACKET_INFO.
- Guard several definitions against NDIS_LEGACY_DRIVER.
- Improve NDIS_REQUEST.
- Add missing CO_ADDRESS_FAMILY_INFINIBAND, Ndis{Set,Get}PacketCancelId, NDIS_PACKET_{FIRST,LAST}_NDIS_BUFFER and NDIS_PACKET_VALID_COUNTS.
- Group related definitions.
- Update several Ndis* function declarations.
- Add missing NdisInterlocked{Push,Pop}EntryList and NdisGetCurrentSystemTime macros.

svn path=/trunk/; revision=48205
2010-07-23 00:20:13 +00:00
Cameron Gutman 92d6d7210c [NDIS]
- Refresh the protocol bindings after a new miniport is added
- Adapters added after boot work now
- One step closer to Live CD networking

svn path=/trunk/; revision=48193
2010-07-22 19:01:49 +00:00
Cameron Gutman a37a8bfe92 [AFD]
- Implement IOCTL_AFD_GET_TDI_HANDLES

svn path=/trunk/; revision=48020
2010-07-12 22:56:37 +00:00
Cameron Gutman f840fe0a50 [NDIS]
- Dequeue the timer earlier so the timer queue will be in a valid state if any timers are modified during the miniport's timer callback

svn path=/trunk/; revision=47825
2010-06-22 05:37:31 +00:00
Amine Khaldi b02092777f Reintegrate header-work branch. Important changes include continued work on headers and progress on compiling for ARM.
svn path=/trunk/; revision=47727
2010-06-09 22:24:32 +00:00
Cameron Gutman d19620d1ab [AFD]
- It is legal to send a NULL event object pointer to AFD (this is sent by msafd to cancel an existing event select)

svn path=/trunk/; revision=47651
2010-06-07 01:38:15 +00:00
Cameron Gutman 444eec4511 [NDIS]
- Hold the miniport lock when we work with the timer queue
- Use the return value of KeSetTimer(Ex) to determine whether we need to queue the timer in our queue, otherwise we just use the entry that is already there
- Add more assertions

svn path=/trunk/; revision=47642
2010-06-06 22:08:40 +00:00
Cameron Gutman 6e1d1db7af Forgot to remove this ASSERT for r47636
svn path=/trunk/; revision=47639
2010-06-06 21:31:58 +00:00
Cameron Gutman c01132e4ff [NDIS]
- Only dequeue the timer in the DPC if the Period is 0 (which means that it's NOT a periodic timer so we only get called once)
- Attempt to dequeue the timer before inserting it so we don't end up with multiple copies of the same timer on the timer queue if somebody calls NdisMSet(Periodic)Timer twice

svn path=/trunk/; revision=47636
2010-06-06 19:18:19 +00:00
Cameron Gutman f44eee190b [NDIS]
- Implement miniport timer queuing
- Add some BUGCODE_ID_DRIVER bug check cases for missing interrupt deregistration, missing timer cancellation, and invalid IRQL when calling NdisMAllocateSharedMemory

svn path=/trunk/; revision=47630
2010-06-06 18:09:25 +00:00
Cameron Gutman d36292eecf [TCPIP]
- Return STATUS_INVALID_ADDRESS if the caller tries to get a non-local address
- Return STATUS_ADDRESS_ALREADY_EXISTS if the caller uses an address that is in use
[MSAFD]
- Translate STATUS_ADDRESS_ALREADY_EXISTS -> WSAEADDRINUSE, STATUS_LOCAL_DISCONNECT -> WSAECONNABORTED, and STATUS_REMOTE_DISCONNECT -> WSAECONNRESET
[IP]
- Translate OSK_EADDRINUSE -> STATUS_ADDRESS_ALREADY_EXISTS, OSK_ECONNABORTED -> STATUS_LOCAL_DISCONNECT, and OSK_ECONNRESET -> STATUS_REMOTE_DISCONNECT
- Fixes waiting for binding during ws2_32 sock winetest

svn path=/trunk/; revision=47379
2010-05-28 04:39:49 +00:00
Cameron Gutman 219cc11d6a [MSAFD]
- Remove an incorrect change
- Create a new function called TranslateNtStatusError to translate NTSTATUS to winsock error codes
- Call the TranslateNtStatusError in MsafdReturnWithErrno and also use it to translate AFD's poll event error codes
[AFD]
- Track the status for each poll event in our FCB and copy it back when we get an IOCTL_AFD_ENUM_NETWORK_EVENTS IRP
- Remove some useless PollReeval calls

svn path=/trunk/; revision=47377
2010-05-28 03:55:50 +00:00
Cameron Gutman 5ea607ab59 [AFD]
- Fix a typo in r47156
- Fixes Firefox regression (bug 5384)
- Thanks to mjmartin for testing

svn path=/trunk/; revision=47234
2010-05-16 05:22:51 +00:00
Cameron Gutman 609171f4ac [AFD]
- Fix signaling socket termination events on disconnect
- Fixes bug 4951

svn path=/trunk/; revision=47156
2010-05-10 21:14:26 +00:00
Cameron Gutman 66482fa4f3 - Remove a forgotten debug print
svn path=/trunk/; revision=47091
2010-05-03 00:30:49 +00:00
Cameron Gutman c55eb25c06 [NDIS]
- Provide a IRP_MJ_CREATE and IRP_MJ_CLOSE handler for miniport drivers so IoGetDeviceObjectPointer doesn't fail (and consequently, IoSetDeviceInterfaceState)

svn path=/trunk/; revision=47090
2010-05-03 00:28:29 +00:00
Cameron Gutman fd9406974e [AFD]
- Add some sanity checks

svn path=/trunk/; revision=47023
2010-04-25 20:51:07 +00:00
Timo Kreuzer 4c7d318d09 [TDI]
Convert to spec. Taken from amd64 branch (by Samuel Serapión)

svn path=/trunk/; revision=46864
2010-04-14 00:03:21 +00:00
Timo Kreuzer e47129e41e [NDIS]
Convert to spec

svn path=/trunk/; revision=46863
2010-04-13 23:48:25 +00:00
Cameron Gutman c0ce6da513 [AFD]
- Allow connection requests for connectionless sockets (they associate a default remote address with the socket required for use in AfdConnectedSocketWriteData and AfdConnectedSocketReadData)
- Add a check for a disconnected socket

svn path=/trunk/; revision=46479
2010-03-27 00:00:21 +00:00
Timo Kreuzer fe68057a58 Merge from amd64-branch:
46394 (tkreuzer)
[FRAMEBUF_NEW]
- use compiler flags for x86 only

36969 (sginsberg)
[VIDEOPRT]
- Make videoprt compile for 64-bit
- Disable Int10 support as it uses x86 specific structures (is this support still available on amd64?)
- Disable VideoPortEnable/DisableInterrupt -- HalEnable/DisableSystemInterrupt are not apparently present on NT AMD64, so need to figure out what else to use (and if these routine are still present on amd64 videoprt)

The following this time for real:

40927 (tkreuzer)
[BMFD]
HGLYPH is an ULONG. Use offset to glyph entry as HGLYPH instead of the pointer to fix 64bit build.

41070 (tkreuzer)
[TCPIP]
fix a pointer to ULONG cast

41500 (tkreuzer)
[NDIS]
Pass ULONG* to MiniQueryInformation for the number of written bytes instead of ULONG_PTR*

41502 (tkreuzer)
[WDMAUD]
Make DeviceIndex a ULONG_PTR

44339 (sserapion)
[NDIS]
Fix ndis build.

svn path=/trunk/; revision=46427
2010-03-25 05:03:29 +00:00