A Logical Controller Architecture for Network Security