[ros-diffs] [arty] 35267: Merge aicom-network-fixes up to 35260

arty at svn.reactos.org arty at svn.reactos.org
Mon Aug 11 02:02:27 CEST 2008


Author: arty
Date: Sun Aug 10 19:02:26 2008
New Revision: 35267

URL: http://svn.reactos.org/svn/reactos?rev=35267&view=rev
Log:
Merge aicom-network-fixes up to 35260

Modified:
    trunk/reactos/drivers/network/afd/afd/select.c
    trunk/reactos/drivers/network/afd/afd/tdi.c
    trunk/reactos/drivers/network/afd/include/afd.h

Modified: trunk/reactos/drivers/network/afd/afd/select.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/select.c?rev=35267&r1=35266&r2=35267&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] Sun Aug 10 19:02:26 2008
@@ -85,6 +85,7 @@
               PollReq->Handles[i].Status));
     }
     UnlockHandles( AFD_HANDLES(PollReq), PollReq->HandleCount );
+    if( Irp->MdlAddress ) UnlockRequest( Irp, IoGetCurrentIrpStackLocation( Irp ) );
     AFD_DbgPrint(MID_TRACE,("Completing\n"));
     IoCompleteRequest( Irp, IO_NETWORK_INCREMENT );
     AFD_DbgPrint(MID_TRACE,("Done\n"));
@@ -391,6 +392,11 @@
     /* Take care of any event select signalling */
     FCB = (PAFD_FCB)FileObject->FsContext;
 
+    if( !FCB ) {
+	KeReleaseSpinLock( &DeviceExt->Lock, OldIrql );
+	return;
+    }
+
     /* Not sure if i can do this at DISPATCH_LEVEL ... try it at passive */
     AFD_DbgPrint(MID_TRACE,("Current State: %x, Events Fired: %x, "
 			    "Select Triggers %x\n",
@@ -401,11 +407,6 @@
 	EventSelect = FCB->EventSelect;
     }
 
-    if( !FCB ) {
-	KeReleaseSpinLock( &DeviceExt->Lock, OldIrql );
-	return;
-    }
-
     /* Now signal normal select irps */
     ThePollEnt = DeviceExt->Polls.Flink;
 

Modified: trunk/reactos/drivers/network/afd/afd/tdi.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/tdi.c?rev=35267&r1=35266&r2=35267&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Sun Aug 10 19:02:26 2008
@@ -631,7 +631,6 @@
     return Status;
 }
 
-#if 0
 NTSTATUS TdiQueryInformationEx(
     PFILE_OBJECT FileObject,
     ULONG Entity,
@@ -807,7 +806,6 @@
 
     return Status;
 }
-#endif
 
 NTSTATUS TdiSend
 ( PIRP *Irp,

Modified: trunk/reactos/drivers/network/afd/include/afd.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/include/afd.h?rev=35267&r1=35266&r2=35267&view=diff
==============================================================================
--- trunk/reactos/drivers/network/afd/include/afd.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/include/afd.h [iso-8859-1] Sun Aug 10 19:02:26 2008
@@ -27,6 +27,55 @@
 #ifndef MIN
 #define MIN(x,y) (((x)<(y))?(x):(y))
 #endif
+
+#define IOCTL_TCP_QUERY_INFORMATION_EX \
+	CTL_CODE(FILE_DEVICE_NETWORK, 0, METHOD_NEITHER, FILE_ANY_ACCESS)
+
+#define TL_INSTANCE 0
+#define	IP_MIB_STATS_ID 1
+#define	IP_MIB_ADDRTABLE_ENTRY_ID 0x102
+
+typedef struct IPSNMP_INFO {
+	ULONG Forwarding;
+	ULONG DefaultTTL;
+	ULONG InReceives;
+	ULONG InHdrErrors;
+	ULONG InAddrErrors;
+	ULONG ForwDatagrams;
+	ULONG InUnknownProtos;
+	ULONG InDiscards;
+	ULONG InDelivers;
+	ULONG OutRequests;
+	ULONG RoutingDiscards;
+	ULONG OutDiscards;
+	ULONG OutNoRoutes;
+	ULONG ReasmTimeout;
+	ULONG ReasmReqds;
+	ULONG ReasmOks;
+	ULONG ReasmFails;
+	ULONG FragOks;
+	ULONG FragFails;
+	ULONG FragCreates;
+	ULONG NumIf;
+	ULONG NumAddr;
+	ULONG NumRoutes;
+} IPSNMP_INFO, *PIPSNMP_INFO;
+
+typedef struct IPADDR_ENTRY {
+	ULONG  Addr;
+	ULONG  Index;
+	ULONG  Mask;
+	ULONG  BcastAddr;
+	ULONG  ReasmSize;
+	USHORT Context;
+	USHORT Pad;
+} IPADDR_ENTRY, *PIPADDR_ENTRY;
+
+#define DN2H(dw) \
+    ((((dw) & 0xFF000000L) >> 24) | \
+	 (((dw) & 0x00FF0000L) >> 8) | \
+	 (((dw) & 0x0000FF00L) << 8) | \
+	 (((dw) & 0x000000FFL) << 24))
 
 #define SOCKET_STATE_INVALID_TRANSITION ((DWORD)-1)
 #define SOCKET_STATE_CREATED            0



More information about the Ros-diffs mailing list