lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [lwip] tcp_output_segment() length problems


From: leon . woestenberg
Subject: [lwip-users] [lwip] tcp_output_segment() length problems
Date: Wed, 08 Jan 2003 22:01:57 -0000

Hello Adam,

using lwIP 0.5, along with a scaled down httpd.c, that merely says
"Hello, World" (at least, that's the goal for the moment).

I'm experiencing an error in where the "seg->p->tot_len" is corrupt upon
calling "inet_chksum_pseudo()" within "tcp_output_segment()".

I'm still backtracing where this variable becomes corrupt. I came across
this code.

Why are the "seg->p->len" and "seg->p->tot_len" saved and restored
over the "ip_output()" call? Did you experience corrupt lengths there?

tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)
{
  ...
  len = seg->p->len;
  tot_len = seg->p->tot_len;

  ip_output(seg->p, &(pcb->local_ip), &(pcb->dest_ip), TCP_TTL,
         IP_PROTO_TCP);

  seg->p->len = len;
  seg->p->tot_len = tot_len;
  ...
}


Regards,

Leon Woestenberg
=====================================================================================================

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]