Split a large function in modules/pico_ipv4.c