mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 10:44:36 +08:00
host_env: export remaining Windows socket constants (#8743)
Assisted-by: Claude
This commit is contained in:
1 parent
d02d81e740
commit
02c2a1dfc6
1 file changed
+79
-13
@@ -561,19 +561,20 @@ pub use windows_sys::Win32::Networking::WinSock::{
|
||||
IP_OPTIONS, IP_RECVDSTADDR, IP_TOS, IP_TTL, IPPORT_RESERVED, IPPROTO_AH, IPPROTO_CBT,
|
||||
IPPROTO_DSTOPTS, IPPROTO_EGP, IPPROTO_ESP, IPPROTO_FRAGMENT, IPPROTO_GGP, IPPROTO_HOPOPTS,
|
||||
IPPROTO_ICLFXBM, IPPROTO_ICMP, IPPROTO_ICMPV6, IPPROTO_IDP, IPPROTO_IGMP, IPPROTO_IGP,
|
||||
IPPROTO_IP, IPPROTO_IP as IPPROTO_IPIP, IPPROTO_IPV4, IPPROTO_IPV6, IPPROTO_L2TP, IPPROTO_ND,
|
||||
IPPROTO_NONE, IPPROTO_PGM, IPPROTO_PIM, IPPROTO_PUP, IPPROTO_RAW, IPPROTO_RDP, IPPROTO_ROUTING,
|
||||
IPPROTO_SCTP, IPPROTO_ST, IPPROTO_TCP, IPPROTO_UDP, IPV6_CHECKSUM, IPV6_DONTFRAG,
|
||||
IPV6_HOPLIMIT, IPV6_HOPOPTS, IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP, IPV6_MULTICAST_HOPS,
|
||||
IPV6_MULTICAST_IF, IPV6_MULTICAST_LOOP, IPV6_PKTINFO, IPV6_RECVRTHDR, IPV6_RECVTCLASS,
|
||||
IPV6_RTHDR, IPV6_TCLASS, IPV6_UNICAST_HOPS, IPV6_V6ONLY, MSG_BCAST, MSG_CTRUNC, MSG_DONTROUTE,
|
||||
MSG_MCAST, MSG_OOB, MSG_PEEK, MSG_TRUNC, MSG_WAITALL, NI_DGRAM, NI_MAXHOST, NI_MAXSERV,
|
||||
NI_NAMEREQD, NI_NOFQDN, NI_NUMERICHOST, NI_NUMERICSERV, RCVALL_IPLEVEL, RCVALL_OFF, RCVALL_ON,
|
||||
RCVALL_SOCKETLEVELONLY, SD_BOTH, SD_RECEIVE, SD_SEND, SIO_KEEPALIVE_VALS,
|
||||
SIO_LOOPBACK_FAST_PATH, SIO_RCVALL, SO_BROADCAST, SO_ERROR, SO_KEEPALIVE, SO_LINGER,
|
||||
SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TYPE, SO_USELOOPBACK, SOCK_DGRAM,
|
||||
SOCK_RAW, SOCK_RDM, SOCK_SEQPACKET, SOCK_STREAM, SOCKET_ERROR as SOCKET_ERROR_CODE, SOL_SOCKET,
|
||||
SOMAXCONN, TCP_NODELAY, WSAEBADF, WSAECONNABORTED, WSAECONNRESET, WSAENOTSOCK, WSAEWOULDBLOCK,
|
||||
IPPROTO_IP, IPPROTO_IP as IPPROTO_IPIP, IPPROTO_IPV4, IPPROTO_IPV6, IPPROTO_L2TP, IPPROTO_MAX,
|
||||
IPPROTO_ND, IPPROTO_NONE, IPPROTO_PGM, IPPROTO_PIM, IPPROTO_PUP, IPPROTO_RAW, IPPROTO_RDP,
|
||||
IPPROTO_ROUTING, IPPROTO_SCTP, IPPROTO_ST, IPPROTO_TCP, IPPROTO_UDP, IPV6_CHECKSUM,
|
||||
IPV6_DONTFRAG, IPV6_HOPLIMIT, IPV6_HOPOPTS, IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP,
|
||||
IPV6_MULTICAST_HOPS, IPV6_MULTICAST_IF, IPV6_MULTICAST_LOOP, IPV6_PKTINFO, IPV6_RECVRTHDR,
|
||||
IPV6_RECVTCLASS, IPV6_RTHDR, IPV6_TCLASS, IPV6_UNICAST_HOPS, IPV6_V6ONLY, MSG_BCAST,
|
||||
MSG_CTRUNC, MSG_DONTROUTE, MSG_MCAST, MSG_OOB, MSG_PEEK, MSG_TRUNC, MSG_WAITALL, NI_DGRAM,
|
||||
NI_MAXHOST, NI_MAXSERV, NI_NAMEREQD, NI_NOFQDN, NI_NUMERICHOST, NI_NUMERICSERV, RCVALL_IPLEVEL,
|
||||
RCVALL_OFF, RCVALL_ON, RCVALL_SOCKETLEVELONLY, SD_BOTH, SD_RECEIVE, SD_SEND,
|
||||
SIO_KEEPALIVE_VALS, SIO_LOOPBACK_FAST_PATH, SIO_RCVALL, SO_ACCEPTCONN, SO_BROADCAST, SO_DEBUG,
|
||||
SO_DONTROUTE, SO_ERROR, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_RCVTIMEO,
|
||||
SO_REUSEADDR, SO_SNDBUF, SO_SNDTIMEO, SO_TYPE, SO_USELOOPBACK, SOCK_DGRAM, SOCK_RAW, SOCK_RDM,
|
||||
SOCK_SEQPACKET, SOCK_STREAM, SOCKET_ERROR as SOCKET_ERROR_CODE, SOL_IP, SOL_SOCKET, SOMAXCONN,
|
||||
TCP_MAXSEG, TCP_NODELAY, WSAEBADF, WSAECONNABORTED, WSAECONNRESET, WSAENOTSOCK, WSAEWOULDBLOCK,
|
||||
getprotobyname, getservbyname, getservbyport, getsockopt, setsockopt,
|
||||
};
|
||||
|
||||
@@ -612,6 +613,71 @@ pub const AI_NUMERICHOST: i32 = windows_sys::Win32::Networking::WinSock::AI_NUME
|
||||
#[cfg(windows)]
|
||||
pub const FROM_PROTOCOL_INFO_VALUE: i32 = FROM_PROTOCOL_INFO;
|
||||
|
||||
/// Signed C-long readings of option words, plus names the Winsock headers
|
||||
/// do not define that the module still carries.
|
||||
#[cfg(windows)]
|
||||
pub const SOL_TCP: i32 = 6;
|
||||
#[cfg(windows)]
|
||||
pub const SOL_UDP: i32 = 17;
|
||||
#[cfg(windows)]
|
||||
pub const SOL_RFCOMM: i32 = 3;
|
||||
#[cfg(windows)]
|
||||
pub const SO_SNDLOWAT: i32 = 0x1003;
|
||||
#[cfg(windows)]
|
||||
pub const SO_RCVLOWAT: i32 = 0x1004;
|
||||
#[cfg(windows)]
|
||||
pub const SO_ORIGINAL_DST: i32 = 12303;
|
||||
#[cfg(windows)]
|
||||
pub const SO_BTH_ENCRYPT: i32 = 2;
|
||||
#[cfg(windows)]
|
||||
pub const SO_BTH_MTU: i32 = 0x8000_0007u32 as i32;
|
||||
#[cfg(windows)]
|
||||
pub const SO_BTH_MTU_MAX: i32 = 0x8000_0008u32 as i32;
|
||||
#[cfg(windows)]
|
||||
pub const SO_BTH_MTU_MIN: i32 = 0x8000_000au32 as i32;
|
||||
#[cfg(windows)]
|
||||
pub const TCP_KEEPIDLE: i32 = 3;
|
||||
#[cfg(windows)]
|
||||
pub const TCP_FASTOPEN: i32 = 15;
|
||||
#[cfg(windows)]
|
||||
pub const TCP_KEEPCNT: i32 = 16;
|
||||
#[cfg(windows)]
|
||||
pub const TCP_KEEPINTVL: i32 = 17;
|
||||
#[cfg(windows)]
|
||||
pub const IPPORT_USERRESERVED: i32 = 5000;
|
||||
#[cfg(windows)]
|
||||
pub const INADDR_UNSPEC_GROUP: i32 = 0xe000_0000u32 as i32;
|
||||
#[cfg(windows)]
|
||||
pub const INADDR_ALLHOSTS_GROUP: i32 = 0xe000_0001u32 as i32;
|
||||
#[cfg(windows)]
|
||||
pub const INADDR_MAX_LOCAL_GROUP: i32 = 0xe000_00ffu32 as i32;
|
||||
#[cfg(windows)]
|
||||
pub const IP_ADD_SOURCE_MEMBERSHIP: i32 = 15;
|
||||
#[cfg(windows)]
|
||||
pub const IP_DROP_SOURCE_MEMBERSHIP: i32 = 16;
|
||||
#[cfg(windows)]
|
||||
pub const IP_BLOCK_SOURCE: i32 = 17;
|
||||
#[cfg(windows)]
|
||||
pub const IP_UNBLOCK_SOURCE: i32 = 18;
|
||||
#[cfg(windows)]
|
||||
pub const IP_PKTINFO: i32 = 19;
|
||||
#[cfg(windows)]
|
||||
pub const IP_RECVTTL: i32 = 21;
|
||||
#[cfg(windows)]
|
||||
pub const IP_RECVTOS: i32 = 40;
|
||||
#[cfg(windows)]
|
||||
pub const IP_RECVERR: i32 = 75;
|
||||
#[cfg(windows)]
|
||||
pub const IPV6_RECVERR: i32 = 75;
|
||||
#[cfg(windows)]
|
||||
pub const MSG_ERRQUEUE: i32 = 0x1000;
|
||||
#[cfg(windows)]
|
||||
pub const RCVALL_MAX: i32 = 3;
|
||||
#[cfg(windows)]
|
||||
pub const BDADDR_ANY: &str = "00:00:00:00:00:00";
|
||||
#[cfg(windows)]
|
||||
pub const BDADDR_LOCAL: &str = "00:00:00:FF:FF:FF";
|
||||
|
||||
#[cfg(windows)]
|
||||
pub type RawSocket = SOCKET;
|
||||
|
||||
|
||||
Reference in new issue
Block a user