summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/transport
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2019-03-13 16:39:15 -0700
committerShentubot <shentubot@google.com>2019-03-13 16:40:10 -0700
commitf97c4f1b7af1d4049c8f54a71cd611e42be46dee (patch)
tree538b0522dfb3273ac9f0137c659769e7720c3bf0 /pkg/tcpip/transport
parent70d06134442843cd4355590c4155ee6594558c00 (diff)
Remove unused function.
PiperOrigin-RevId: 238336475 Change-Id: I8131e04699028246ebc233953ebb3feca5673940
Diffstat (limited to 'pkg/tcpip/transport')
-rw-r--r--pkg/tcpip/transport/udp/endpoint.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/pkg/tcpip/transport/udp/endpoint.go b/pkg/tcpip/transport/udp/endpoint.go
index cdde6a023..82d7f80a3 100644
--- a/pkg/tcpip/transport/udp/endpoint.go
+++ b/pkg/tcpip/transport/udp/endpoint.go
@@ -131,27 +131,6 @@ func newEndpoint(stack *stack.Stack, netProto tcpip.NetworkProtocolNumber, waite
}
}
-// NewConnectedEndpoint creates a new endpoint in the connected state using the
-// provided route.
-func NewConnectedEndpoint(stack *stack.Stack, r *stack.Route, id stack.TransportEndpointID, waiterQueue *waiter.Queue) (tcpip.Endpoint, *tcpip.Error) {
- ep := newEndpoint(stack, r.NetProto, waiterQueue)
-
- // Register new endpoint so that packets are routed to it.
- if err := stack.RegisterTransportEndpoint(r.NICID(), []tcpip.NetworkProtocolNumber{r.NetProto}, ProtocolNumber, id, ep, ep.reusePort); err != nil {
- ep.Close()
- return nil, err
- }
-
- ep.id = id
- ep.route = r.Clone()
- ep.dstPort = id.RemotePort
- ep.regNICID = r.NICID()
-
- ep.state = stateConnected
-
- return ep, nil
-}
-
// Close puts the endpoint in a closed state and frees all resources
// associated with it.
func (e *endpoint) Close() {