summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/tcpip.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-07-24 23:12:03 +0000
committergVisor bot <gvisor-bot@google.com>2019-07-24 23:12:03 +0000
commitd5cc44be8cb0acd37a79b06b30fb080d492891ba (patch)
treeb6f4a08f808504ce1044f3e2b04bd387b145ef6a /pkg/tcpip/tcpip.go
parentb218bb73ffeba4adaabfb0bdc73c6987ec7fdc76 (diff)
parent2ed832ff86ee29970d0a3991297de818bda67b9c (diff)
Merge 2ed832ff (automated)
Diffstat (limited to 'pkg/tcpip/tcpip.go')
-rw-r--r--pkg/tcpip/tcpip.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go
index c5d79da5e..4208c0303 100644
--- a/pkg/tcpip/tcpip.go
+++ b/pkg/tcpip/tcpip.go
@@ -1059,14 +1059,23 @@ func ParseMACAddress(s string) (LinkAddress, error) {
return LinkAddress(addr), nil
}
+// AddressWithPrefix is an address with its subnet prefix length.
+type AddressWithPrefix struct {
+ // Address is a network address.
+ Address Address
+
+ // PrefixLen is the subnet prefix length.
+ PrefixLen int
+}
+
// ProtocolAddress is an address and the network protocol it is associated
// with.
type ProtocolAddress struct {
// Protocol is the protocol of the address.
Protocol NetworkProtocolNumber
- // Address is a network address.
- Address Address
+ // AddressWithPrefix is a network address with its subnet prefix length.
+ AddressWithPrefix AddressWithPrefix
}
// danglingEndpointsMu protects access to danglingEndpoints.