lwIP - A Lightweight TCP/IP stack - Tasks: task #14247, socket API: implement recvmsg...
You are not allowed to post comments on this tracker with your current authentication level.
task #14247: socket API: implement recvmsg msg_control support
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Wed 23 Nov 2016 12:01:25 PM UTC | ||
Category: | None | Should Start On: | Wed 23 Nov 2016 12:00:00 AM UTC |
Should be Finished on: | Wed 23 Nov 2016 12:00:00 AM UTC | Priority: | 5 - Normal |
Status: | None | Privacy: | Public |
Percent Complete: | 90% | Assigned to: | None |
Open/Closed: | Open | Planned Release: | None |
Effort: | 0.00 |
( Jump to the original submission )
Mon 02 Apr 2018 02:08:04 PM UTC, comment #37: |
Joel Cunningham <jcunningham>![]() |
Sat 31 Mar 2018 08:02:06 PM UTC, comment #36: Sorry if I'm being dense...so, this one?
|
Michael Zimmers <mzimmers> |
Sat 31 Mar 2018 03:55:53 PM UTC, comment #35: Michael,
|
Joel Cunningham <jcunningham>![]() |
Sat 31 Mar 2018 03:01:12 PM UTC, comment #34: Hi Joel -
|
Michael Zimmers <mzimmers> |
Sat 31 Mar 2018 02:39:05 PM UTC, comment #33: Michael,
|
Joel Cunningham <jcunningham>![]() |
Sat 31 Mar 2018 01:58:14 PM UTC, comment #32: Hi Joel - I'm sorry I wasn't more specific. I happen to need an implementation of recvmsg() for a project I'm working on using an ESP32. I am specifically interested in the IP_PKTINFO feature, though I can do without an IPv6 implementation.
|
Michael Zimmers <mzimmers> |
Sat 31 Mar 2018 04:35:40 AM UTC, comment #31: Michael,
|
Joel Cunningham <jcunningham>![]() |
Fri 30 Mar 2018 08:49:28 PM UTC, comment #30: May I ask the status of this change? |
Michael Zimmers <mzimmers> |
Thu 27 Jul 2017 06:57:26 PM UTC, comment #29: No, it's fine like that. I'll just remove the "in progress" marker then. I'm trying to get a hold on what's missing for 2.1.0 and reading your post, it doesn't make sense to wait for this task to be finished. |
Simon Goldschmidt <goldsimon>![]() |
Wed 26 Jul 2017 09:34:02 PM UTC, comment #28: No update. I'd still like to get the IPv6 version of IP_PKTINFO implemented, but haven't found time to get it done. We can move that to a new issue if you'd like to close this one out. recvmsg with control messages and IP_PKTINFO is ready to be used |
Joel Cunningham <jcunningham>![]() |
Wed 26 Jul 2017 07:41:01 PM UTC, comment #27: This is marked as "in progress", any update here or should we remove the marker? |
Simon Goldschmidt <goldsimon>![]() |
Wed 26 Apr 2017 01:46:37 PM UTC, comment #26: Simon,
|
Joel Cunningham <jcunningham>![]() |
Wed 26 Apr 2017 06:45:06 AM UTC, comment #25: I've pushed a change adding a cast via void pointer (which is what Linux does :) |
Simon Goldschmidt <goldsimon>![]() |
Wed 26 Apr 2017 06:19:03 AM UTC, comment #24: Whatever the problem with ALIGN_H and ALIGN_D is, the compiler error would not be fixed by changing that. The compiler just sees
|
Simon Goldschmidt <goldsimon>![]() |
Tue 25 Apr 2017 07:10:07 PM UTC, comment #23: Travis CI for clang is showing the follow error:
|
Joel Cunningham <jcunningham>![]() |
Tue 25 Apr 2017 02:49:02 PM UTC, comment #22: Patch committed in 2f117add7a8af07e483e1ee18af559f3e4e0d389. Updating progress to 90%. Remaining 10% is for IPv6 version of IP_PKTINFO (hopefully I can provide a patch later in the week) |
Joel Cunningham <jcunningham>![]() |
Tue 25 Apr 2017 02:05:41 PM UTC, comment #21:
|
Simon Goldschmidt <goldsimon>![]() |
Tue 25 Apr 2017 02:01:51 PM UTC, comment #20: We could move the msg_control code out of lwip_recvfrom_udp_raw() if we change the function so it can output the netbuf (which would then be processed in lwip_recvmsg). It seemed minor to me since it was only a single check of: if (msg->msg_contrllen).
|
Joel Cunningham <jcunningham>![]() |
Tue 25 Apr 2017 08:20:27 AM UTC, comment #19: That looks much better. Although I'm still not convinced we need the msg_control code when calling lwip_recvfrom, but let's optimize that later... |
Simon Goldschmidt <goldsimon>![]() |
Tue 25 Apr 2017 04:45:41 AM UTC, comment #18: New patch moves the flag to the netconn layer. The netconn layer flag + using the flag for the existing LWIP_NETBUF_RECVINFO feature resulted in a much cleaner implementation, thanks for the suggestion :)
|
Joel Cunningham <jcunningham>![]() |
Wed 19 Apr 2017 08:06:36 PM UTC, comment #17: Ahh, now I see what you meant about ' enable NETCONN_FLAG_PKTINFO for netconns (add a function/define for that!)' that way we could maintain the existing LWIP_NETBUF_RECVINFO behavior.
|
Joel Cunningham <jcunningham>![]() |
Wed 19 Apr 2017 07:46:46 PM UTC, comment #16: Sorry for not being clear enough :-)
|
Simon Goldschmidt <goldsimon>![]() |
Wed 19 Apr 2017 07:40:20 PM UTC, comment #15: Thanks for the suggestion, I had also thought of doing a socket/netconn level flag, let me make sure I understand all the suggestions
|
Joel Cunningham <jcunningham>![]() |
Wed 19 Apr 2017 07:13:55 PM UTC, comment #14: The SOF_PKTINFO flag is better off in struct netconn anyway. It is not used in core code at all.
|
Simon Goldschmidt <goldsimon>![]() |
Wed 19 Apr 2017 07:01:00 PM UTC, comment #13: > thing that looks strange is accessing the netconn's pcb without locking. Even if it's only a read access, chances are that the pcb already got deallocated. If not now, this might happen in the future. Isn't it enough to check the flag in the netbuf in this case?
|
Joel Cunningham <jcunningham>![]() |
Tue 18 Apr 2017 08:00:48 PM UTC, comment #12: Looks good. I can't comment on the corectness of the socket.h/.c additions though (CMSG...) without reading into the specs. But I guess that doesn't really matter. If it should be wrong, we can always fix it later.
|
Simon Goldschmidt <goldsimon>![]() |
Sat 15 Apr 2017 05:08:07 PM UTC, comment #11: Attached is patch implementing CMSG infrastructure (only for recvmsg) and IP_PKTINFO socket option (including unit test)
|
Joel Cunningham <jcunningham>![]() |
Thu 13 Apr 2017 03:39:42 PM UTC, comment #10: RFC 3542, section 20 contains the specification for control messages (AKA Ancillary Data):
|
Joel Cunningham <jcunningham>![]() |
Fri 17 Mar 2017 10:22:53 PM UTC, comment #9: Socket unit tests now utilize recvmsg for both UDP and TCP. So far no bugs in the implementation :) |
Joel Cunningham <jcunningham>![]() |
Thu 16 Mar 2017 10:21:09 PM UTC, comment #8: Awesome, great :) I'll start playing with it. I can work on moving my sendmsg tests and convert them to using loopback |
Joel Cunningham <jcunningham>![]() |
Thu 16 Mar 2017 09:57:19 PM UTC, comment #7:
|
Simon Goldschmidt <goldsimon>![]() |
Tue 14 Mar 2017 06:44:20 PM UTC, comment #6:
|
Simon Goldschmidt <goldsimon>![]() |
Tue 14 Mar 2017 06:55:42 AM UTC, comment #5: That would be great. I haven't started and don't know when I would have... |
Simon Goldschmidt <goldsimon>![]() |
Mon 13 Mar 2017 10:09:57 PM UTC, comment #4: I can give adding IP_PKTINFO and CMSG support a go if you hadn't already started on it. I plan on using the feature in my products and have also implemented these APIs in a proprietary stack a couple years back.
|
Joel Cunningham <jcunningham>![]() |
Mon 13 Mar 2017 09:34:19 PM UTC, comment #3: The actual recvmsg function is implemented, however, IP_PKTINFO/in_pktinfo is still missing (msg_control is not touched at all).
|
Simon Goldschmidt <goldsimon>![]() |
Wed 23 Nov 2016 03:06:28 PM UTC, comment #2: The IPv6 version of all this stuff is separate and (fortunately) standardized in RFC 3542. |
David van Moolenbroek <dcvmoole> |
Wed 23 Nov 2016 02:51:25 PM UTC, comment #1: Glad to see this as a task, recvmsg has been on my backlog for a while :)
|
Joel Cunningham <jcunningham>![]() |
Wed 23 Nov 2016 12:01:25 PM UTC, original submission:
Together with IP_PKTINFO option (is this standardized?), recvmsg() can give us the destination address of UDP datagrams received on an ANY socket... |
Simon Goldschmidt <goldsimon>![]() |
Depends on the following items: None found
Items that depend on this one: None found
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 11 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-07-13 | jcunningham | Assigned to | jcunningham | ![]() |
None |
2017-07-27 | goldsimon | Status | In Progress | ![]() |
None |
2017-04-26 | goldsimon | Percent Complete | 50% | ![]() |
90% |
2017-04-25 | jcunningham | Percent Complete | 90% | ![]() |
50% |
2017-04-25 | jcunningham | Percent Complete | 50% | ![]() |
90% |
2017-04-25 | jcunningham | Attached File | - | ![]() |
Added 0001-sockets-task-14247-add-CMSG-and-IP_PKTINFO-conn-flag.patch, #40488 |
2017-04-15 | jcunningham | Attached File | - | ![]() |
Added 0001-sockets-task-14247-add-CMSG-and-IP_PKTINFO.patch, #40412 |
2017-04-13 | jcunningham | Assigned to | None | ![]() |
jcunningham |
2017-03-13 | goldsimon | Status | None | ![]() |
In Progress |
Percent Complete | 0% | ![]() |
50% | ||
Summary | socket API: implement recvmsg | ![]() |
socket API: implement recvmsg msg_control support |
Yes