  Let $F/F_0$ be a quadratic extension of non-Archimedean locally compact
fields of residual characteristic $p\neq2$, and let $\sigma$ denote its
non-trivial automorphism. Let $R$ be an algebraically closed field of
characteristic different from $p$. To any cuspidal representation $\pi$ of
${\rm GL}_n(F)$, with coefficients in $R$, such that
$\pi^{\sigma}\simeq\pi^{\vee}$ (such a representation is said to be
$\sigma$-selfdual) we associate a quadratic extension $D/D_0$, where $D$ is a
tamely ramified extension of $F$ and $D_0$ is a tamely ramified extension of
$F_0$, together with a quadratic character of $D_0^{\times}$. When $\pi$ is
supercuspidal, we give a necessary and sufficient condition, in terms of these
data, for $\pi$ to be ${\rm GL}_n(F_0)$-distinguished. When the characteristic
$\ell$ of $R$ is not $2$, denoting by $\omega$ the non-trivial $R$-character of
$F_0^{\times}$ trivial on $F/F_0$-norms, we prove that any $\sigma$-selfdual
supercuspidal $R$-representation is either distinguished or
$\omega$-distinguished, but not both. In the modular case, that is when
$\ell>0$, we give examples of $\sigma$-selfdual cuspidal non-supercuspidal
representations which are not distinguished nor $\omega$-distinguished. In the
particular case where $R$ is the field of complex numbers, in which case all
cuspidal representations are supercuspidal, this gives a complete distinction
criterion for arbitrary complex cuspidal representations, as well as a purely
local proof, for cuspidal representations, of the dichotomy and disjunction
theorem due to Kable and Anandavardhanan-Kable-Tandon.
