This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ecos: tcp/ip stack implementation error


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]