The generation for reporting the policies uses the same code add a common function to reduce duplication. Signed-off-by: Florian Eckert <fe@dev.tdt.de>