Programmable In-Network Security for Context-aware BYOD Policies