A connection theoretic approach to sub-Riemannian geometry