test2.c with working IP address display