[Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.161,1.162
Martin v. L?wis
loewis@users.sourceforge.net
Sat, 04 Aug 2001 15:37:26 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv27483
Modified Files:
socketmodule.c
Log Message:
Add more constants. Contributed by itojun.
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.161
retrieving revision 1.162
diff -C2 -d -r1.161 -r1.162
*** socketmodule.c 2001/08/04 22:32:03 1.161
--- socketmodule.c 2001/08/04 22:37:23 1.162
***************
*** 2434,2437 ****
--- 2434,2438 ----
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
+ hints.ai_socktype = SOCK_DGRAM; /* make numeric port happy */
error = getaddrinfo(hostp, pbuf, &hints, &res);
if (error) {
***************
*** 3138,3141 ****
--- 3139,3145 ----
insint(d, "IPPROTO_IP", 0);
#endif
+ #ifdef IPPROTO_HOPOPTS
+ insint(d, "IPPROTO_HOPOPTS", IPPROTO_HOPOPTS);
+ #endif
#ifdef IPPROTO_ICMP
insint(d, "IPPROTO_ICMP", IPPROTO_ICMP);
***************
*** 3149,3152 ****
--- 3153,3162 ----
insint(d, "IPPROTO_GGP", IPPROTO_GGP);
#endif
+ #ifdef IPPROTO_IPV4
+ insint(d, "IPPROTO_IPV4", IPPROTO_IPV4);
+ #endif
+ #ifdef IPPROTO_IPIP
+ insint(d, "IPPROTO_IPIP", IPPROTO_IPIP);
+ #endif
#ifdef IPPROTO_TCP
insint(d, "IPPROTO_TCP", IPPROTO_TCP);
***************
*** 3177,3180 ****
--- 3187,3223 ----
insint(d, "IPPROTO_TP", IPPROTO_TP);
#endif
+ #ifdef IPPROTO_IPV6
+ insint(d, "IPPROTO_IPV6", IPPROTO_IPV6);
+ #endif
+ #ifdef IPPROTO_ROUTING
+ insint(d, "IPPROTO_ROUTING", IPPROTO_ROUTING);
+ #endif
+ #ifdef IPPROTO_FRAGMENT
+ insint(d, "IPPROTO_FRAGMENT", IPPROTO_FRAGMENT);
+ #endif
+ #ifdef IPPROTO_RSVP
+ insint(d, "IPPROTO_RSVP", IPPROTO_RSVP);
+ #endif
+ #ifdef IPPROTO_GRE
+ insint(d, "IPPROTO_GRE", IPPROTO_GRE);
+ #endif
+ #ifdef IPPROTO_ESP
+ insint(d, "IPPROTO_ESP", IPPROTO_ESP);
+ #endif
+ #ifdef IPPROTO_AH
+ insint(d, "IPPROTO_AH", IPPROTO_AH);
+ #endif
+ #ifdef IPPROTO_MOBILE
+ insint(d, "IPPROTO_MOBILE", IPPROTO_MOBILE);
+ #endif
+ #ifdef IPPROTO_ICMPV6
+ insint(d, "IPPROTO_ICMPV6", IPPROTO_ICMPV6);
+ #endif
+ #ifdef IPPROTO_NONE
+ insint(d, "IPPROTO_NONE", IPPROTO_NONE);
+ #endif
+ #ifdef IPPROTO_DSTOPTS
+ insint(d, "IPPROTO_DSTOPTS", IPPROTO_DSTOPTS);
+ #endif
#ifdef IPPROTO_XTP
insint(d, "IPPROTO_XTP", IPPROTO_XTP);
***************
*** 3183,3186 ****
--- 3226,3238 ----
insint(d, "IPPROTO_EON", IPPROTO_EON);
#endif
+ #ifdef IPPROTO_PIM
+ insint(d, "IPPROTO_PIM", IPPROTO_PIM);
+ #endif
+ #ifdef IPPROTO_IPCOMP
+ insint(d, "IPPROTO_IPCOMP", IPPROTO_IPCOMP);
+ #endif
+ #ifdef IPPROTO_VRRP
+ insint(d, "IPPROTO_VRRP", IPPROTO_VRRP);
+ #endif
#ifdef IPPROTO_BIP
insint(d, "IPPROTO_BIP", IPPROTO_BIP);
***************
*** 3245,3249 ****
#endif
! /* IP [gs]etsockopt options */
#ifdef IP_OPTIONS
insint(d, "IP_OPTIONS", IP_OPTIONS);
--- 3297,3301 ----
#endif
! /* IPv4 [gs]etsockopt options */
#ifdef IP_OPTIONS
insint(d, "IP_OPTIONS", IP_OPTIONS);
***************
*** 3293,3296 ****
--- 3345,3368 ----
#ifdef IP_MAX_MEMBERSHIPS
insint(d, "IP_MAX_MEMBERSHIPS", IP_MAX_MEMBERSHIPS);
+ #endif
+
+ /* IPv6 [gs]etsockopt options, defined in RFC2553 */
+ #ifdef IPV6_JOIN_GROUP
+ insint(d, "IPV6_JOIN_GROUP", IPV6_JOIN_GROUP);
+ #endif
+ #ifdef IPV6_LEAVE_GROUP
+ insint(d, "IPV6_LEAVE_GROUP", IPV6_LEAVE_GROUP);
+ #endif
+ #ifdef IPV6_MULTICAST_HOPS
+ insint(d, "IPV6_MULTICAST_HOPS", IPV6_MULTICAST_HOPS);
+ #endif
+ #ifdef IPV6_MULTICAST_IF
+ insint(d, "IPV6_MULTICAST_IF", IPV6_MULTICAST_IF);
+ #endif
+ #ifdef IPV6_MULTICAST_LOOP
+ insint(d, "IPV6_MULTICAST_LOOP", IPV6_MULTICAST_LOOP);
+ #endif
+ #ifdef IPV6_UNICAST_HOPS
+ insint(d, "IPV6_UNICAST_HOPS", IPV6_UNICAST_HOPS);
#endif