An Adaptive Approach to Detecting Black and Gray Hole Attacks in Ad Hoc Network | IEEE Conference Publication | IEEE Xplore