summaryrefslogtreecommitdiff
path: root/network/ndis
diff options
context:
space:
mode:
Diffstat (limited to 'network/ndis')
-rw-r--r--network/ndis/ndisprot/6x/README.md63
-rw-r--r--network/ndis/ndisprot_kmdf/README.md88
2 files changed, 74 insertions, 77 deletions
diff --git a/network/ndis/ndisprot/6x/README.md b/network/ndis/ndisprot/6x/README.md
index 2ac81988..8c94783c 100644
--- a/network/ndis/ndisprot/6x/README.md
+++ b/network/ndis/ndisprot/6x/README.md
@@ -22,49 +22,50 @@ Select **Sample NDIS Protocol Driver** and click **OK**. After installing the pr
## Usage
-To start the driver, type **Net start ndisprot**.
+To start the driver, type `Net start ndisprot`.
-To stop the driver, type **Net stop ndisprot**.
+To stop the driver, type `Net stop ndisprot`.
-To test the driver, run **prottest**. For help on usage, run **prottest -?**
+To test the driver, run `prottest`. For help on usage, run `prottest -?`
**usage: PROTTEST [options] \\*devicename***
-options | Description
-----------|------------
--e | Enumerate devices
--r | Read
--w | Write (default)
--l | <length>: length of each packet (default: 100)
--n | <count>: number of packets (defaults to infinity)
--m | <MAC address> (defaults to local MAC)
+| Options | description |
+| --- | --- |
+| -e | Enumerate devices |
+| -r | Read |
+| -w | Write (default) |
+| -l | <length>: length of each packet (default: 100) |
+| -n | <count>: number of packets (defaults to infinity) |
+| -m | <MAC address> (defaults to local MAC) |
Prottest exercises the IOCTLs supported by NDISPROT, and sends and/or receives data on the selected device. In order to use prottest, the user must have administrative privilege. Users should pass down a big enough buffer in order to receive the entire received data. If the length of the buffer passed down is smaller than the length of the received data, NDISPROT will only copy part of the data and discard the rest when the given buffer is full.
Use the **-e** option to enumerate all devices to which NDISPROT is bound:
-**C:\\prot\>prottest -n 2 \\DEVICE\\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}**
+```cmd
+C:\\prot\>prottest -n 2 \\DEVICE\\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}
+DoWriteProc: finished sending 2 packets of 100 bytes each
+DoReadProc finished: read 2 packets
+```
-**DoWriteProc: finished sending 2 packets of 100 bytes each**
+> [!NOTE]
+> With a checked version of ndisprot.sys, you can control the volume of debug information generated by changing the variable `ndisprotDebugLevel`. Refer to debug.h for more information.
-**DoReadProc finished: read 2 packets**
-
-**Note** With a checked version of ndisprot.sys, you can control the volume of debug information generated by changing the variable `ndisprotDebugLevel`. Refer to debug.h for more information.
-
-For more information, see [NDIS Protocol Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff566821) in the network devices design guide.
+For more information, see [NDIS Protocol Drivers](https://docs.microsoft.com/windows-hardware/drivers/network/ndis-protocol-drivers) in the network devices design guide.
## File Manifest
-File | Description
------|------------
-prottest.c | User-mode test application
-debug.c | Routines to aid debugging
-debug.h | Debug macro definitions
-macros.h | Spinlock, event, referencing macros
-ndisbind.c | NDIS protocol entry points to handle binding/unbinding from adapters
-ndisprot.h | Data structure definitions
-ndisprot.inf | INF file for installing NDISPROT
-ntdisp.c | NT Entry points and dispatch routines for NDISPROT
-protuser.h | IOCTL and associated structure definitions
-recv.c | NDIS protocol entry points for receiving data, and IRP_MJ_READ processing
-send.c | NDIS protocol routines for sending data, and IRP_MJ_WRITE processing \ No newline at end of file
+| File | description |
+| --- | --- |
+| prottest.c | User-mode test application |
+| debug.c | Routines to aid debugging |
+| debug.h | Debug macro definitions |
+| macros.h | Spinlock, event, referencing macros |
+| ndisbind.c | NDIS protocol entry points to handle binding/unbinding from adapters |
+| ndisprot.h | Data structure definitions |
+| ndisprot.inf | INF file for installing NDISPROT |
+| ntdisp.c | NT Entry points and dispatch routines for NDISPROT |
+| protuser.h | IOCTL and associated structure definitions |
+| recv.c | NDIS protocol entry points for receiving data, and IRP_MJ_READ processing |
+| send.c | NDIS protocol routines for sending data, and IRP_MJ_WRITE processing |
diff --git a/network/ndis/ndisprot_kmdf/README.md b/network/ndis/ndisprot_kmdf/README.md
index cd1b9bfb..6f1c66e6 100644
--- a/network/ndis/ndisprot_kmdf/README.md
+++ b/network/ndis/ndisprot_kmdf/README.md
@@ -16,40 +16,38 @@ The driver supports sending and receiving raw Ethernet frames using ReadFile/Wri
The sample also demonstrates how to write a Notify Object dll. The Notify Object is used for calling into the Wdf Coinstaller to install and load the framework library.
-Related technologies
---------------------
+## Related technologies
-[Creating Framework-based Miniport Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff540778)
+[Creating Framework-based Miniport Drivers](https://docs.microsoft.com/windows-hardware/drivers/wdf/creating-kmdf-miniport-drivers)
-Build the sample
-----------------
+## Build the sample
-For information on how to build a driver solution using Microsoft Visual Studio, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644).
+For information on how to build a driver solution using Microsoft Visual Studio, see [Building a Driver with Visual Studio and the WDK](https://docs.microsoft.com/windows-hardware/drivers/develop/building-a-driver).
The 60 subdirectory (\\ndisprot\_kmdf\\60) indicates that the built sample will be NDIS 6.0 compatible.
-Installation
-------------
+## Installation
Use the following steps to install the sample.
-1. When you build the sample, the build engine produces ndisprot.inf in the build target directory. Copy nprt6wdf.sys, protnotify.dll, and ndisprot.inf to a directory.
-2. Copy the KMDF coinstaller (wdfcoinstaller*MMmmm*.dll) to the same directory.
+1. When you build the sample, the build engine produces ndisprot.inf in the build target directory. Copy nprt6wdf.sys, protnotify.dll, and ndisprot.inf to a directory.
- **Note** You can obtain redistributable framework updates by downloading the *wdfcoinstaller.msi* package from [WDK 8 Redistributable Components](http://go.microsoft.com/fwlink/p/?LinkID=226396). This package performs a silent install into the directory of your Windows Driver Kit (WDK) installation. You will see no confirmation that the installation has completed. You can verify that the redistributables have been installed on top of the WDK by ensuring there is a redist\\wdf directory under the root directory of the WDK, %ProgramFiles(x86)%\\Windows Kits\\8.0.
+1. Copy the KMDF coinstaller (wdfcoinstaller*MMmmm*.dll) to the same directory.
-3. In Control Panel, in the **Network and Internet** group, open **Network Connections**, select an adapter, and then open **Properties**.
+ > [!NOTE]
+ > You can obtain redistributable framework updates by downloading the *wdfcoinstaller.msi* package from [WDK 8 Redistributable Components](https://go.microsoft.com/fwlink/p/?LinkID=253170). This package performs a silent install into the directory of your Windows Driver Kit (WDK) installation. You will see no confirmation that the installation has completed. You can verify that the redistributables have been installed on top of the WDK by ensuring there is a redist\\wdf directory under the root directory of the WDK, %ProgramFiles(x86)%\\Windows Kits\\8.0.
-4. Click **Install**, and then click **Protocol**.
+1. In Control Panel, in the **Network and Internet** group, open **Network Connections**, select an adapter, and then open **Properties**.
-5. Click **Add**, and then click **Have disk**.
+1. Click **Install**, and then click **Protocol**.
-6. Point to the location of the INF file and driver, click **Sample NDIS Protocol Driver**, and then click **OK**.
+1. Click **Add**, and then click **Have disk**.
-7. After installing the protocol, copy the test application Uiotest.exe to a convenient location. Note that the driver service has been set to manual start in the INF file. As a result, it doesn't get loaded automatically when you install the driver.
+1. Point to the location of the INF file and driver, click **Sample NDIS Protocol Driver**, and then click **OK**.
-Usage
------
+1. After installing the protocol, copy the test application Uiotest.exe to a convenient location. Note that the driver service has been set to manual start in the INF file. As a result, it doesn't get loaded automatically when you install the driver.
+
+## Usage
From an administrator command prompt, to start the driver, type **Net start ndisprot**.
@@ -59,7 +57,7 @@ You can build Prottest.exe from source code located in the \\ndisprot\\6x\\test
To test the NDIS 6.0 driver, run prottest. For help on usage, run **prottest -?**.
-```
+```cmd
usage: PROTTEST [options] <devicename>
options:
-e: Enumerate devices
@@ -71,12 +69,11 @@ options:
-f Use a fake address to send out the packets.
```
-
Prottest exercises the IOCTLs supported by NDISPROT, and sends and/or receives data on the selected device. In order to use Prottest, the user must have administrative privilege. Users should pass down a buffer that is large enough to contain the data returned. If the length of the buffer passed down is smaller than the length of the received data, NDISPROT will only copy part of the data and discard the rest when the given buffer is full.
For an NDIS 6.0 driver, use the -e option on prottest to enumerate all devices to which NDISPROT is bound:
-```
+```cmd
C:\prot>prottest -e
0. \DEVICE\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}
- Intel-Based 10/100 Ethernet Card
@@ -84,7 +81,7 @@ C:\prot>prottest -e
The following command sends and receives 2 packets on a device. Since these packets are sent to the local MAC address (default), both packets are received. The device name parameter to prottest is picked up from the output of **prottest -e** (see above).
-```
+```cmd
C:\prot>prottest -n 2 \DEVICE\{9273DA7D-5275-4B9A-AC56-68A49D121F1F}
DoWriteProc: finished sending 2 packets of 100 bytes each
DoReadProc finished: read 2 packets
@@ -94,31 +91,30 @@ For security reasons, this driver does not allow packets with fake MAC addresses
With a checked version of ndisprot.sys, you can control the volume of debug information generated by changing the variable **ndisprotDebugLevel**. Refer to debug.h for more information.
-File Manifest
--------------
+## File Manifest
-**Directory: 60**
+### Directory: 60
-File | Description
------|------------
-debug.c | Routines to aid debugging
-debug.h | Debug macro definitions
-excallbk.c | Handles load order dependency between this sample and NDISWDM sample
-macros.h | Spinlock, event, referencing macros
-ndisbind.c | NDIS protocol entry points to handle binding/unbinding from adapters
-ndisprot.h | Data structure definitions
-precomp.h | Contains the precompiled headers
-protuser.h | Has the definitions of ioctls issued by protuser.exe application used on NDIS 6.0
-nuiouser.h | Has the definitions of ioctls issued by nuiouser.exe application used on NDIS 5.0
-ndisprot.inf | INF file for installing NDISPROT
-ntdisp.c | NT Entry points and dispatch routines for NDISPROT
-recv.c | NDIS protocol entry points for receiving data, and IRP_MJ_READ processing
+| File | description |
+| --- | --- |
+| debug.c | Routines to aid debugging |
+| debug.h | Debug macro definitions |
+| excallbk.c | Handles load order dependency between this sample and NDISWDM sample |
+| macros.h | Spinlock, event, referencing macros |
+| ndisbind.c | NDIS protocol entry points to handle binding/unbinding from adapters |
+| ndisprot.h | Data structure definitions |
+| precomp.h | Contains the precompiled headers |
+| protuser.h | Has the definitions of ioctls issued by protuser.exe application used on NDIS 6.0 |
+| nuiouser.h | Has the definitions of ioctls issued by nuiouser.exe application used on NDIS 5.0 |
+| ndisprot.inf | INF file for installing NDISPROT |
+| ntdisp.c | NT Entry points and dispatch routines for NDISPROT |
+| recv.c | NDIS protocol entry points for receiving data, and IRP_MJ_READ processing |
-**Directory: NotifyOb**
+### Directory: NotifyOb
-File | Description
------|------------
-Common.hpp | Header file containing the common include files for the project
-dllmain.cpp | Handles loading/unloading of Wdf Coinstaller and the notify object dll
-ProtNotify.idl | Defines the interfaces for the notify object dll
-ProtNotify.rc | Resource file for the notify object dll
+| File | description |
+| --- | --- |
+| Common.hpp | Header file containing the common include files for the project |
+| dllmain.cpp | Handles loading/unloading of Wdf Coinstaller and the notify object dll |
+| ProtNotify.idl | Defines the interfaces for the notify object dll |
+| ProtNotify.rc | Resource file for the notify object dll |