Skip to content

recvmsg support on Windows #80398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chrysn mannequin opened this issue Mar 6, 2019 · 3 comments
Open

recvmsg support on Windows #80398

chrysn mannequin opened this issue Mar 6, 2019 · 3 comments
Labels
OS-windows type-feature A feature request or enhancement

Comments

@chrysn
Copy link
Mannequin

chrysn mannequin commented Mar 6, 2019

BPO 36217
Nosy @pfmoore, @tjguk, @chrysn, @zware, @zooba

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-03-06.18:01:03.896>
labels = ['type-feature', 'OS-windows']
title = 'recvmsg support on Windows'
updated_at = <Date 2019-03-06.18:01:03.896>
user = 'https://github.com/chrysn'

bugs.python.org fields:

activity = <Date 2019-03-06.18:01:03.896>
actor = 'chrysn'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Windows']
creation = <Date 2019-03-06.18:01:03.896>
creator = 'chrysn'
dependencies = []
files = []
hgrepos = []
issue_num = 36217
keywords = []
message_count = 1.0
messages = ['337337']
nosy_count = 5.0
nosy_names = ['paul.moore', 'tim.golden', 'chrysn', 'zach.ware', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue36217'
versions = []

@chrysn
Copy link
Mannequin Author

chrysn mannequin commented Mar 6, 2019

Windows has support for advanced socket APIs of RFC 3542 (eg. pktinfo, see https://docs.microsoft.com/en-us/windows/desktop/api/ws2ipdef/ns-ws2ipdef-in6_pktinfo), but those can not be used on Python as there is no recvmsg implementation (tested on 3.7.1 on Windows 10).

The recvmsg function is, among other things, required for implementing the CoAP protocol (RFC 7252: introspection of ICMP errors).

Windows does have a recvmsg function (as documented at https://msdn.microsoft.com/en-us/a46449f7-3206-45e9-9df0-f272b8cdcc4b), and supports flags to make actual use of it (like RECVPKTINFO above). Given many of the missing flags of RFC 3542 are being added in bpo-29515, please consider adding a recvmsg method to Windows socket objects.

@chrysn chrysn mannequin added OS-windows type-feature A feature request or enhancement labels Mar 6, 2019
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@KhazAkar
Copy link

Here is MS docs about sendmsg/recvmsg
WSASendMsg: https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsasendmsg
For WSARecvMsg, it's needed to implement it yourself by using this doc (callback for LPFN_WSARECVMSG): https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_wsarecvmsg

@James-E-A
Copy link

Pending this being implemented, is there any way to tell on Python on Windows whether a received UDP packet was multicast or unicast?
https://stackoverflow.com/a/75621192/1874170

Or, if not, is there any other way to filter incoming packets on that basis, so that only multicast packets are received in the first place?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants