tcpip: fix comp wo getaddrinfo; refactor tcp_state init