buglwIP - A Lightweight TCP/IP stack - Bugs: bug #52190, Allow LWIP_SOCKET_OFFSET with an...

 
 

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

bug #52190: Allow LWIP_SOCKET_OFFSET with an external FD_SET

Submitted by:  Douglas <ourairquality>
Submitted on:  Sun 08 Oct 2017 04:07:08 AM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Feature RequestStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Mon 16 Oct 2017 03:07:46 PM UTC, comment #3:

Pushed, thanks for the patch.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Fri 13 Oct 2017 10:46:39 AM UTC, comment #2:

Thank you, yes I would like to just get it working, with lwip using a subset of the FD_SET range.

The only issue that I can spot relates to the semantics of the end of the set. See lwip_select() tests the maxfdp1 against the (FD_SETSIZE + LWIP_SOCKET_OFFSET).

It would appear that if this were changed when not using the lwip FD_SET to compare to simply the FD_SETSIZE then it would work. Lwip would then use a sub range of the FD_SET from LWIP_SOCKET_OFFSET to (LWIP_SOCKET_OFFSET + NUM_SOCKETS - 1), rather than from zero to the (NUM_SOCKETS - 1).

A revised patch has been attached to consider.

(file #42137)

Douglas <ourairquality>
Fri 13 Oct 2017 09:45:15 AM UTC, comment #1:

Instead of failing with external FD_SET, can't we just make it work? The FD_SET needs to be bigger, of course, but that's not our problem ;-)

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sun 08 Oct 2017 04:07:08 AM UTC, original submission:

An error is currently generated compiling with LWIP_SOCKET_OFFSET set and using an external FD_SET. Looking over the socket.c code suggested only one possible problem, see patch. Most uses of an fd_set appear to respect the LWIP_SOCKET_OFFSET. Would anyone happen to know the issue here?

When using lwip with newlib which defines FD_SET it would really help to be able to define LWIP_SOCKET_OFFSET so that the socket descriptors can play well with other driver descriptors, so that read write and close can dispatch off the descriptor to various drivers and to lwip. So if the problems are not to great I would like to try to get this working.

Douglas <ourairquality>

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 16 Oct 2017 03:07:46 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Fri 13 Oct 2017 10:46:39 AM UTCourairqualityAttached File-=>Added 0001-Allow-LWIP_SOCKET_OFFSET-with-an-external-FD_SET.patch, #42137
    Sun 08 Oct 2017 04:07:08 AM UTCourairqualityAttached File-=>Added 0001-Allow-LWIP_SOCKET_OFFSET-with-an-external-FD_SET.patch, #42085

    Back to the top


    Powered by Savane 3.1-cleanup1