Change ID generation to be customisable by protocol modules.