This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
ecos: tcp/ip stack implementation error
- From: 张 亮 <johnsonest at hotmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Cc: gary at chez-thomas dot org
- Date: Wed, 19 Feb 2003 15:32:54 +0800
- Subject: [ECOS] ecos: tcp/ip stack implementation error
- Bcc:
Hi,
i am willing to show a implementation error in ecos tcp/ip stack:
as for tcp urgent pointer,when urp >65496(not 65535),urp should be
65535.because 65536-20(iphdr)-20(tcphdr)=65496.
following is ecos code:
u_int32_t urp = tp->snd_up - tp->snd_nxt;
if (urp > IP_MAXPACKET)//65535
urp = IP_MAXPACKET;
it should like this:
if(urp > IP_MAXPACKET-sizeof(struct tcpip))
urp = IP_MAXPACKET;
BRS/johnsonest
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss