Add TCP stats capture function.