Add minimal includes and .def files to support, by default, BSD socket programming on Windows.
This commit is contained in:
		
							parent
							
								
									c16dadbb97
								
							
						
					
					
						commit
						f2461096b1
					
				
					 4 changed files with 1742 additions and 0 deletions
				
			
		
							
								
								
									
										72
									
								
								win32/include/winapi/qos.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								win32/include/winapi/qos.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,72 @@ | |||
| /**
 | ||||
|  * This file has no copyright assigned and is placed in the Public Domain. | ||||
|  * This file is part of the w64 mingw-runtime package. | ||||
|  * No warranty is given; refer to the file DISCLAIMER within this package. | ||||
|  */ | ||||
| #ifndef __QOS_H_ | ||||
| #define __QOS_H_ | ||||
| 
 | ||||
| typedef ULONG SERVICETYPE; | ||||
| 
 | ||||
| #define SERVICETYPE_NOTRAFFIC 0x00000000 | ||||
| #define SERVICETYPE_BESTEFFORT 0x00000001 | ||||
| #define SERVICETYPE_CONTROLLEDLOAD 0x00000002 | ||||
| #define SERVICETYPE_GUARANTEED 0x00000003 | ||||
| 
 | ||||
| #define SERVICETYPE_NETWORK_UNAVAILABLE 0x00000004 | ||||
| #define SERVICETYPE_GENERAL_INFORMATION 0x00000005 | ||||
| #define SERVICETYPE_NOCHANGE 0x00000006 | ||||
| #define SERVICETYPE_NONCONFORMING 0x00000009 | ||||
| #define SERVICETYPE_NETWORK_CONTROL 0x0000000A | ||||
| #define SERVICETYPE_QUALITATIVE 0x0000000D | ||||
| 
 | ||||
| #define SERVICE_BESTEFFORT 0x80010000 | ||||
| #define SERVICE_CONTROLLEDLOAD 0x80020000 | ||||
| #define SERVICE_GUARANTEED 0x80040000 | ||||
| #define SERVICE_QUALITATIVE 0x80200000 | ||||
| 
 | ||||
| #define SERVICE_NO_TRAFFIC_CONTROL 0x81000000 | ||||
| 
 | ||||
| #define SERVICE_NO_QOS_SIGNALING 0x40000000 | ||||
| 
 | ||||
| typedef struct _flowspec { | ||||
|   ULONG TokenRate; | ||||
|   ULONG TokenBucketSize; | ||||
|   ULONG PeakBandwidth; | ||||
|   ULONG Latency; | ||||
|   ULONG DelayVariation; | ||||
|   SERVICETYPE ServiceType; | ||||
|   ULONG MaxSduSize; | ||||
|   ULONG MinimumPolicedSize; | ||||
| } FLOWSPEC,*PFLOWSPEC,*LPFLOWSPEC; | ||||
| 
 | ||||
| #define QOS_NOT_SPECIFIED 0xFFFFFFFF | ||||
| #define POSITIVE_INFINITY_RATE 0xFFFFFFFE | ||||
| 
 | ||||
| typedef struct { | ||||
|   ULONG ObjectType; | ||||
|   ULONG ObjectLength; | ||||
| } QOS_OBJECT_HDR,*LPQOS_OBJECT_HDR; | ||||
| 
 | ||||
| #define QOS_GENERAL_ID_BASE 2000 | ||||
| #define QOS_OBJECT_END_OF_LIST (0x00000001 + QOS_GENERAL_ID_BASE) | ||||
| #define QOS_OBJECT_SD_MODE (0x00000002 + QOS_GENERAL_ID_BASE) | ||||
| #define QOS_OBJECT_SHAPING_RATE (0x00000003 + QOS_GENERAL_ID_BASE) | ||||
| #define QOS_OBJECT_DESTADDR (0x00000004 + QOS_GENERAL_ID_BASE) | ||||
| 
 | ||||
| typedef struct _QOS_SD_MODE { | ||||
|   QOS_OBJECT_HDR ObjectHdr; | ||||
|   ULONG ShapeDiscardMode; | ||||
| } QOS_SD_MODE,*LPQOS_SD_MODE; | ||||
| 
 | ||||
| #define TC_NONCONF_BORROW 0 | ||||
| #define TC_NONCONF_SHAPE 1 | ||||
| #define TC_NONCONF_DISCARD 2 | ||||
| #define TC_NONCONF_BORROW_PLUS 3 | ||||
| 
 | ||||
| typedef struct _QOS_SHAPING_RATE { | ||||
|   QOS_OBJECT_HDR ObjectHdr; | ||||
|   ULONG ShapingRate; | ||||
| } QOS_SHAPING_RATE,*LPQOS_SHAPING_RATE; | ||||
| 
 | ||||
| #endif | ||||
							
								
								
									
										1451
									
								
								win32/include/winapi/winsock2.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1451
									
								
								win32/include/winapi/winsock2.h
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										21
									
								
								win32/include/winapi/ws2ipdef.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								win32/include/winapi/ws2ipdef.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,21 @@ | |||
| #ifndef _WS2IPDEF_H | ||||
| #define _WS2IPDEF_H | ||||
| 
 | ||||
| #if __GNUC__ >=3 | ||||
| #pragma GCC system_header | ||||
| #endif | ||||
| 
 | ||||
| #include <winsock2.h> | ||||
| 
 | ||||
| struct ip_mreq { | ||||
|   struct in_addr imr_multiaddr; | ||||
|   struct in_addr imr_interface; | ||||
| }; | ||||
| 
 | ||||
| struct ip_mreq_source { | ||||
|   struct in_addr imr_multiaddr; | ||||
|   struct in_addr imr_sourceaddr; | ||||
|   struct in_addr imr_interface; | ||||
| }; | ||||
| 
 | ||||
| #endif | ||||
							
								
								
									
										198
									
								
								win32/lib/ws2_32.def
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										198
									
								
								win32/lib/ws2_32.def
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,198 @@ | |||
| LIBRARY ws2_32.dll | ||||
| 
 | ||||
| EXPORTS | ||||
| FreeAddrInfoEx | ||||
| FreeAddrInfoExW | ||||
| FreeAddrInfoW | ||||
| GetAddrInfoExA | ||||
| GetAddrInfoExCancel | ||||
| GetAddrInfoExOverlappedResult | ||||
| GetAddrInfoExW | ||||
| GetAddrInfoW | ||||
| GetHostNameW | ||||
| GetNameInfoW | ||||
| InetNtopW | ||||
| InetPtonW | ||||
| SetAddrInfoExA | ||||
| SetAddrInfoExW | ||||
| WEP | ||||
| WPUCompleteOverlappedRequest | ||||
| WPUGetProviderPathEx | ||||
| WSAAccept | ||||
| WSAAddressToStringA | ||||
| WSAAddressToStringW | ||||
| WSAAdvertiseProvider | ||||
| WSAAsyncGetHostByAddr | ||||
| WSAAsyncGetHostByName | ||||
| WSAAsyncGetProtoByName | ||||
| WSAAsyncGetProtoByNumber | ||||
| WSAAsyncGetServByName | ||||
| WSAAsyncGetServByPort | ||||
| WSAAsyncSelect | ||||
| WSACancelAsyncRequest | ||||
| WSACancelBlockingCall | ||||
| WSACleanup | ||||
| WSACloseEvent | ||||
| WSAConnect | ||||
| WSAConnectByList | ||||
| WSAConnectByNameA | ||||
| WSAConnectByNameW | ||||
| WSACreateEvent | ||||
| WSADuplicateSocketA | ||||
| WSADuplicateSocketW | ||||
| WSAEnumNameSpaceProvidersA | ||||
| WSAEnumNameSpaceProvidersExA | ||||
| WSAEnumNameSpaceProvidersExW | ||||
| WSAEnumNameSpaceProvidersW | ||||
| WSAEnumNetworkEvents | ||||
| WSAEnumProtocolsA | ||||
| WSAEnumProtocolsW | ||||
| WSAEventSelect | ||||
| WSAGetLastError | ||||
| WSAGetOverlappedResult | ||||
| WSAGetQOSByName | ||||
| WSAGetServiceClassInfoA | ||||
| WSAGetServiceClassInfoW | ||||
| WSAGetServiceClassNameByClassIdA | ||||
| WSAGetServiceClassNameByClassIdW | ||||
| WSAHtonl | ||||
| WSAHtons | ||||
| WSAInstallServiceClassA | ||||
| WSAInstallServiceClassW | ||||
| WSAIoctl | ||||
| WSAIsBlocking | ||||
| WSAJoinLeaf | ||||
| WSALookupServiceBeginA | ||||
| WSALookupServiceBeginW | ||||
| WSALookupServiceEnd | ||||
| WSALookupServiceNextA | ||||
| WSALookupServiceNextW | ||||
| WSANSPIoctl | ||||
| WSANtohl | ||||
| WSANtohs | ||||
| WSAPoll | ||||
| WSAProviderCompleteAsyncCall | ||||
| WSAProviderConfigChange | ||||
| WSARecv | ||||
| WSARecvDisconnect | ||||
| WSARecvFrom | ||||
| WSARemoveServiceClass | ||||
| WSAResetEvent | ||||
| WSASend | ||||
| WSASendDisconnect | ||||
| WSASendMsg | ||||
| WSASendTo | ||||
| WSASetBlockingHook | ||||
| WSASetEvent | ||||
| WSASetLastError | ||||
| WSASetServiceA | ||||
| WSASetServiceW | ||||
| WSASocketA | ||||
| WSASocketW | ||||
| WSAStartup | ||||
| WSAStringToAddressA | ||||
| WSAStringToAddressW | ||||
| WSAUnadvertiseProvider | ||||
| WSAUnhookBlockingHook | ||||
| WSAWaitForMultipleEvents | ||||
| WSApSetPostRoutine | ||||
| WSCDeinstallProvider | ||||
| WSCDeinstallProvider32 | ||||
| WSCDeinstallProviderEx | ||||
| WSCEnableNSProvider | ||||
| WSCEnableNSProvider32 | ||||
| WSCEnumNameSpaceProviders32 | ||||
| WSCEnumNameSpaceProvidersEx32 | ||||
| WSCEnumProtocols | ||||
| WSCEnumProtocols32 | ||||
| WSCEnumProtocolsEx | ||||
| WSCGetApplicationCategory | ||||
| WSCGetApplicationCategoryEx | ||||
| WSCGetProviderInfo | ||||
| WSCGetProviderInfo32 | ||||
| WSCGetProviderPath | ||||
| WSCGetProviderPath32 | ||||
| WSCInstallNameSpace | ||||
| WSCInstallNameSpace32 | ||||
| WSCInstallNameSpaceEx | ||||
| WSCInstallNameSpaceEx2 | ||||
| WSCInstallNameSpaceEx32 | ||||
| WSCInstallProvider | ||||
| WSCInstallProvider64_32 | ||||
| WSCInstallProviderAndChains64_32 | ||||
| WSCInstallProviderEx | ||||
| WSCSetApplicationCategory | ||||
| WSCSetApplicationCategoryEx | ||||
| WSCSetProviderInfo | ||||
| WSCSetProviderInfo32 | ||||
| WSCUnInstallNameSpace | ||||
| WSCUnInstallNameSpace32 | ||||
| WSCUnInstallNameSpaceEx2 | ||||
| WSCUpdateProvider | ||||
| WSCUpdateProvider32 | ||||
| WSCUpdateProviderEx | ||||
| WSCWriteNameSpaceOrder | ||||
| WSCWriteNameSpaceOrder32 | ||||
| WSCWriteProviderOrder | ||||
| WSCWriteProviderOrder32 | ||||
| WSCWriteProviderOrderEx | ||||
| WahCloseApcHelper | ||||
| WahCloseHandleHelper | ||||
| WahCloseNotificationHandleHelper | ||||
| WahCloseSocketHandle | ||||
| WahCloseThread | ||||
| WahCompleteRequest | ||||
| WahCreateHandleContextTable | ||||
| WahCreateNotificationHandle | ||||
| WahCreateSocketHandle | ||||
| WahDestroyHandleContextTable | ||||
| WahDisableNonIFSHandleSupport | ||||
| WahEnableNonIFSHandleSupport | ||||
| WahEnumerateHandleContexts | ||||
| WahInsertHandleContext | ||||
| WahNotifyAllProcesses | ||||
| WahOpenApcHelper | ||||
| WahOpenCurrentThread | ||||
| WahOpenHandleHelper | ||||
| WahOpenNotificationHandleHelper | ||||
| WahQueueUserApc | ||||
| WahReferenceContextByHandle | ||||
| WahRemoveHandleContext | ||||
| WahWaitForNotification | ||||
| WahWriteLSPEvent | ||||
| __WSAFDIsSet | ||||
| accept | ||||
| bind | ||||
| closesocket | ||||
| connect | ||||
| freeaddrinfo | ||||
| getaddrinfo | ||||
| gethostbyaddr | ||||
| gethostbyname | ||||
| gethostname | ||||
| getnameinfo | ||||
| getpeername | ||||
| getprotobyname | ||||
| getprotobynumber | ||||
| getservbyname | ||||
| getservbyport | ||||
| getsockname | ||||
| getsockopt | ||||
| htonl | ||||
| htons | ||||
| inet_addr | ||||
| inet_ntoa | ||||
| inet_ntop | ||||
| inet_pton | ||||
| ioctlsocket | ||||
| listen | ||||
| ntohl | ||||
| ntohs | ||||
| recv | ||||
| recvfrom | ||||
| select | ||||
| send | ||||
| sendto | ||||
| setsockopt | ||||
| shutdown | ||||
| socket | ||||
		Loading…
	
	Add table
		
		Reference in a new issue