  Let $E/F$ be a quadratic extension of finite fields. By a result of Gow, an
irreducible representation $\pi$ of $G = {\rm GL}_n(E)$ has at most one
non-zero $H$-invariant vector, up to multiplication by scalars, when $H$ is
${\rm GL}_n(F)$ or ${\rm U}(n,E/F)$. If $\pi$ does have an $H$-invariant vector
it is said to be $H$-distinguished. It is known, from the work of Gow, that
$H$-distinction is characterized by base change from ${\rm U}(n,E/F)$, due to
Kawanaka, when $H$ is ${\rm GL}_n(F)$ (resp. from ${\rm GL}_n(F)$, due to
Shintani, when $H$ is ${\rm U}(n,E/F)$). Assuming $\pi$ is generic and
$H$-distinguished, we give an explicit description of the $H$-invariant vector
in terms of the Bessel function of $\pi$. Let $\psi$ be a non-degenerate
character of $N_G/N_H$ and let $B_{\pi,\psi}$ be the (normalized) Bessel
function of $\pi$ on the $\psi$-Whittaker model. For the $H$-average
\[W_{\pi,\psi} = \frac{1}{|H|} \sum_{h\in H} \pi(h) B_{\pi,\psi}\] of the
Bessel function, we prove that \[W_{\pi,\psi}(I_n) = \frac{{\rm dim}\rho}{{\rm
dim} \pi} \cdot \frac{|{\rm GL}_n(E)|}{|{\rm GL}_n(F)| |{\rm U}(n,E/F)|},\]
where $\rho$ is the representation of ${\rm U}(n,E/F)$ (resp. ${\rm GL}_n(F)$)
that base changes to $\pi$ when $H$ is ${\rm GL}_n(F)$ (resp. ${\rm
U}(n,E/F)$). As an application we classify the members of a generic $L$-packet
of ${\rm SL}_n(E)$ that admit invariant vectors for ${\rm SL}_n(F)$. Finally we
prove a $p$-adic analogue of our result for square-integrable representations
in terms of formal degrees by employing the formal degree conjecture of
Hiraga-Ichino-Ikeda \cite{hii08}.
