https://git.reactos.org/?p=reactos.git;a=commitdiff;h=792b64ea468179886a421…
commit 792b64ea468179886a42126165d59c79bc8e1bbf
Author: Victor Perevertkin <victor.perevertkin(a)reactos.org>
AuthorDate: Sun Nov 17 02:29:55 2019 +0300
Commit: Victor Perevertkin <victor(a)perevertkin.ru>
CommitDate: Tue Apr 7 05:32:40 2020 +0300
[TCPIP][FORMATTING] Format TiDispatch function. No functional changes
---
drivers/network/tcpip/tcpip/main.c | 95 ++++++++++++++++++++------------------
1 file changed, 51 insertions(+), 44 deletions(-)
diff --git a/drivers/network/tcpip/tcpip/main.c b/drivers/network/tcpip/tcpip/main.c
index 1b8ab52df22..919d0260221 100644
--- a/drivers/network/tcpip/tcpip/main.c
+++ b/drivers/network/tcpip/tcpip/main.c
@@ -473,23 +473,26 @@ TiDispatchInternal(
}
+/**
+ * @brief Dispatch routine for IRP_MJ_DEVICE_CONTROL requests
+ *
+ * @param[in] DeviceObject
+ * Pointer to a device object for this driver
+ * @param[in] Irp
+ * Pointer to a I/O request packet
+ *
+ * @return
+ * Status of the operation
+ */
NTSTATUS NTAPI
TiDispatch(
PDEVICE_OBJECT DeviceObject,
PIRP Irp)
-/*
- * FUNCTION: Dispatch routine for IRP_MJ_DEVICE_CONTROL requests
- * ARGUMENTS:
- * DeviceObject = Pointer to a device object for this driver
- * Irp = Pointer to a I/O request packet
- * RETURNS:
- * Status of the operation
- */
{
NTSTATUS Status;
PIO_STACK_LOCATION IrpSp;
- IrpSp = IoGetCurrentIrpStackLocation(Irp);
+ IrpSp = IoGetCurrentIrpStackLocation(Irp);
TI_DbgPrint(DEBUG_IRP, ("[TCPIP, TiDispatch] Called. IRP is at (0x%X).\n",
Irp));
@@ -497,51 +500,55 @@ TiDispatch(
#if 0
Status = TdiMapUserRequest(DeviceObject, Irp, IrpSp);
- if (NT_SUCCESS(Status)) {
+ if (NT_SUCCESS(Status))
+ {
TiDispatchInternal(DeviceObject, Irp);
Status = STATUS_PENDING;
- } else {
+ }
+ else
+ {
#else
if (TRUE) {
#endif
- /* See if this request is TCP/IP specific */
- switch (IrpSp->Parameters.DeviceIoControl.IoControlCode) {
- case IOCTL_TCP_QUERY_INFORMATION_EX:
- TI_DbgPrint(MIN_TRACE, ("TCP_QUERY_INFORMATION_EX\n"));
- Status = DispTdiQueryInformationEx(Irp, IrpSp);
- break;
-
- case IOCTL_TCP_SET_INFORMATION_EX:
- TI_DbgPrint(MIN_TRACE, ("TCP_SET_INFORMATION_EX\n"));
- Status = DispTdiSetInformationEx(Irp, IrpSp);
- break;
-
- case IOCTL_SET_IP_ADDRESS:
- TI_DbgPrint(MIN_TRACE, ("SET_IP_ADDRESS\n"));
- Status = DispTdiSetIPAddress(Irp, IrpSp);
- break;
-
- case IOCTL_DELETE_IP_ADDRESS:
- TI_DbgPrint(MIN_TRACE, ("DELETE_IP_ADDRESS\n"));
- Status = DispTdiDeleteIPAddress(Irp, IrpSp);
- break;
-
- case IOCTL_QUERY_IP_HW_ADDRESS:
- TI_DbgPrint(MIN_TRACE, ("QUERY_IP_HW_ADDRESS\n"));
- Status = DispTdiQueryIpHwAddress(DeviceObject, Irp, IrpSp);
- break;
-
- default:
- TI_DbgPrint(MIN_TRACE, ("Unknown IOCTL 0x%X\n",
- IrpSp->Parameters.DeviceIoControl.IoControlCode));
- Status = STATUS_NOT_IMPLEMENTED;
- break;
+ /* See if this request is TCP/IP specific */
+ switch (IrpSp->Parameters.DeviceIoControl.IoControlCode)
+ {
+ case IOCTL_TCP_QUERY_INFORMATION_EX:
+ TI_DbgPrint(MIN_TRACE, ("TCP_QUERY_INFORMATION_EX\n"));
+ Status = DispTdiQueryInformationEx(Irp, IrpSp);
+ break;
+
+ case IOCTL_TCP_SET_INFORMATION_EX:
+ TI_DbgPrint(MIN_TRACE, ("TCP_SET_INFORMATION_EX\n"));
+ Status = DispTdiSetInformationEx(Irp, IrpSp);
+ break;
+
+ case IOCTL_SET_IP_ADDRESS:
+ TI_DbgPrint(MIN_TRACE, ("SET_IP_ADDRESS\n"));
+ Status = DispTdiSetIPAddress(Irp, IrpSp);
+ break;
+
+ case IOCTL_DELETE_IP_ADDRESS:
+ TI_DbgPrint(MIN_TRACE, ("DELETE_IP_ADDRESS\n"));
+ Status = DispTdiDeleteIPAddress(Irp, IrpSp);
+ break;
+
+ case IOCTL_QUERY_IP_HW_ADDRESS:
+ TI_DbgPrint(MIN_TRACE, ("QUERY_IP_HW_ADDRESS\n"));
+ Status = DispTdiQueryIpHwAddress(DeviceObject, Irp, IrpSp);
+ break;
+
+ default:
+ TI_DbgPrint(MIN_TRACE, ("Unknown IOCTL 0x%X\n",
+ IrpSp->Parameters.DeviceIoControl.IoControlCode));
+ Status = STATUS_NOT_IMPLEMENTED;
+ break;
}
}
TI_DbgPrint(DEBUG_IRP, ("[TCPIP, TiDispatch] Leaving. Status = (0x%X).\n",
Status));
- return IRPFinish( Irp, Status );
+ return IRPFinish(Irp, Status);
}