Discussion:
AW: [lwip-users] What is the different between IP_PROTO_UPPLITE a nd IP_PROTO_UDP(regular)????
Zschocke, Florian
2003-07-04 14:23:08 UTC
Permalink
I am a little confused as I don't understand the motivation
behind two version of UDP IP Protocol: IP_PROTO_UDP &
IP_PROTO_UDPLITE.
UDP packets of the type IP_PROTO_UDP have a checksum calculated over the
complete UDP packet, i.e. the UDP header plus the payload. UDP packets of
the type IP_PROTO_UDPLITE have a checksum calculated ONLY over the UDP
header but not over the payload of the UDP packet.
Also, how does the receiver side know which version shall adopt
when a UPD packet arrive (According to RFC792, the transmission
protocol does not have version field)???
UDPLITE is a different protocol type than UDP is. In the IPv4 header the
"protocol" field will have different values for UDP and UDPLITE: UDP is
protocol 17, UDPLITE is 170, just like the IP_PROTO_UDP(LITE) defines. For
both a checksum of 0 means no checksum at all.
On top of that, the IP_PROTO_UDP has a flag with NO_CHECK_SUM
but the codes still perform checksum???
Where, udp_send() in udp.c? No, a checksum is not calculated if
UDP_FLAGS_NOCHKSUM is set in the PCB.

Florian.
Kelly Chan
2003-07-04 15:13:39 UTC
Permalink
Hi Florian,

Very good explanation. BTW, your works on porting Lwip to win32 really speed
up our project activities as we can easily use it as our unit testing
environment............

Thanks!

Kelly

-----Original Message-----
From: lwip-users-bounces+kttchan=***@nongnu.org
[mailto:lwip-users-bounces+kttchan=***@nongnu.org]On
Behalf Of Zschocke, Florian
Sent: Friday, July 04, 2003 8:23 AM
To: 'Mailing list for lwIP users'
Subject: AW: [lwip-users] What is the different between IP_PROTO_UPPLITE
and IP_PROTO_UDP(regular)????
I am a little confused as I don't understand the motivation
behind two version of UDP IP Protocol: IP_PROTO_UDP &
IP_PROTO_UDPLITE.
UDP packets of the type IP_PROTO_UDP have a checksum calculated over the
complete UDP packet, i.e. the UDP header plus the payload. UDP packets of
the type IP_PROTO_UDPLITE have a checksum calculated ONLY over the UDP
header but not over the payload of the UDP packet.
Also, how does the receiver side know which version shall adopt
when a UPD packet arrive (According to RFC792, the transmission
protocol does not have version field)???
UDPLITE is a different protocol type than UDP is. In the IPv4 header the
"protocol" field will have different values for UDP and UDPLITE: UDP is
protocol 17, UDPLITE is 170, just like the IP_PROTO_UDP(LITE) defines. For
both a checksum of 0 means no checksum at all.
On top of that, the IP_PROTO_UDP has a flag with NO_CHECK_SUM
but the codes still perform checksum???
Where, udp_send() in udp.c? No, a checksum is not calculated if
UDP_FLAGS_NOCHKSUM is set in the PCB.

Florian.
Zschocke, Florian
2003-07-04 15:19:51 UTC
Permalink
Post by Kelly Chan
Very good explanation. BTW, your works on porting Lwip to win32
really speed up our project activities as we can easily use it
as our unit testing environment............
Thanks, but that was Florian Schulze, not me. :)

Florian Zschocke
Kelly Chan
2003-07-05 18:04:20 UTC
Permalink
Since Lwip supports IP_PROTO_UDPLITE, shall we include "IP_PROTO_UDPLITE" in
our ip codes such as:

instead of
switch(IPH_PROTO(iphdr))
{
case IP_PROTO_UDP:
udp_input(p, inp);
break;
.......

the codes shall look like this.
switch(IPH_PROTO(iphdr))
{
case IP_PROTO_UDP:
case IP_PROTO_UDPLITE:
udp_input(p, inp);
break;
.......

Or there're reason behind we actually don't support IP_PROTO_UDPLITE. (I
doubt it as the upd_input did process IP_PROTO_UDPLITE message.......

cheers

Kelly
Kelly Chan
2003-07-07 14:52:23 UTC
Permalink
Florian, can you comment on this?
Post by Kelly Chan
Since Lwip supports IP_PROTO_UDPLITE, shall we include "IP_PROTO_UDPLITE"
instead of
switch(IPH_PROTO(iphdr))
{
udp_input(p, inp);
break;
.......
the codes shall look like this.
switch(IPH_PROTO(iphdr))
{
udp_input(p, inp);
break;
.......
Or there're reason behind we actually don't support IP_PROTO_UDPLITE. (I
doubt it as the upd_input did process IP_PROTO_UDPLITE message.......
cheers
Kelly
<< File: ATT1438953.txt >>
Leon Woestenberg
2003-07-07 21:04:32 UTC
Permalink
[lwip-users] Bug in ip.c?????Hello Kelly,

from your email, your fix seems right. To make sure it gets in into the CVS, it is better
to report bugs in Savannah.

This way it recorded as a TODO item for the CVS developers. The mailings on the list
tend to be a volatile medium; if its older than a week, it is often forgotten.

Thanks!

Leon.
----- Original Message -----
From: Kelly Chan
To: 'Mailing list for lwIP users'
Sent: Monday, July 07, 2003 4:52 PM
Subject: [lwip-users] Bug in ip.c?????


Florian, can you comment on this?




Since Lwip supports IP_PROTO_UDPLITE, shall we include "IP_PROTO_UDPLITE" in our ip codes such as:

instead of
switch(IPH_PROTO(iphdr))
{
case IP_PROTO_UDP:
udp_input(p, inp);
break;
.......

the codes shall look like this.
switch(IPH_PROTO(iphdr))
{
case IP_PROTO_UDP:
case IP_PROTO_UDPLITE:
udp_input(p, inp);
break;
.......

Or there're reason behind we actually don't support IP_PROTO_UDPLITE. (I doubt it as the upd_input did process IP_PROTO_UDPLITE message.......

cheers

Kelly

<< File: ATT1438953.txt >>



------------------------------------------------------------------------------


_______________________________________________
lwip-users mailing list
lwip-***@nongnu.org
http://mail.nongnu.org/mailman/listinfo/lwip-users



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003

Loading...