lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7525] Implement TCP listen backlog


From: Simon Goldschmidt
Subject: [lwip-devel] [task #7525] Implement TCP listen backlog
Date: Sun, 16 Dec 2007 16:53:06 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

URL:
  <http://savannah.nongnu.org/task/?7525>

                 Summary: Implement TCP listen backlog
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Sonntag 16.12.2007 um 16:53
                Category: None
         Should Start On: Sonntag 16.12.2007 um 00:00
   Should be Finished on: Sonntag 16.12.2007 um 00:00
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
        Percent Complete: 0%
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
                  Effort: 0.00

    _______________________________________________________

Details:

For the socket listen backlog (which would also be good to integrate into the
netconn API) to work, we need

a) the maximum and current backlog per netconn (2 to 8 bytes per netconn)
and
b) a way to send a RST to a new client instead of SYN+ACK if the backlog
limit is reached.

It turns out that b) can not be done with the current TCP code: I previously
thought this could be done by returning an error in the accept callback, but
at this point, the new connection is already established. Instead, it is
necessary to abort the setup of a new connection when the listening connection
receives the SYN: in tcp_listen_input before tcp_alloc even creates a new
pcb.

For that, I have included an 'accept_allowed' callback in tcp_listen_pcb (+
argument, which makes 8 bytes per listen pcb) in the attached patch (note that
this patch makes use of the SYS_ARCH_GET... macros used for bug #21698).



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sonntag 16.12.2007 um 16:53  Name: lwip_backlog.patch  Size: 9kB   By:
goldsimon

<http://savannah.nongnu.org/task/download.php?file_id=14637>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?7525>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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