diff options
Diffstat (limited to 'network/wsk/echosrv/README.md')
| -rw-r--r-- | network/wsk/echosrv/README.md | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/network/wsk/echosrv/README.md b/network/wsk/echosrv/README.md index fe1c4dcd..a7040f45 100644 --- a/network/wsk/echosrv/README.md +++ b/network/wsk/echosrv/README.md @@ -16,51 +16,52 @@ The sample implements a simple kernel-mode application by using the Winsock Kern This sample is not intended for use in a production environment. - -WPP SOFTWARE TRACING --------------------- +## WPP SOFTWARE TRACING This sample driver uses WPP Software Tracing in order to log its actions. You can find detailed information on WPP Software Tracing in the WDK documentation. Here is a quick overview of one way to collect trace logs from the sample driver by using the tracing tools that are available in the \\tools\\tracing directory in the WDK. All code for this sample is located in \\network\\WSK\\echosrv directory. -1. In a Command Prompt window, copy Echosrv.ctl and Echosrv.pdb into a directory and change to that directory (cd). -2. Start software tracing for the sample driver by typing the following command: +1. In a Command Prompt window, copy Echosrv.ctl and Echosrv.pdb into a directory and change to that directory (cd). + +1. Start software tracing for the sample driver by typing the following command: - **tracelog -start echosrvtrace -guid echosrv.ctl -f logfile.etl -flags 0x3** + `tracelog -start echosrvtrace -guid echosrv.ctl -f logfile.etl -flags 0x3` The value that is provided for the -flags option determines which events will be logged by the sample driver. The sample currently has two event types denoted by the TRCERROR and TRCINFO macros where TRCERROR is 0x1 and TRCINFO is 0x2. Thus, a flag value of 0x3 (0x1 combined in a bitwise OR with 0x2) in the previous tracelog command tells the sample driver to log both TRCERROR and TRCINFO events. -3. In order to stop tracing, type the following command: +1. In order to stop tracing, type the following command: tracelog -stop echosrvtrace -4. Convert the trace logs in Logfile.etl into a human-readable format by typing the following command: +1. Convert the trace logs in Logfile.etl into a human-readable format by typing the following command: - **tracefmt -o logfile.txt -f logfile.etl -r . -i \\***full-path***\\ echosrv.sys** + `tracefmt -o logfile.txt -f logfile.etl -r . -i \full-path\ echosrv.sys` -5. Open Logfile.txt to view the trace logs. + where \\*full-path*\\ is the directory that contains the Echosrv.sys file. + +1. Open Logfile.txt to view the trace logs. Be aware that tracing for the sample driver can be started at any time before the driver is started or while the driver is already running. -To run the sample ------------------ +## To run the sample Install and run this sample driver by using the following steps: -1. Copy the Echosrv.sys file to a directory on the test machine. -2. In a Command Prompt window, type the following command: +1. Copy the Echosrv.sys file to a directory on the test machine. + +1. In a Command Prompt window, type the following command: - **sc create echosrv type= kernel binpath= \\***full-path***\\ echosrv.sys** + `sc create echosrv type= kernel binpath= \full-path\ echosrv.sys` where \\*full-path*\\ is the directory that contains the Echosrv.sys file. -3. To start the driver, type: +1. To start the driver, type: - **sc start echosrv** + `sc start echosrv` -4. To stop the driver, type: +1. To stop the driver, type: - **sc stop echosrv** + `sc stop echosrv` After the driver is installed and started, it will listen for incoming TCP connection requests on port 40007 over both IPv4 and IPv6 protocols until the driver is stopped. On each connection, the driver will echo all the received data back to the peer until the connection is closed by the peer. -For more information on the usage of the Winsock Kernel (WSK) programming interface, see [Winsock Kernel](http://msdn.microsoft.com/en-us/library/windows/hardware/ff571084). +For more information on the usage of the Winsock Kernel (WSK) programming interface, see [Winsock Kernel](https://docs.microsoft.com/windows-hardware/drivers/network/winsock-kernel). |
