[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/python/cpython/3.3/Modules/socketmodule.h [Back]  [Original]

/* Socket module header file */

/* Includes needed for the sockaddr_* symbols below */
#ifndef MS_WINDOWS
#ifdef __VMS
#   include 
# else
#   include 
# endif
# include 
# if !(defined(__CYGWIN__) || (defined(PYOS_OS2) && defined(PYCC_VACPP)))
#  include 
# endif

#else /* MS_WINDOWS */
# include 
# include 
/* VC6 is shipped with old platform headers, and does not have MSTcpIP.h
 * Separate SDKs have all the functions we want, but older ones don't have
 * any version information.
 * I use SIO_GET_MULTICAST_FILTER to detect a decent SDK.
 */
# ifdef SIO_GET_MULTICAST_FILTER
#  include  /* for SIO_RCVALL */
#  define HAVE_ADDRINFO
#  define HAVE_SOCKADDR_STORAGE
#  define HAVE_GETADDRINFO
#  define HAVE_GETNAMEINFO
#  define ENABLE_IPV6
# else
typedef int socklen_t;
# endif /* IPPROTO_IPV6 */
#endif /* MS_WINDOWS */

#ifdef HAVE_SYS_UN_H
# include 
#else
# undef AF_UNIX
#endif

#ifdef HAVE_LINUX_NETLINK_H
# ifdef HAVE_ASM_TYPES_H
#  include 
# endif
# include 
#else
#  undef AF_NETLINK
#endif

#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
#include 
#include 
#include 
#include 
#include 
#endif

#ifdef HAVE_BLUETOOTH_H
#include 
#endif

#ifdef HAVE_NET_IF_H
# include 
#endif

#ifdef HAVE_NETPACKET_PACKET_H
# include 
# include 
#endif

#ifdef HAVE_LINUX_TIPC_H
# include 
#endif

#ifdef HAVE_LINUX_CAN_H
#include 
#endif

#ifdef HAVE_LINUX_CAN_RAW_H
#include 
#endif

#ifdef HAVE_SYS_SYS_DOMAIN_H
#include 
#endif
#ifdef HAVE_SYS_KERN_CONTROL_H
#include 
#endif

#ifndef Py__SOCKET_H
#define Py__SOCKET_H
#ifdef __cplusplus
extern "C" {
#endif

/* Python module and C API name */
#define PySocket_MODULE_NAME    "_socket"
#define PySocket_CAPI_NAME      "CAPI"
#define PySocket_CAPSULE_NAME   PySocket_MODULE_NAME "." PySocket_CAPI_NAME

/* Abstract the socket file descriptor type */
#ifdef MS_WINDOWS
typedef SOCKET SOCKET_T;
#       ifdef MS_WIN64
#               define SIZEOF_SOCKET_T 8
#       else
#               define SIZEOF_SOCKET_T 4
#       endif
#else
typedef int SOCKET_T;
#       define SIZEOF_SOCKET_T SIZEOF_INT
#endif

#if SIZEOF_SOCKET_T 

Web Proxy Viewer  |  New URL  |  Original Page