add moved out ipv4 code.

(from previous broken commit)
compile fix