Using metrics from multiple layers to detect attacks in wireless networks