diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-10-10 01:00:05 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-10-10 01:00:05 +0000 |
commit | 839cdd4205fdf468f4c5ad8185719affb114ecc9 (patch) | |
tree | 3ef823782303b0c0bfc6989812976bb074df9e50 /pkg/tcpip/stack/stack.go | |
parent | 632c87f57b6b029f40a3cde469c750b4dee3ea39 (diff) | |
parent | bf870c1a423063eb86a62c6268fe5d83fb6b87ba (diff) |
Merge release-20190806.1-256-gbf870c1 (automated)
Diffstat (limited to 'pkg/tcpip/stack/stack.go')
-rw-r--r-- | pkg/tcpip/stack/stack.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/stack.go b/pkg/tcpip/stack/stack.go index ff574a055..7d73389cc 100644 --- a/pkg/tcpip/stack/stack.go +++ b/pkg/tcpip/stack/stack.go @@ -424,6 +424,34 @@ type Options struct { UnassociatedFactory UnassociatedEndpointFactory } +// TransportEndpointInfo holds useful information about a transport endpoint +// which can be queried by monitoring tools. +// +// +stateify savable +type TransportEndpointInfo struct { + // The following fields are initialized at creation time and are + // immutable. + + NetProto tcpip.NetworkProtocolNumber + TransProto tcpip.TransportProtocolNumber + + // The following fields are protected by endpoint mu. + + ID TransportEndpointID + // BindNICID and bindAddr are set via calls to Bind(). They are used to + // reject attempts to send data or connect via a different NIC or + // address + BindNICID tcpip.NICID + BindAddr tcpip.Address + // RegisterNICID is the default NICID registered as a side-effect of + // connect or datagram write. + RegisterNICID tcpip.NICID +} + +// IsEndpointInfo is an empty method to implement the tcpip.EndpointInfo +// marker interface. +func (*TransportEndpointInfo) IsEndpointInfo() {} + // New allocates a new networking stack with only the requested networking and // transport protocols configured with default options. // |