Cleaned up udp.c and return values of set_up_socket()