nlsocket: encoding/decoding policy management routines