tasklwIP - A Lightweight TCP/IP stack - Tasks: task #6998, Implement IPPROTO_UDPLITE for...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #6998: Implement IPPROTO_UDPLITE for Socket layer

Submitter:  Frédéric Bernon <fbernon>
Submitted:  Mon 11 Jun 2007 08:54:46 AM UTC
   
 
Category:  None Should Start On:  Sun 10 Jun 2007 10:00:00 PM UTC
Should be Finished on:  Sun 10 Jun 2007 10:00:00 PM UTC Priority:  1 - Later
Status:  Done Privacy:  Public
Assigned to:  goldsimon Percent Complete:  100%
Open/Closed:  Closed Planned Release:  None
Effort:  0.00

Jump to the original submission

Thu 23 Aug 2007 06:21:33 AM UTC, comment #15: 

OK, opened task #7236 ("Check UDP LITE standard conformance") for that.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 22 Aug 2007 08:24:07 PM UTC, comment #14: 

Is it's right, I think it's in all layers, perhaps a bug report should be better, but since last changes were about this task, it was to get the last background. But if you prefer, reclose it, and we will open a bug item, no problem for me.

Frédéric Bernon <fbernon>
Group Member
Wed 22 Aug 2007 08:09:42 PM UTC, comment #13: 

Frédéric, you reopened this if I'm right? But your problem seems to be more generic, not exactly linked to the socket API, isn't it?

Simon Goldschmidt <goldsimon>
Group administrator
Wed 25 Jul 2007 07:49:27 PM UTC, comment #12: 

I attach a capture file (note that I only set IPPROTO_UDPLITE in "proto", and I don't have set any setsockopt, since, I suppose, default values should be good). Packet #259 is interesting for its error.

A link of wireshark about that :

http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol


(file #13469)

Frédéric Bernon <fbernon>
Group Member
Wed 25 Jul 2007 06:51:34 PM UTC, comment #11: 

I would like to do some tests of this features. The first problem I see is that wireshark detect all UDP-Lite packets with a "wrong" checksum. Of course, Wireshark isn't perfect (and sometimes seems detect error checksums on TCP packets). But, since I don't have any other reference, I have a "doubt" about this first point. Does anyone do some tests on UDP-Lite?

Next point, I would like to test UDP-Lite with a service receiving packets on a Windows XP Pro. But I'm not sure that this OS is able to process such packets. It seems to only be possible with the IPv6 stack, and/or on Windows 2003 Server. Anyone can confirm (or not) this information ?

Frédéric Bernon <fbernon>
Group Member
Sun 17 Jun 2007 07:20:00 PM UTC, comment #10: 


>It seems that SO_NO_CHECK is not supported by getsockopt. Normal?


Oh, someone would like to get the current status, that's correct, I've just added it ;-)

Thanks for looking into this.

About comment #8: I've made it '!= 0' since the flag should not be set for this option.

Simon Goldschmidt <goldsimon>
Group administrator
Sun 17 Jun 2007 06:18:54 PM UTC, comment #9: 

It seems that SO_NO_CHECK is not supported by getsockopt. Normal?

About comment #7, I will do some tests next week...

Frédéric Bernon <fbernon>
Group Member
Sun 17 Jun 2007 03:53:56 PM UTC, comment #8: 

I think that ...

if ((sock->conn->type != NETCONN_UDP) || ((sock->conn->pcb.udp->flags & UDP_FLAGS_UDPLITE) == 1))

should be ...

if ((sock->conn->type != NETCONN_UDP) || ((sock->conn->pcb.udp->flags & UDP_FLAGS_UDPLITE) != UDP_FLAGS_UDPLITE))

/* this flag is only available for UDP, not for UDP lite */

Frédéric Bernon <fbernon>
Group Member
Sun 17 Jun 2007 11:46:50 AM UTC, comment #7: 

Implemented SO_NO_CHECK also.

Since I don't think there will be someone testing this in the near future and it was a pretty small change, I'm closing this as done.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 12 Jun 2007 07:34:53 AM UTC, comment #6: 


>But for what should I need ip.c


For none, I also do a mistake... ;)

Frédéric Bernon <fbernon>
Group Member
Tue 12 Jun 2007 07:03:44 AM UTC, comment #5: 

Thanks for pointing that out. There you see what copy & paste can do for you...

Checked it in.

But for what should I need ip.c?

Simon Goldschmidt <goldsimon>
Group administrator
Mon 11 Jun 2007 08:02:29 PM UTC, comment #4: 

Perhaps I miss something, but where do you use chksum_len_rx? Don't you have forgot to check ip.c ?

Frédéric Bernon <fbernon>
Group Member
Mon 11 Jun 2007 07:55:32 PM UTC, comment #3: 

setsockopt(SO_NO_CHECK) could call directly :

udp_setflags(sock->conn->pcb.udp, udp_flags(sock->conn->pcb.udp) | UDP_FLAGS_NOCHKSUM);

and getsockopt(SO_NO_CHECK)

udp_flags(sock->conn->pcb.udp) & UDP_FLAGS_NOCHKSUM


Frédéric Bernon <fbernon>
Group Member
Mon 11 Jun 2007 07:31:22 PM UTC, comment #2: 

I checked in the change to lwip_socket() and get/setsockopt(). Hope it works as I didn't yet have the time to test it properly.

SO_NO_CHECK also sounds interesting, although I wouldn't use a NETCONN_UDPNOCHKSUM connection for it but set it at 'runtime' using setsockopt. -> I'll do that some day...

Simon Goldschmidt <goldsimon>
Group administrator
Mon 11 Jun 2007 09:04:09 AM UTC, comment #1: 


>We'd also need the set/getsockopts for setting the checksum length on send (maybe also receive, see the rfc for udp lite).


Even if it's not a full implementation, it's the same as current netconn layer...

There is also a SO_NO_CHECK to disable any checksum (I suppose this is the same as our UDP_FLAGS_NOCHKSUM, used by NETCONN_UDPNOCHKSUM connections.


Frédéric Bernon <fbernon>
Group Member
Mon 11 Jun 2007 08:54:46 AM UTC, original submission:  

It seems that some sockets API support UDP-Lite.

http://kernel.org/pub/linux/kernel/people/landley/kdocs/Documentation/networking/udplite.txt.
http://www.erg.abdn.ac.uk/users/william/tools/UDPLite-patch.pdf.

I don't know what Linux currently support, but I propose to support IPPROTO_UDPLITE in "proto" parameter for socket call:

s = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDPLITE);

To support that, the only thing to do is to change in lwip_socket

case SOCK_DGRAM:
  conn = netconn_new_with_callback(NETCONN_UDP, event_callback);

By...

case SOCK_DGRAM:
  conn = netconn_new_with_callback(((protocol==IPPROTO_UDPLITE)?NETCONN_UDPLITE:NETCONN_UDP), event_callback);

Or by a switch if you prefer...

I will submit if no objects...

Frédéric Bernon <fbernon>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #13469:  udplite.acp added by fbernon (357KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by fbernon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-08-23 goldsimon Open/ClosedOpen Closed
    2007-07-25 fbernon Attached File- Added udplite.acp, #13469
        Open/ClosedClosed Open
    2007-06-17 goldsimon Percent Complete80% 100%
        Open/ClosedOpen Closed
    2007-06-17 goldsimon StatusReady For Test Done
    2007-06-11 goldsimon StatusNone Ready For Test
        Percent Complete0% 80%
        Assigned tofbernon goldsimon

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code