read ip headers and tcp headers