diff options
| author | Barry Golden <[email protected]> | 2019-09-19 09:34:00 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-09-19 09:34:00 -0700 |
| commit | 65a2384f555cf54601e3b9c29eb53075193a9af1 (patch) | |
| tree | f7af871d3fef5f9a15704b435a2017fb255c6727 /network/trans | |
| parent | 1238743debbcd302221eb77842053bfcea46656f (diff) | |
Update README.md (#421)8552485523855228552185520855198551885517855168551585514855138551285511855108550985508855078550685505
Diffstat (limited to 'network/trans')
| -rw-r--r-- | network/trans/stmedit/README.md | 91 |
1 files changed, 45 insertions, 46 deletions
diff --git a/network/trans/stmedit/README.md b/network/trans/stmedit/README.md index f0218b01..f73db081 100644 --- a/network/trans/stmedit/README.md +++ b/network/trans/stmedit/README.md @@ -8,17 +8,6 @@ products: - windows-wdk --- - - -<!--- - name: Windows Filtering Platform Stream Edit Sample - platform: KMDF - language: cpp - category: Network - description: Demonstrates replacing a string pattern for a Transmission Control Protocol (TCP) connection using the Windows Filtering Platform (WFP). - samplefwlink: http://go.microsoft.com/fwlink/p/?LinkId=617933 ----> - # Windows Filtering Platform Stream Edit Sample This sample driver demonstrates replacing a string pattern for a Transmission Control Protocol (TCP) connection using the Windows Filtering Platform (WFP). @@ -29,59 +18,69 @@ This sample builds a Universal Windows Driver. It uses only APIs and DDIs that a The sample consists of a kernel-mode Windows Filtering Platform (WFP) callout driver (Stmedit.sys) that can operate in one of the following modes: -- Inline editing where all modification is done within the `ClassifyFn` callout function. -- Out-of-band editing where all modification is done by a worker thread (the default). +- Inline editing where all modification is done within the `ClassifyFn` callout function. + +- Out-of-band editing where all modification is done by a worker thread (the default). The sample performs inspection for both Internet Protocol version 4 (IPv4) and Internet Protocol version 6 (IPv6) traffic. Before experimenting with the sample, add an exception for the InspectionPort to your host firewall. -Automatic deployment --------------------- +## Automatic deployment + +Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Provision a computer for driver deployment and testing](https://docs.microsoft.com/windows-hardware/drivers/gettingstarted/provision-a-target-computer-wdk-8-1). + +After you have provisioned the target computer, continue with these steps: + +1. On the host computer, in Visual Studio, in Solution Explorer, right click **package** (lower case), and choose **Properties**. Navigate to **Configuration Properties \> Driver Install \> Deployment**. + +1. Check **Enable deployment**, and check **Remove previous driver versions before deployment**. For **Target Computer Name**, select the name of a target computer that you provisioned previously. Select **Do not install**. Click **OK**. + +1. On the **Build** menu, choose **Build Solution**. -Before you automatically deploy a driver, you must provision the target computer. For instructions, see [Configuring a Computer for Driver Deployment, Testing, and Debugging](http://msdn.microsoft.com/en-us/library/windows/hardware/). After you have provisioned the target computer, continue with these steps: +1. On the target computer, navigate to DriverTest\\Drivers, and locate the file stmedit.inf. Right click stmedit.inf, and choose **Install**. -1. On the host computer, in Visual Studio, in Solution Explorer, right click **package** (lower case), and choose **Properties**. Navigate to **Configuration Properties \> Driver Install \> Deployment**. -2. Check **Enable deployment**, and check **Remove previous driver versions before deployment**. For **Target Computer Name**, select the name of a target computer that you provisioned previously. Select **Do not install**. Click **OK**. -3. On the **Build** menu, choose **Build Solution**. -4. On the target computer, navigate to DriverTest\\Drivers, and locate the file stmedit.inf. Right click stmedit.inf, and choose **Install**. +## Manual deployment -Manual deployment ------------------ +Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](https://docs.microsoft.com/windows-hardware/drivers/devtest/devcon) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment). -Before you manually deploy a driver, you must turn on test signing and install a certificate on the target computer. You also need to copy the [DevCon](http://msdn.microsoft.com/en-us/library/windows/hardware/ff544707) tool to the target computer. For instructions, see [Preparing a Computer for Manual Driver Deployment](https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/preparing-a-computer-for-manual-driver-deployment). After you have prepared the target computer for manual deployment, continue with these steps: +After you have prepared the target computer for manual deployment, continue with these steps: -1. Copy all of the files in your driver package to a folder on the target computer (for example, c:\\WfpStreamEditSamplePackage). -2. On the target computer, navigate to your driver package folder. Right click stmedit.inf, and choose **Install** +1. Copy all of the files in your driver package to a folder on the target computer (for example, c:\\WfpStreamEditSamplePackage). -Create Registry values ----------------------- +1. On the target computer, navigate to your driver package folder. Right click stmedit.inf, and choose **Install** -- On the target computer, open Regedit, and navigate to this key: +## Create Registry values - **HKLM**\\**System**\\**CurrentControlSet**\\**Services**\\**strmedit**\\**Parameters** +- On the target computer, open Regedit, and navigate to this key: + + **HKLM**\\**System**\\**CurrentControlSet**\\**Services**\\**strmedit**\\**Parameters** You can create and set values for the following registry entries. -- **StringToFind** (REG_SZ, default = "rainy") -- **StringX** (REG_SZ, default = "cloudy") -- **StringToReplace** (REG_SZ, default = "sunny") -- **InspectionLocalPort** (REG_DWORD, default = 8888) -- **InspectionRemotePort** (REG_DWORD, default = 0) - Note: for this sample, a local or remote port is mandatory. Both cannot be zero. -- **InspectioDirection** (REG_DWORD, default = 2) - possible values : 2 (inbound + outbound), 0 (FWP_DIRECTION_OUTBOUND), 1 (FWP_DIRECTION_INBOUND) -- **MultipleCallouts** (REG_DWORD, default = true/1) - controls registration of multiple callouts. Set 0 for false, other for TRUE -- **BusyThreshold** (REG_DWORD, default = 16KB) - BusyThreshold value is in KBs (e.g. a value of 5 means 5KB) +- **StringToFind** (REG_SZ, default = "rainy") + +- **StringX** (REG_SZ, default = "cloudy") + +- **StringToReplace** (REG_SZ, default = "sunny") + +- **InspectionLocalPort** (REG_DWORD, default = 8888) + +- **InspectionRemotePort** (REG_DWORD, default = 0) + + > [!NOTE] + > For this sample, a local or remote port is mandatory. Both cannot be zero. + +- **InspectioDirection** (REG_DWORD, default = 2) Possible values : 2 (inbound + outbound), 0 (FWP_DIRECTION_OUTBOUND), 1 (FWP_DIRECTION_INBOUND) + +- **MultipleCallouts** (REG_DWORD, default = true/1) Controls registration of multiple callouts. Set 0 for false, other for TRUE + +- **BusyThreshold** (REG_DWORD, default = 16KB) BusyThreshold value is in KBs (e.g. a value of 5 means 5KB) -Start the stmedit service -------------------------- +## Start the stmedit service On the target computer, open a Command Prompt window as Administrator, and enter **net start stmedit**. (To stop the driver, enter **net stop stmedit**.) -Remarks -------- +## Remarks -For more information on creating a Windows Filtering Platform Callout Driver, see [Windows Filtering Platform Callout Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff571068). +For more information on creating a Windows Filtering Platform Callout Driver, see [Windows Filtering Platform Callout Drivers](https://docs.microsoft.com/windows-hardware/drivers/network/windows-filtering-platform-callout-drivers2). |
