TCP/IP Calculator in C