Layer-Based Attacks in the Ternary Planes of Software-Defined Networking