Location Privacy in Ad Hoc and Sensor Networks