Add ip_recv function.

Fix a bug in ip_send. Make example executable much more fun.