  We construct, for any symplectic, unitary or special orthogonal group over a
locally compact nonarchimedean local field of odd residual characteristic, a
type for each Bernstein component of the category of smooth representations,
using Bushnell--Kutzko's theory of covers. Moreover, for a component
corresponding to a cuspidal representation of a maximal Levi subgroup, we prove
that the Hecke algebra is either abelian, or a generic Hecke algebra on an
infinite dihedral group, with parameters which are, at least in principle,
computable via results of Lusztig.
