sd-dhcp: split out packet handling from client