diff options
author | Reese Hyde <34076153+rmehyde@users.noreply.github.com> | 2023-04-27 04:05:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 04:05:55 (GMT) |
commit | 1d99e9e46e9b517532fea11befe2e6d0043850bd (patch) | |
tree | 167a0e7d03c62cd4183c30e10c86646b852c1e66 /Modules/socketmodule.c | |
parent | 9169a56fad246364fd3224306e72e0d0725c35aa (diff) | |
download | cpython-1d99e9e46e9b517532fea11befe2e6d0043850bd.zip cpython-1d99e9e46e9b517532fea11befe2e6d0043850bd.tar.gz cpython-1d99e9e46e9b517532fea11befe2e6d0043850bd.tar.bz2 |
gh-89415: Add source-specific multicast constants to socket module (#103684)
Add socket options for source-specific multicast when present as C #defines.
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 656cd54..f11d4b1 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -8418,6 +8418,18 @@ socket_exec(PyObject *m) #ifdef IP_BIND_ADDRESS_NO_PORT ADD_INT_MACRO(m, IP_BIND_ADDRESS_NO_PORT); #endif +#ifdef IP_UNBLOCK_SOURCE + ADD_INT_MACRO(m, IP_UNBLOCK_SOURCE); +#endif +#ifdef IP_BLOCK_SOURCE + ADD_INT_MACRO(m, IP_BLOCK_SOURCE); +#endif +#ifdef IP_ADD_SOURCE_MEMBERSHIP + ADD_INT_MACRO(m, IP_ADD_SOURCE_MEMBERSHIP); +#endif +#ifdef IP_DROP_SOURCE_MEMBERSHIP + ADD_INT_MACRO(m, IP_DROP_SOURCE_MEMBERSHIP); +#endif /* IPv6 [gs]etsockopt options, defined in RFC2553 */ #ifdef IPV6_JOIN_GROUP |