[PATCH v3 22/25] conf: Move port parsing functions to own file, ports.c