code: func (s *Stack) GetMainNICAddress(id tcpip.NICID, protocol tcpip.NetworkProtocolNumber) (tcpip.Address, tcpip.Subnet, *tcpip.Error) {
  	s.mu.RLock()
  	defer s.mu.RUnlock()
  
  	if nic, ok := s.nics[id]; ok {
  		return nic.getMainNICAddress(protocol)
  	}
  
  	return "", tcpip.Subnet{}, tcpip.ErrUnknownNICID
  }
docs: // GetMainNICAddress returns the first primary address (and the subnet that
  // contains it) for the given NIC and protocol. Returns an arbitrary endpoint's
  // address if no primary addresses exist. Returns an error if the NIC doesn't
  // exist or has no endpoints.