summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-12-30 11:14:01 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-12-30 11:14:01 (GMT)
commitda91d024617cdaf1971248fced66916670ff220f (patch)
treea1ba8c8c8a2561488da94b08afd9806751a06821 /Modules/socketmodule.c
parent7db07e697286c8bedb7d8c320203ddbc7a98bad2 (diff)
downloadcpython-da91d024617cdaf1971248fced66916670ff220f.zip
cpython-da91d024617cdaf1971248fced66916670ff220f.tar.gz
cpython-da91d024617cdaf1971248fced66916670ff220f.tar.bz2
Add IPV6_ socket options from RFCs 3493 and 3542. Fixes #867012.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 2b61319..c7777fd 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -3964,6 +3964,71 @@ init_socket(void)
#ifdef IPV6_UNICAST_HOPS
PyModule_AddIntConstant(m, "IPV6_UNICAST_HOPS", IPV6_UNICAST_HOPS);
#endif
+ /* Additional IPV6 socket options, defined in RFC 3493 */
+#ifdef IPV6_V6ONLY
+ PyModule_AddIntConstant(m, "IPV6_V6ONLY", IPV6_V6ONLY);
+#endif
+ /* Advanced IPV6 socket options, from RFC 3542 */
+#ifdef IPV6_CHECKSUM
+ PyModule_AddIntConstant(m, "IPV6_CHECKSUM", IPV6_CHECKSUM);
+#endif
+#ifdef IPV6_DONTFRAG
+ PyModule_AddIntConstant(m, "IPV6_DONTFRAG", IPV6_DONTFRAG);
+#endif
+#ifdef IPV6_DSTOPTS
+ PyModule_AddIntConstant(m, "IPV6_DSTOPTS", IPV6_DSTOPTS);
+#endif
+#ifdef IPV6_HOPLIMIT
+ PyModule_AddIntConstant(m, "IPV6_HOPLIMIT", IPV6_HOPLIMIT);
+#endif
+#ifdef IPV6_HOPOPTS
+ PyModule_AddIntConstant(m, "IPV6_HOPOPTS", IPV6_HOPOPTS);
+#endif
+#ifdef IPV6_NEXTHOP
+ PyModule_AddIntConstant(m, "IPV6_NEXTHOP", IPV6_NEXTHOP);
+#endif
+#ifdef IPV6_PATHMTU
+ PyModule_AddIntConstant(m, "IPV6_PATHMTU", IPV6_PATHMTU);
+#endif
+#ifdef IPV6_PKTINFO
+ PyModule_AddIntConstant(m, "IPV6_PKTINFO", IPV6_PKTINFO);
+#endif
+#ifdef IPV6_RECVDSTOPTS
+ PyModule_AddIntConstant(m, "IPV6_RECVDSTOPTS", IPV6_RECVDSTOPTS);
+#endif
+#ifdef IPV6_RECVHOPLIMIT
+ PyModule_AddIntConstant(m, "IPV6_RECVHOPLIMIT", IPV6_RECVHOPLIMIT);
+#endif
+#ifdef IPV6_RECVHOPOPTS
+ PyModule_AddIntConstant(m, "IPV6_RECVHOPOPTS", IPV6_RECVHOPOPTS);
+#endif
+#ifdef IPV6_RECVPKTINFO
+ PyModule_AddIntConstant(m, "IPV6_RECVPKTINFO", IPV6_RECVPKTINFO);
+#endif
+#ifdef IPV6_RECVRTHDR
+ PyModule_AddIntConstant(m, "IPV6_RECVRTHDR", IPV6_RECVRTHDR);
+#endif
+#ifdef IPV6_RECVTCLASS
+ PyModule_AddIntConstant(m, "IPV6_RECVTCLASS", IPV6_RECVTCLASS);
+#endif
+#ifdef IPV6_RTHDR
+ PyModule_AddIntConstant(m, "IPV6_RTHDR", IPV6_RTHDR);
+#endif
+#ifdef IPV6_RTHDRDSTOPTS
+ PyModule_AddIntConstant(m, "IPV6_RTHDRDSTOPTS", IPV6_RTHDRDSTOPTS);
+#endif
+#ifdef IPV6_RTHDR_TYPE_0
+ PyModule_AddIntConstant(m, "IPV6_RTHDR_TYPE_0", IPV6_RTHDR_TYPE_0);
+#endif
+#ifdef IPV6_RECVPATHMTU
+ PyModule_AddIntConstant(m, "IPV6_RECVPATHMTU", IPV6_RECVPATHMTU);
+#endif
+#ifdef IPV6_TCLASS
+ PyModule_AddIntConstant(m, "IPV6_TCLASS", IPV6_TCLASS);
+#endif
+#ifdef IPV6_USE_MIN_MTU
+ PyModule_AddIntConstant(m, "IPV6_USE_MIN_MTU", IPV6_USE_MIN_MTU);
+#endif
/* TCP options */
#ifdef TCP_NODELAY
@@ -4034,6 +4099,9 @@ init_socket(void)
#ifdef EAI_NONAME
PyModule_AddIntConstant(m, "EAI_NONAME", EAI_NONAME);
#endif
+#ifdef EAI_OVERFLOW
+ PyModule_AddIntConstant(m, "EAI_OVERFLOW", EAI_OVERFLOW);
+#endif
#ifdef EAI_SERVICE
PyModule_AddIntConstant(m, "EAI_SERVICE", EAI_SERVICE);
#endif
@@ -4061,6 +4129,9 @@ init_socket(void)
#ifdef AI_NUMERICHOST
PyModule_AddIntConstant(m, "AI_NUMERICHOST", AI_NUMERICHOST);
#endif
+#ifdef AI_NUMERICSERV
+ PyModule_AddIntConstant(m, "AI_NUMERICSERV", AI_NUMERICSERV);
+#endif
#ifdef AI_MASK
PyModule_AddIntConstant(m, "AI_MASK", AI_MASK);
#endif