Remove MIN_IP_HEADER relicts. Change write/read to sendto/recvfrom.