Research Article
En-Route Message Authentication Scheme for Filtering False Data in WSNs
Algorithm 2
Processing of ALERT message.
| | /∗When hears an x-type ALERT message for reported by to .∗/ | | | if ( has heard the ALERT message) ignore this ALERT message; | | | else if ( is exactly ){ | | | if ( is not a neighbor of ) discard this ALERT message; | | | else { | | | switch (x){ | | | case 0: count_i0++; break; | | | case 1: count_i1++; break; | | | } | | | } | | | } | | | else if (it is a broadcast ALERT message) { | | | //The ALERT message needs to be forwarded. | | | if ( is a neighbor of && does not hear any node unicast this ALERT message to ) | | | unicasts this ALERT message to ; | | | } |
|