From f7eb3ca99f9292e7b5722de53703788bd0913fca Mon Sep 17 00:00:00 2001 From: Dmitry Shihovtsev Date: Thu, 28 Mar 2019 11:17:39 +0600 Subject: [PATCH] Added description for specifying an interface name for Windows --- CONTRIBUTORS | 1 + README.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9f8b6f4..25e1d8f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -11,3 +11,4 @@ yinheli Paul Querna Cuong Manh Le Neil Alexander +Dmitry Shihovtsev diff --git a/README.md b/README.md index b53f1db..00969a5 100644 --- a/README.md +++ b/README.md @@ -220,6 +220,21 @@ ping 10.1.0.255 You'll see output containing the IPv4 ICMP frame same as the Linux version. +#### Specifying interface name + +If you are going to use multiple TAP devices on the Windows, there is a way to specify an interface name to select the exact device that you need: + +```go + ifce, err := water.New(water.Config{ + DeviceType: water.TAP, + PlatformSpecificParams: water.PlatformSpecificParams{ + ComponentID: "tap0901", + InterfaceName: "Ethernet 3", + Network: "192.168.1.10/24", + }, + }) +``` + ## TODO * tuntaposx for TAP on Darwin