Managing Security Policies in Intrusion Detection and Prevention Devices