Using Logical Neighborhoods to Enable Scoping in Wireless Sensor Networks