A Security-aware Software-defined IoT Network Architecture