code: func (d *transportDemuxer) registerEndpoint(netProtos []tcpip.NetworkProtocolNumber, protocol tcpip.TransportProtocolNumber, id TransportEndpointID, ep TransportEndpoint, reusePort bool) *tcpip.Error {
  	for i, n := range netProtos {
  		if err := d.singleRegisterEndpoint(n, protocol, id, ep, reusePort); err != nil {
  			d.unregisterEndpoint(netProtos[:i], protocol, id, ep)
  			return err
  		}
  	}
  
  	return nil
  }
docs: // registerEndpoint registers the given endpoint with the dispatcher such that
  // packets that match the endpoint ID are delivered to it.