@@ -135,10 +135,12 @@ windows_targets::link!("ntdll.dll" "system" fn NtWriteFile(filehandle : HANDLE,
135135windows_targets:: link!( "ntdll.dll" "system" fn RtlNtStatusToDosError ( status : NTSTATUS ) -> u32 ) ;
136136windows_targets:: link!( "userenv.dll" "system" fn GetUserProfileDirectoryW ( htoken : HANDLE , lpprofiledir : PWSTR , lpcchsize : * mut u32 ) -> BOOL ) ;
137137windows_targets:: link!( "ws2_32.dll" "system" fn WSACleanup ( ) -> i32 ) ;
138+ windows_targets:: link!( "ws2_32.dll" "system" fn WSADuplicateSocketA ( s : SOCKET , dwprocessid : u32 , lpprotocolinfo : * mut WSAPROTOCOL_INFOA ) -> i32 ) ;
138139windows_targets:: link!( "ws2_32.dll" "system" fn WSADuplicateSocketW ( s : SOCKET , dwprocessid : u32 , lpprotocolinfo : * mut WSAPROTOCOL_INFOW ) -> i32 ) ;
139140windows_targets:: link!( "ws2_32.dll" "system" fn WSAGetLastError ( ) -> WSA_ERROR ) ;
140141windows_targets:: link!( "ws2_32.dll" "system" fn WSARecv ( s : SOCKET , lpbuffers : * const WSABUF , dwbuffercount : u32 , lpnumberofbytesrecvd : * mut u32 , lpflags : * mut u32 , lpoverlapped : * mut OVERLAPPED , lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE ) -> i32 ) ;
141142windows_targets:: link!( "ws2_32.dll" "system" fn WSASend ( s : SOCKET , lpbuffers : * const WSABUF , dwbuffercount : u32 , lpnumberofbytessent : * mut u32 , dwflags : u32 , lpoverlapped : * mut OVERLAPPED , lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE ) -> i32 ) ;
143+ windows_targets:: link!( "ws2_32.dll" "system" fn WSASocketA ( af : i32 , r#type : i32 , protocol : i32 , lpprotocolinfo : * const WSAPROTOCOL_INFOA , g : u32 , dwflags : u32 ) -> SOCKET ) ;
142144windows_targets:: link!( "ws2_32.dll" "system" fn WSASocketW ( af : i32 , r#type : i32 , protocol : i32 , lpprotocolinfo : * const WSAPROTOCOL_INFOW , g : u32 , dwflags : u32 ) -> SOCKET ) ;
143145windows_targets:: link!( "ws2_32.dll" "system" fn WSAStartup ( wversionrequested : u16 , lpwsadata : * mut WSADATA ) -> i32 ) ;
144146windows_targets:: link!( "ws2_32.dll" "system" fn accept( s : SOCKET , addr : * mut SOCKADDR , addrlen : * mut i32 ) -> SOCKET ) ;
@@ -3287,6 +3289,30 @@ pub struct WSAPROTOCOLCHAIN {
32873289}
32883290#[ repr( C ) ]
32893291#[ derive( Clone , Copy ) ]
3292+ pub struct WSAPROTOCOL_INFOA {
3293+ pub dwServiceFlags1 : u32 ,
3294+ pub dwServiceFlags2 : u32 ,
3295+ pub dwServiceFlags3 : u32 ,
3296+ pub dwServiceFlags4 : u32 ,
3297+ pub dwProviderFlags : u32 ,
3298+ pub ProviderId : GUID ,
3299+ pub dwCatalogEntryId : u32 ,
3300+ pub ProtocolChain : WSAPROTOCOLCHAIN ,
3301+ pub iVersion : i32 ,
3302+ pub iAddressFamily : i32 ,
3303+ pub iMaxSockAddr : i32 ,
3304+ pub iMinSockAddr : i32 ,
3305+ pub iSocketType : i32 ,
3306+ pub iProtocol : i32 ,
3307+ pub iProtocolMaxOffset : i32 ,
3308+ pub iNetworkByteOrder : i32 ,
3309+ pub iSecurityScheme : i32 ,
3310+ pub dwMessageSize : u32 ,
3311+ pub dwProviderReserved : u32 ,
3312+ pub szProtocol : [ i8 ; 256 ] ,
3313+ }
3314+ #[ repr( C ) ]
3315+ #[ derive( Clone , Copy ) ]
32903316pub struct WSAPROTOCOL_INFOW {
32913317 pub dwServiceFlags1 : u32 ,
32923318 pub dwServiceFlags2 : u32 ,
0 commit comments