TCP and IP (RIP) implementation in C