This commit is contained in:
bluepython508 committed 2026-10-22 12:27:19 +01:00
1 parent 3530afb854
commit 6903fcff27
2146 files changed
+112256 -190703

No files matched your search

+14 -3
View File
@@ -1,4 +1,4 @@
// Copyright (c) Tailscale Inc & AUTHORS
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
//
// Original implementation (from same author) from which this was derived was:
@@ -52,8 +52,19 @@ func (t Tuple) DstAddr() netip.Addr {
return netip.AddrFrom16(t.dst).Unmap()
}
func (t Tuple) SrcPort() uint16 { return t.srcPort }
func (t Tuple) DstPort() uint16 { return t.dstPort }
func (t Tuple) SrcPort() uint16 { return t.srcPort }
func (t Tuple) DstPort() uint16 { return t.dstPort }
func (t Tuple) Proto() ipproto.Proto { return t.proto }
// Src returns the tuple's source endpoint as a netip.AddrPort.
func (t Tuple) Src() netip.AddrPort {
return netip.AddrPortFrom(t.SrcAddr(), t.srcPort)
}
// Dst returns the tuple's destination endpoint as a netip.AddrPort.
func (t Tuple) Dst() netip.AddrPort {
return netip.AddrPortFrom(t.DstAddr(), t.dstPort)
}
func (t Tuple) String() string {
return fmt.Sprintf("(%v %v => %v)", t.proto,