A characterization of the set of lines either external to or secant to an ovoid in PG(3,q)