They sell devices over here to mount under the hood that make a high pitched noise that should scare marters. I don't know if that works for rats, squirrels or other critters. And your dog might not like it.
T.E.G. M208 Marterverjager
Bescherm uw auto tegen schade van marters met de T.E.G. M208 Marterverjager. Deze kleine module past in de motorruimte en zend constant ultrasone geluiden uit.
www.allestegenongedierte.nl