lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #9208] raw: core API extensions


From: David van Moolenbroek
Subject: [lwip-devel] [patch #9208] raw: core API extensions
Date: Thu, 5 Jan 2017 18:59:16 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0

URL:
  <http://savannah.nongnu.org/patch/?9208>

                 Summary: raw: core API extensions
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: dcvmoole
            Submitted on: Thu 05 Jan 2017 06:59:15 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

While I am a fairly heavy user of the raw core API [*] due to application
requirements, it seems to me that many people aren't, and that the RAW
implementation has fallen a bit behind the UDP implementation as a result.
This is a proposal for some improvements. The first two bring the RAW
implementation closer to the UDP implementation; the third one is exclusive to
RAW PCBs.

0001-raw-extend-support-for-connected-sockets: This patch adds proper support
for "connected" RAW PCBs, in that 1) packets with different source addresses
are now filtered, like UDP PCBs and as is standard; 2) one can tell from a new
flag whether the socket is connected (eg for getpeername), again like UDP
PCBs; and, 3) there is now actually a raw_disconnect() function, and not just
dead references to it in documentation :)

0002-raw-split-off-raw_sendto_if_src-from-raw_sendto: the UDP core API has a
whole range of sendto alternatives. This patch adds one of those, which may be
used to implement for example IPV6_PKTINFO. As I found out the hard way, an
approach of temporary raw_bind()s is no usable substitute for that.

0003-raw-core-support-for-IP_HDRINCL-socket-option: The IP_HDRINCL socket
option, to indicate that sent raw packets already include an IP(v4) header, is
important for at least traditional implementations of utilities like
traceroute. So far I had to support these utilities by keeping a shadow flag
and bypassing raw sockets altogether, which is obviously not great. I was
going to propose a raw_sendto_hdrincl() until I noticed how little code it
takes to add full-blown support for this option, using an additional RAW PCB
flag. Note that in its current form, this patch depends on the other two.

As always, I'd be happy to make modifications if that helps.

[*] I, for one, would like to see a rename from "raw API" to "core API"
altogether. To be sure: in this post, "raw" refers to raw sockets/pcbs, not
the lower-level lwIP (core) API.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 05 Jan 2017 06:59:15 PM GMT  Name:
0001-raw-extend-support-for-connected-sockets.patch  Size: 4kB   By: dcvmoole

<http://savannah.nongnu.org/patch/download.php?file_id=39371>
-------------------------------------------------------
Date: Thu 05 Jan 2017 06:59:15 PM GMT  Name:
0003-raw-core-support-for-IP_HDRINCL-socket-option.patch  Size: 6kB   By:
dcvmoole

<http://savannah.nongnu.org/patch/download.php?file_id=39372>
-------------------------------------------------------
Date: Thu 05 Jan 2017 06:59:15 PM GMT  Name:
0002-raw-split-off-raw_sendto_if_src-from-raw_sendto.patch  Size: 6kB   By:
dcvmoole

<http://savannah.nongnu.org/patch/download.php?file_id=39373>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9208>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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