tcp module refactorization

Change-Id: I9238260f8263433b0c751ebfb81b824488bdbf41