code: func (s *Stack) RegisterTransportEndpoint(nicID tcpip.NICID, netProtos []tcpip.NetworkProtocolNumber, protocol tcpip.TransportProtocolNumber, id TransportEndpointID, ep TransportEndpoint, reusePort bool) *tcpip.Error {
  	if nicID == 0 {
  		return s.demux.registerEndpoint(netProtos, protocol, id, ep, reusePort)
  	}
  
  	s.mu.RLock()
  	defer s.mu.RUnlock()
  
  	nic := s.nics[nicID]
  	if nic == nil {
  		return tcpip.ErrUnknownNICID
  	}
  
  	return nic.demux.registerEndpoint(netProtos, protocol, id, ep, reusePort)
  }
docs: // RegisterTransportEndpoint registers the given endpoint with the stack
  // transport dispatcher. Received packets that match the provided id will be
  // delivered to the given endpoint; specifying a nic is optional, but
  // nic-specific IDs have precedence over global ones.