diff options
author | David Crawshaw <crawshaw@tailscale.com> | 2020-06-22 10:40:59 +1000 |
---|---|---|
committer | David Crawshaw <crawshaw@tailscale.com> | 2020-06-22 10:40:59 +1000 |
commit | 00bcd865e6996f932ea0dcacf7df015f79307153 (patch) | |
tree | b8f35fdd790ce8a2b4c939952cbe3c1505b06890 /conn | |
parent | f28a6d244b5133439d408b9fe13e12e9917f9646 (diff) |
conn: add comments saying what uses these interfaces
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
Diffstat (limited to 'conn')
-rw-r--r-- | conn/conn.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/conn/conn.go b/conn/conn.go index c0ca3b8..ad91d2d 100644 --- a/conn/conn.go +++ b/conn/conn.go @@ -13,6 +13,9 @@ import ( ) // A Bind listens on a port for both IPv6 and IPv4 UDP traffic. +// +// A Bind interface may also be a PeekLookAtSocketFd or BindSocketToInterface, +// depending on the platform-specific implementation. type Bind interface { // LastMark reports the last mark set for this Bind. LastMark() uint32 @@ -51,14 +54,14 @@ func CreateBind(port uint16) (b Bind, actualPort uint16, err error) { } // BindSocketToInterface is implemented by Bind objects that support being -// tied to a single network interface. +// tied to a single network interface. Used by wireguard-windows. type BindSocketToInterface interface { BindSocketToInterface4(interfaceIndex uint32, blackhole bool) error BindSocketToInterface6(interfaceIndex uint32, blackhole bool) error } // PeekLookAtSocketFd is implemented by Bind objects that support having their -// file descriptor peeked at. +// file descriptor peeked at. Used by wireguard-android. type PeekLookAtSocketFd interface { PeekLookAtSocketFd4() (fd int, err error) PeekLookAtSocketFd6() (fd int, err error) |