Author: arty
Date: Thu Apr 2 05:04:07 2009
New Revision: 40322
URL:
http://svn.reactos.org/svn/reactos?rev=40322&view=rev
Log:
FORMATTING only.
Modified:
trunk/reactos/drivers/network/afd/afd/tdi.c
Modified: trunk/reactos/drivers/network/afd/afd/tdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Thu Apr 2 05:04:07 2009
@@ -72,11 +72,11 @@
if ((Status == STATUS_PENDING) && (Event != NULL)) {
AFD_DbgPrint(MAX_TRACE, ("Waiting on transport.\n"));
KeWaitForSingleObject(
- Event,
- Executive,
- KernelMode,
- FALSE,
- NULL);
+ Event,
+ Executive,
+ KernelMode,
+ FALSE,
+ NULL);
Status = Iosb->Status;
}
@@ -135,12 +135,12 @@
(PVOID*)Object, /* Pointer to
object */
NULL); /* Handle
information */
if (!NT_SUCCESS(Status)) {
- AFD_DbgPrint(MIN_TRACE, ("ObReferenceObjectByHandle() failed with status
(0x%X).\n", Status));
- ZwClose(*Handle);
- *Handle = NULL;
+ AFD_DbgPrint(MIN_TRACE, ("ObReferenceObjectByHandle() failed with status
(0x%X).\n", Status));
+ ZwClose(*Handle);
+ *Handle = NULL;
} else {
- AFD_DbgPrint(MAX_TRACE, ("Got handle (0x%X) Object (0x%X)\n",
- *Handle, *Object));
+ AFD_DbgPrint(MAX_TRACE, ("Got handle (0x%X) Object (0x%X)\n",
+ *Handle, *Object));
}
} else {
AFD_DbgPrint(MIN_TRACE, ("ZwCreateFile() failed with status (0x%X)\n",
Status));
@@ -156,7 +156,7 @@
PFILE_OBJECT FileObject)
{
AFD_DbgPrint(MAX_TRACE, ("Called. Handle (0x%X) FileObject (0x%X)\n",
- Handle, FileObject));
+ Handle, FileObject));
if (Handle)
ZwClose(Handle);
@@ -184,47 +184,47 @@
* Status of operation
*/
{
- PFILE_FULL_EA_INFORMATION EaInfo;
- NTSTATUS Status;
- ULONG EaLength;
- PTRANSPORT_ADDRESS Address;
-
- AFD_DbgPrint(MAX_TRACE, ("Called. DeviceName (%wZ) Name (0x%X)\n",
- DeviceName, Name));
-
- /* EaName must be 0-terminated, even though TDI_TRANSPORT_ADDRESS_LENGTH does *not*
include the 0 */
- EaLength = sizeof(FILE_FULL_EA_INFORMATION) +
- TDI_TRANSPORT_ADDRESS_LENGTH +
- TaLengthOfTransportAddress( Name ) + 1;
- EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool, EaLength);
- if (!EaInfo)
- return STATUS_INSUFFICIENT_RESOURCES;
-
- RtlZeroMemory(EaInfo, EaLength);
- EaInfo->EaNameLength = TDI_TRANSPORT_ADDRESS_LENGTH;
- /* Don't copy the terminating 0; we have already zeroed it */
- RtlCopyMemory(EaInfo->EaName,
- TdiTransportAddress,
- TDI_TRANSPORT_ADDRESS_LENGTH);
- EaInfo->EaValueLength = sizeof(TA_IP_ADDRESS);
- Address =
- (PTRANSPORT_ADDRESS)(EaInfo->EaName + TDI_TRANSPORT_ADDRESS_LENGTH + 1); /*
0-terminated */
- TaCopyTransportAddressInPlace( Address, Name );
-
- Status = TdiOpenDevice(DeviceName,
- EaLength,
- EaInfo,
- AddressHandle,
- AddressObject);
- ExFreePool(EaInfo);
- return Status;
+ PFILE_FULL_EA_INFORMATION EaInfo;
+ NTSTATUS Status;
+ ULONG EaLength;
+ PTRANSPORT_ADDRESS Address;
+
+ AFD_DbgPrint(MAX_TRACE, ("Called. DeviceName (%wZ) Name (0x%X)\n",
+ DeviceName, Name));
+
+ /* EaName must be 0-terminated, even though TDI_TRANSPORT_ADDRESS_LENGTH does *not*
include the 0 */
+ EaLength = sizeof(FILE_FULL_EA_INFORMATION) +
+ TDI_TRANSPORT_ADDRESS_LENGTH +
+ TaLengthOfTransportAddress( Name ) + 1;
+ EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool, EaLength);
+ if (!EaInfo)
+ return STATUS_INSUFFICIENT_RESOURCES;
+
+ RtlZeroMemory(EaInfo, EaLength);
+ EaInfo->EaNameLength = TDI_TRANSPORT_ADDRESS_LENGTH;
+ /* Don't copy the terminating 0; we have already zeroed it */
+ RtlCopyMemory(EaInfo->EaName,
+ TdiTransportAddress,
+ TDI_TRANSPORT_ADDRESS_LENGTH);
+ EaInfo->EaValueLength = sizeof(TA_IP_ADDRESS);
+ Address =
+ (PTRANSPORT_ADDRESS)(EaInfo->EaName + TDI_TRANSPORT_ADDRESS_LENGTH + 1); /*
0-terminated */
+ TaCopyTransportAddressInPlace( Address, Name );
+
+ Status = TdiOpenDevice(DeviceName,
+ EaLength,
+ EaInfo,
+ AddressHandle,
+ AddressObject);
+ ExFreePool(EaInfo);
+ return Status;
}
NTSTATUS TdiOpenConnectionEndpointFile(
- PUNICODE_STRING DeviceName,
- PHANDLE ConnectionHandle,
- PFILE_OBJECT *ConnectionObject)
+ PUNICODE_STRING DeviceName,
+ PHANDLE ConnectionHandle,
+ PFILE_OBJECT *ConnectionObject)
/*
* FUNCTION: Opens a connection endpoint file object
* ARGUMENTS:
@@ -235,39 +235,39 @@
* Status of operation
*/
{
- PFILE_FULL_EA_INFORMATION EaInfo;
- PVOID *ContextArea;
- NTSTATUS Status;
- ULONG EaLength;
-
- AFD_DbgPrint(MAX_TRACE, ("Called. DeviceName (%wZ)\n", DeviceName));
+ PFILE_FULL_EA_INFORMATION EaInfo;
+ PVOID *ContextArea;
+ NTSTATUS Status;
+ ULONG EaLength;
+
+ AFD_DbgPrint(MAX_TRACE, ("Called. DeviceName (%wZ)\n", DeviceName));
/* EaName must be 0-terminated, even though TDI_TRANSPORT_ADDRESS_LENGTH does *not*
include the 0 */
- EaLength = sizeof(FILE_FULL_EA_INFORMATION) +
- TDI_CONNECTION_CONTEXT_LENGTH +
- sizeof(PVOID) + 1;
-
- EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool, EaLength);
- if (!EaInfo)
- return STATUS_INSUFFICIENT_RESOURCES;
-
- RtlZeroMemory(EaInfo, EaLength);
- EaInfo->EaNameLength = TDI_CONNECTION_CONTEXT_LENGTH;
- /* Don't copy the terminating 0; we have already zeroed it */
- RtlCopyMemory(EaInfo->EaName,
- TdiConnectionContext,
- TDI_CONNECTION_CONTEXT_LENGTH);
- EaInfo->EaValueLength = sizeof(PVOID);
- ContextArea = (PVOID*)(EaInfo->EaName + TDI_CONNECTION_CONTEXT_LENGTH + 1); /*
0-terminated */
- /* FIXME: Allocate context area */
- *ContextArea = NULL;
- Status = TdiOpenDevice(DeviceName,
- EaLength,
- EaInfo,
- ConnectionHandle,
- ConnectionObject);
- ExFreePool(EaInfo);
- return Status;
+ EaLength = sizeof(FILE_FULL_EA_INFORMATION) +
+ TDI_CONNECTION_CONTEXT_LENGTH +
+ sizeof(PVOID) + 1;
+
+ EaInfo = (PFILE_FULL_EA_INFORMATION)ExAllocatePool(NonPagedPool, EaLength);
+ if (!EaInfo)
+ return STATUS_INSUFFICIENT_RESOURCES;
+
+ RtlZeroMemory(EaInfo, EaLength);
+ EaInfo->EaNameLength = TDI_CONNECTION_CONTEXT_LENGTH;
+ /* Don't copy the terminating 0; we have already zeroed it */
+ RtlCopyMemory(EaInfo->EaName,
+ TdiConnectionContext,
+ TDI_CONNECTION_CONTEXT_LENGTH);
+ EaInfo->EaValueLength = sizeof(PVOID);
+ ContextArea = (PVOID*)(EaInfo->EaName + TDI_CONNECTION_CONTEXT_LENGTH + 1); /*
0-terminated */
+ /* FIXME: Allocate context area */
+ *ContextArea = NULL;
+ Status = TdiOpenDevice(DeviceName,
+ EaLength,
+ EaInfo,
+ ConnectionHandle,
+ ConnectionObject);
+ ExFreePool(EaInfo);
+ return Status;
}
@@ -287,51 +287,51 @@
* Status of operation
*/
{
- PDEVICE_OBJECT DeviceObject;
- NTSTATUS Status;
-
- AFD_DbgPrint(MAX_TRACE, ("Called\n"));
-
- if (!ConnectionObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n"));
- *Irp = NULL;
- return STATUS_INVALID_PARAMETER;
- }
-
- DeviceObject = IoGetRelatedDeviceObject(ConnectionObject);
- if (!DeviceObject) {
+ PDEVICE_OBJECT DeviceObject;
+ NTSTATUS Status;
+
+ AFD_DbgPrint(MAX_TRACE, ("Called\n"));
+
+ if (!ConnectionObject) {
+ AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n"));
+ *Irp = NULL;
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ DeviceObject = IoGetRelatedDeviceObject(ConnectionObject);
+ if (!DeviceObject) {
AFD_DbgPrint(MIN_TRACE, ("Bad device object.\n"));
*Irp = NULL;
return STATUS_INVALID_PARAMETER;
- }
-
- *Irp = TdiBuildInternalDeviceControlIrp(TDI_CONNECT, /* Sub function */
- DeviceObject, /* Device object */
- ConnectionObject, /* File object */
- NULL, /* Event */
- Iosb); /* Status */
- if (!*Irp) {
- return STATUS_INSUFFICIENT_RESOURCES;
- }
-
- TdiBuildConnect(*Irp, /* IRP */
- DeviceObject, /* Device object */
- ConnectionObject, /* File object */
- CompletionRoutine, /* Completion routine */
- CompletionContext, /* Completion routine context */
- NULL, /* Time */
- RemoteAddress, /* Request connection information */
- RemoteAddress); /* Return connection information */
-
- Status = TdiCall(*Irp, DeviceObject, NULL, Iosb);
-
- return Status;
+ }
+
+ *Irp = TdiBuildInternalDeviceControlIrp(TDI_CONNECT, /* Sub function */
+ DeviceObject, /* Device object */
+ ConnectionObject, /* File object */
+ NULL, /* Event */
+ Iosb); /* Status */
+ if (!*Irp) {
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ TdiBuildConnect(*Irp, /* IRP */
+ DeviceObject, /* Device object */
+ ConnectionObject, /* File object */
+ CompletionRoutine, /* Completion routine */
+ CompletionContext, /* Completion routine context */
+ NULL, /* Time */
+ RemoteAddress, /* Request connection information */
+ RemoteAddress); /* Return connection information */
+
+ Status = TdiCall(*Irp, DeviceObject, NULL, Iosb);
+
+ return Status;
}
NTSTATUS TdiAssociateAddressFile(
- HANDLE AddressHandle,
- PFILE_OBJECT ConnectionObject)
+ HANDLE AddressHandle,
+ PFILE_OBJECT ConnectionObject)
/*
* FUNCTION: Associates a connection endpoint to an address file object
* ARGUMENTS:
@@ -341,46 +341,46 @@
* Status of operation
*/
{
- PDEVICE_OBJECT DeviceObject;
- IO_STATUS_BLOCK Iosb;
- NTSTATUS Status;
- KEVENT Event;
- PIRP Irp;
-
- AFD_DbgPrint(MAX_TRACE, ("Called. AddressHandle (0x%X) ConnectionObject
(0x%X)\n",
- AddressHandle, ConnectionObject));
-
- if (!ConnectionObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n"));
- return STATUS_INVALID_PARAMETER;
- }
-
- DeviceObject = IoGetRelatedDeviceObject(ConnectionObject);
- if (!DeviceObject) {
+ PDEVICE_OBJECT DeviceObject;
+ IO_STATUS_BLOCK Iosb;
+ NTSTATUS Status;
+ KEVENT Event;
+ PIRP Irp;
+
+ AFD_DbgPrint(MAX_TRACE, ("Called. AddressHandle (0x%X) ConnectionObject
(0x%X)\n",
+ AddressHandle, ConnectionObject));
+
+ if (!ConnectionObject) {
+ AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n"));
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ DeviceObject = IoGetRelatedDeviceObject(ConnectionObject);
+ if (!DeviceObject) {
AFD_DbgPrint(MIN_TRACE, ("Bad device object.\n"));
return STATUS_INVALID_PARAMETER;
- }
-
- KeInitializeEvent(&Event, NotificationEvent, FALSE);
-
- Irp = TdiBuildInternalDeviceControlIrp(TDI_ASSOCIATE_ADDRESS, /* Sub function */
- DeviceObject, /* Device object */
- ConnectionObject, /* File object */
- &Event, /* Event */
- &Iosb); /* Status */
- if (!Irp)
- return STATUS_INSUFFICIENT_RESOURCES;
-
- TdiBuildAssociateAddress(Irp,
- DeviceObject,
- ConnectionObject,
- NULL,
- NULL,
- AddressHandle);
-
- Status = TdiCall(Irp, DeviceObject, &Event, &Iosb);
-
- return Status;
+ }
+
+ KeInitializeEvent(&Event, NotificationEvent, FALSE);
+
+ Irp = TdiBuildInternalDeviceControlIrp(TDI_ASSOCIATE_ADDRESS, /* Sub function */
+ DeviceObject, /* Device object */
+ ConnectionObject, /* File object */
+ &Event, /* Event */
+ &Iosb); /* Status */
+ if (!Irp)
+ return STATUS_INSUFFICIENT_RESOURCES;
+
+ TdiBuildAssociateAddress(Irp,
+ DeviceObject,
+ ConnectionObject,
+ NULL,
+ NULL,
+ AddressHandle);
+
+ Status = TdiCall(Irp, DeviceObject, &Event, &Iosb);
+
+ return Status;
}
@@ -402,44 +402,44 @@
* May return STATUS_PENDING
*/
{
- PDEVICE_OBJECT DeviceObject;
- NTSTATUS Status;
-
- AFD_DbgPrint(MAX_TRACE, ("Called\n"));
-
- if (!ConnectionObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n"));
- *Irp = NULL;
- return STATUS_INVALID_PARAMETER;
- }
-
- DeviceObject = IoGetRelatedDeviceObject(ConnectionObject);
- if (!DeviceObject) {
+ PDEVICE_OBJECT DeviceObject;
+ NTSTATUS Status;
+
+ AFD_DbgPrint(MAX_TRACE, ("Called\n"));
+
+ if (!ConnectionObject) {
+ AFD_DbgPrint(MIN_TRACE, ("Bad connection object.\n"));
+ *Irp = NULL;
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ DeviceObject = IoGetRelatedDeviceObject(ConnectionObject);
+ if (!DeviceObject) {
AFD_DbgPrint(MIN_TRACE, ("Bad device object.\n"));
*Irp = NULL;
return STATUS_INVALID_PARAMETER;
- }
-
- *Irp = TdiBuildInternalDeviceControlIrp(TDI_LISTEN, /* Sub function */
- DeviceObject, /* Device object */
- ConnectionObject, /* File object */
- NULL, /* Event */
- Iosb); /* Status */
- if (*Irp == NULL)
- return STATUS_INSUFFICIENT_RESOURCES;
-
- TdiBuildListen(*Irp, /* IRP */
- DeviceObject, /* Device object */
- ConnectionObject, /* File object */
- CompletionRoutine, /* Completion routine */
- CompletionContext, /* Completion routine context */
- 0, /* Flags */
- *RequestConnectionInfo, /* Request connection information */
- *ReturnConnectionInfo); /* Return connection information */
-
- Status = TdiCall(*Irp, DeviceObject, NULL /* Don't wait for completion */, Iosb);
-
- return Status;
+ }
+
+ *Irp = TdiBuildInternalDeviceControlIrp(TDI_LISTEN, /* Sub function */
+ DeviceObject, /* Device object */
+ ConnectionObject, /* File object */
+ NULL, /* Event */
+ Iosb); /* Status */
+ if (*Irp == NULL)
+ return STATUS_INSUFFICIENT_RESOURCES;
+
+ TdiBuildListen(*Irp, /* IRP */
+ DeviceObject, /* Device object */
+ ConnectionObject, /* File object */
+ CompletionRoutine, /* Completion routine */
+ CompletionContext, /* Completion routine context */
+ 0, /* Flags */
+ *RequestConnectionInfo, /* Request connection information */
+ *ReturnConnectionInfo); /* Return connection information */
+
+ Status = TdiCall(*Irp, DeviceObject, NULL /* Don't wait for completion */, Iosb);
+
+ return Status;
}
@@ -461,49 +461,49 @@
* Specify NULL for Handler to stop calling event handler
*/
{
- PDEVICE_OBJECT DeviceObject;
- IO_STATUS_BLOCK Iosb;
- NTSTATUS Status;
- KEVENT Event;
- PIRP Irp;
-
- AFD_DbgPrint(MAX_TRACE, ("Called\n"));
-
- if (!FileObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad file object.\n"));
- return STATUS_INVALID_PARAMETER;
- }
-
- DeviceObject = IoGetRelatedDeviceObject(FileObject);
- if (!DeviceObject) {
+ PDEVICE_OBJECT DeviceObject;
+ IO_STATUS_BLOCK Iosb;
+ NTSTATUS Status;
+ KEVENT Event;
+ PIRP Irp;
+
+ AFD_DbgPrint(MAX_TRACE, ("Called\n"));
+
+ if (!FileObject) {
+ AFD_DbgPrint(MIN_TRACE, ("Bad file object.\n"));
+ return STATUS_INVALID_PARAMETER;
+ }
+
+ DeviceObject = IoGetRelatedDeviceObject(FileObject);
+ if (!DeviceObject) {
AFD_DbgPrint(MIN_TRACE, ("Bad device object.\n"));
return STATUS_INVALID_PARAMETER;
- }
-
- KeInitializeEvent(&Event, NotificationEvent, FALSE);
-
- Irp = TdiBuildInternalDeviceControlIrp(TDI_SET_EVENT_HANDLER, /* Sub function */
- DeviceObject, /* Device object */
- FileObject, /* File object */
- &Event, /* Event */
- &Iosb); /* Status */
- if (!Irp)
- return STATUS_INSUFFICIENT_RESOURCES;
-
-
-
- TdiBuildSetEventHandler(Irp,
- DeviceObject,
- FileObject,
- NULL,
- NULL,
- EventType,
- Handler,
- Context);
-
- Status = TdiCall(Irp, DeviceObject, &Event, &Iosb);
-
- return Status;
+ }
+
+ KeInitializeEvent(&Event, NotificationEvent, FALSE);
+
+ Irp = TdiBuildInternalDeviceControlIrp(TDI_SET_EVENT_HANDLER, /* Sub function */
+ DeviceObject, /* Device object */
+ FileObject, /* File object */
+ &Event, /* Event */
+ &Iosb); /* Status */
+ if (!Irp)
+ return STATUS_INSUFFICIENT_RESOURCES;
+
+
+
+ TdiBuildSetEventHandler(Irp,
+ DeviceObject,
+ FileObject,
+ NULL,
+ NULL,
+ EventType,
+ Handler,
+ Context);
+
+ Status = TdiCall(Irp, DeviceObject, &Event, &Iosb);
+
+ return Status;
}
@@ -535,8 +535,8 @@
PIRP Irp;
if (!FileObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad file object.\n"));
- return STATUS_INVALID_PARAMETER;
+ AFD_DbgPrint(MIN_TRACE, ("Bad file object.\n"));
+ return STATUS_INVALID_PARAMETER;
}
DeviceObject = IoGetRelatedDeviceObject(FileObject);
@@ -589,8 +589,8 @@
PIRP Irp;
if (!FileObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad file object.\n"));
- return STATUS_INVALID_PARAMETER;
+ AFD_DbgPrint(MIN_TRACE, ("Bad file object.\n"));
+ return STATUS_INVALID_PARAMETER;
}
DeviceObject = IoGetRelatedDeviceObject(FileObject);
@@ -607,17 +607,17 @@
&Event, /* Event */
&Iosb); /* Status */
if (!Irp) {
- return STATUS_INSUFFICIENT_RESOURCES;
+ return STATUS_INSUFFICIENT_RESOURCES;
}
TdiBuildQueryInformation(
- Irp,
- DeviceObject,
- FileObject,
- NULL,
- NULL,
- QueryType,
- MdlBuffer);
+ Irp,
+ DeviceObject,
+ FileObject,
+ NULL,
+ NULL,
+ QueryType,
+ MdlBuffer);
Status = TdiCall(Irp, DeviceObject, &Event, &Iosb);
@@ -777,8 +777,8 @@
if (SnmpInfo.NumAddr != 1) {
/* Skip loopback address */
- PIPADDR_ENTRY IpAddressEntry = (PIPADDR_ENTRY)
- ((PCHAR)IpAddress) + sizeof(IPADDR_ENTRY);
+ PIPADDR_ENTRY IpAddressEntry = (PIPADDR_ENTRY)
+ ((PCHAR)IpAddress) + sizeof(IPADDR_ENTRY);
*Address = DN2H(IpAddressEntry->Addr);
} else {
/* Select the first address returned */
@@ -815,9 +815,9 @@
PMDL Mdl;
if (!TransportObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad transport object.\n"));
- *Irp = NULL;
- return STATUS_INVALID_PARAMETER;
+ AFD_DbgPrint(MIN_TRACE, ("Bad transport object.\n"));
+ *Irp = NULL;
+ return STATUS_INVALID_PARAMETER;
}
DeviceObject = IoGetRelatedDeviceObject(TransportObject);
@@ -828,11 +828,11 @@
}
*Irp = TdiBuildInternalDeviceControlIrp
- ( TDI_SEND, /* Sub function */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- NULL, /* Event */
- Iosb ); /* Status */
+ ( TDI_SEND, /* Sub function */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ NULL, /* Event */
+ Iosb ); /* Status */
if (!*Irp) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
@@ -857,7 +857,7 @@
MmProbeAndLockPages(Mdl, (*Irp)->RequestorMode, IoModifyAccess);
} _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
- IoFreeMdl(Mdl);
+ IoFreeMdl(Mdl);
IoFreeIrp(*Irp);
*Irp = NULL;
_SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
@@ -866,13 +866,13 @@
AFD_DbgPrint(MID_TRACE,("AFD>>> Got an MDL: %x\n", Mdl));
TdiBuildSend(*Irp, /* I/O Request Packet */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- CompletionRoutine, /* Completion routine */
- CompletionContext, /* Completion context */
- Mdl, /* Data buffer */
- Flags, /* Flags */
- BufferLength); /* Length of data */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ CompletionRoutine, /* Completion routine */
+ CompletionContext, /* Completion context */
+ Mdl, /* Data buffer */
+ Flags, /* Flags */
+ BufferLength); /* Length of data */
Status = TdiCall(*Irp, DeviceObject, NULL, Iosb);
/* Does not block... The MDL is deleted in the receive completion
@@ -896,9 +896,9 @@
PMDL Mdl;
if (!TransportObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad transport object.\n"));
- *Irp = NULL;
- return STATUS_INVALID_PARAMETER;
+ AFD_DbgPrint(MIN_TRACE, ("Bad transport object.\n"));
+ *Irp = NULL;
+ return STATUS_INVALID_PARAMETER;
}
DeviceObject = IoGetRelatedDeviceObject(TransportObject);
@@ -909,11 +909,11 @@
}
*Irp = TdiBuildInternalDeviceControlIrp
- ( TDI_RECEIVE, /* Sub function */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- NULL, /* Event */
- Iosb ); /* Status */
+ ( TDI_RECEIVE, /* Sub function */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ NULL, /* Event */
+ Iosb ); /* Status */
if (!*Irp) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
@@ -940,22 +940,22 @@
AFD_DbgPrint(MIN_TRACE, ("probe and lock done\n"));
} _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
- IoFreeMdl(Mdl);
+ IoFreeMdl(Mdl);
IoFreeIrp(*Irp);
- *Irp = NULL;
- _SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
+ *Irp = NULL;
+ _SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
} _SEH2_END;
AFD_DbgPrint(MID_TRACE,("AFD>>> Got an MDL: %x\n", Mdl));
TdiBuildReceive(*Irp, /* I/O Request Packet */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- CompletionRoutine, /* Completion routine */
- CompletionContext, /* Completion context */
- Mdl, /* Data buffer */
- Flags, /* Flags */
- BufferLength); /* Length of data */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ CompletionRoutine, /* Completion routine */
+ CompletionContext, /* Completion context */
+ Mdl, /* Data buffer */
+ Flags, /* Flags */
+ BufferLength); /* Length of data */
Status = TdiCall(*Irp, DeviceObject, NULL, Iosb);
@@ -963,7 +963,7 @@
routine. */
AFD_DbgPrint(MID_TRACE,("Status %x Information %d\n",
- Status, Iosb->Information));
+ Status, Iosb->Information));
return Status;
}
@@ -996,9 +996,9 @@
PMDL Mdl;
if (!TransportObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad tranport object.\n"));
- *Irp = NULL;
- return STATUS_INVALID_PARAMETER;
+ AFD_DbgPrint(MIN_TRACE, ("Bad tranport object.\n"));
+ *Irp = NULL;
+ return STATUS_INVALID_PARAMETER;
}
DeviceObject = IoGetRelatedDeviceObject(TransportObject);
@@ -1009,11 +1009,11 @@
}
*Irp = TdiBuildInternalDeviceControlIrp
- ( TDI_RECEIVE_DATAGRAM, /* Sub function */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- NULL, /* Event */
- Iosb ); /* Status */
+ ( TDI_RECEIVE_DATAGRAM, /* Sub function */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ NULL, /* Event */
+ Iosb ); /* Status */
if (!*Irp) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
@@ -1038,7 +1038,7 @@
MmProbeAndLockPages(Mdl, (*Irp)->RequestorMode, IoModifyAccess);
} _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
- IoFreeMdl(Mdl);
+ IoFreeMdl(Mdl);
IoFreeIrp(*Irp);
*Irp = NULL;
_SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
@@ -1047,16 +1047,16 @@
AFD_DbgPrint(MID_TRACE,("AFD>>> Got an MDL: %x\n", Mdl));
TdiBuildReceiveDatagram
- (*Irp, /* I/O Request Packet */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- CompletionRoutine, /* Completion routine */
- CompletionContext, /* Completion context */
- Mdl, /* Data buffer */
- BufferLength,
- Addr,
- Addr,
- Flags); /* Length of data */
+ (*Irp, /* I/O Request Packet */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ CompletionRoutine, /* Completion routine */
+ CompletionContext, /* Completion context */
+ Mdl, /* Data buffer */
+ BufferLength,
+ Addr,
+ Addr,
+ Flags); /* Length of data */
Status = TdiCall(*Irp, DeviceObject, NULL, Iosb);
/* Does not block... The MDL is deleted in the receive completion
@@ -1092,9 +1092,9 @@
PMDL Mdl;
if (!TransportObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad transport object.\n"));
- *Irp = NULL;
- return STATUS_INVALID_PARAMETER;
+ AFD_DbgPrint(MIN_TRACE, ("Bad transport object.\n"));
+ *Irp = NULL;
+ return STATUS_INVALID_PARAMETER;
}
AFD_DbgPrint(MID_TRACE,("Called(TransportObject %x)\n", TransportObject));
@@ -1107,11 +1107,11 @@
}
*Irp = TdiBuildInternalDeviceControlIrp
- ( TDI_SEND_DATAGRAM, /* Sub function */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- NULL, /* Event */
- Iosb ); /* Status */
+ ( TDI_SEND_DATAGRAM, /* Sub function */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ NULL, /* Event */
+ Iosb ); /* Status */
if (!*Irp) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
@@ -1137,7 +1137,7 @@
MmProbeAndLockPages(Mdl, (*Irp)->RequestorMode, IoModifyAccess);
} _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) {
AFD_DbgPrint(MIN_TRACE, ("MmProbeAndLockPages() failed.\n"));
- IoFreeMdl(Mdl);
+ IoFreeMdl(Mdl);
IoFreeIrp(*Irp);
*Irp = NULL;
_SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES);
@@ -1146,14 +1146,14 @@
AFD_DbgPrint(MID_TRACE,("AFD>>> Got an MDL: %x\n", Mdl));
TdiBuildSendDatagram
- (*Irp, /* I/O Request Packet */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- CompletionRoutine, /* Completion routine */
- CompletionContext, /* Completion context */
- Mdl, /* Data buffer */
- BufferLength, /* Bytes to send */
- Addr); /* Address */
+ (*Irp, /* I/O Request Packet */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ CompletionRoutine, /* Completion routine */
+ CompletionContext, /* Completion context */
+ Mdl, /* Data buffer */
+ BufferLength, /* Bytes to send */
+ Addr); /* Address */
Status = TdiCall(*Irp, DeviceObject, NULL, Iosb);
/* Does not block... The MDL is deleted in the send completion
@@ -1179,8 +1179,8 @@
KeInitializeEvent(&Event, NotificationEvent, FALSE);
if (!TransportObject) {
- AFD_DbgPrint(MIN_TRACE, ("Bad transport object.\n"));
- return STATUS_INVALID_PARAMETER;
+ AFD_DbgPrint(MIN_TRACE, ("Bad transport object.\n"));
+ return STATUS_INVALID_PARAMETER;
}
AFD_DbgPrint(MID_TRACE,("Called(TransportObject %x)\n", TransportObject));
@@ -1192,11 +1192,11 @@
}
Irp = TdiBuildInternalDeviceControlIrp
- ( TDI_SEND_DATAGRAM, /* Sub function */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- &Event, /* Event */
- Iosb ); /* Status */
+ ( TDI_SEND_DATAGRAM, /* Sub function */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ &Event, /* Event */
+ Iosb ); /* Status */
if (!Irp) {
AFD_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));
@@ -1204,15 +1204,15 @@
}
TdiBuildDisconnect
- (Irp, /* I/O Request Packet */
- DeviceObject, /* Device object */
- TransportObject, /* File object */
- CompletionRoutine, /* Completion routine */
- CompletionContext, /* Completion context */
- Time, /* Time */
- Flags, /* Disconnect flags */
- RequestConnectionInfo, /* Indication of who to disconnect */
- ReturnConnectionInfo); /* Indication of who disconnected */
+ (Irp, /* I/O Request Packet */
+ DeviceObject, /* Device object */
+ TransportObject, /* File object */
+ CompletionRoutine, /* Completion routine */
+ CompletionContext, /* Completion context */
+ Time, /* Time */
+ Flags, /* Disconnect flags */
+ RequestConnectionInfo, /* Indication of who to disconnect */
+ ReturnConnectionInfo); /* Indication of who disconnected */
Status = TdiCall(Irp, DeviceObject, &Event, Iosb);