A sinkhole resilient protocol for wireless sensor networks: Performance and security analysis