From f97c4f1b7af1d4049c8f54a71cd611e42be46dee Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Wed, 13 Mar 2019 16:39:15 -0700 Subject: Remove unused function. PiperOrigin-RevId: 238336475 Change-Id: I8131e04699028246ebc233953ebb3feca5673940 --- pkg/tcpip/transport/udp/endpoint.go | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'pkg/tcpip') 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() { -- cgit v1.2.3