@@ -134,10 +134,12 @@ windows_targets::link!("ntdll.dll" "system" fn NtWriteFile(filehandle : HANDLE,
134134windows_targets:: link!( "ntdll.dll" "system" fn RtlNtStatusToDosError ( status : NTSTATUS ) -> u32 ) ;
135135windows_targets:: link!( "userenv.dll" "system" fn GetUserProfileDirectoryW ( htoken : HANDLE , lpprofiledir : PWSTR , lpcchsize : * mut u32 ) -> BOOL ) ;
136136windows_targets:: link!( "ws2_32.dll" "system" fn WSACleanup ( ) -> i32 ) ;
137+ windows_targets:: link!( "ws2_32.dll" "system" fn WSADuplicateSocketA ( s : SOCKET , dwprocessid : u32 , lpprotocolinfo : * mut WSAPROTOCOL_INFOA ) -> i32 ) ;
137138windows_targets:: link!( "ws2_32.dll" "system" fn WSADuplicateSocketW ( s : SOCKET , dwprocessid : u32 , lpprotocolinfo : * mut WSAPROTOCOL_INFOW ) -> i32 ) ;
138139windows_targets:: link!( "ws2_32.dll" "system" fn WSAGetLastError ( ) -> WSA_ERROR ) ;
139140windows_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 ) ;
140141windows_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 ) ;
142+ 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 ) ;
141143windows_targets:: link!( "ws2_32.dll" "system" fn WSASocketW ( af : i32 , r#type : i32 , protocol : i32 , lpprotocolinfo : * const WSAPROTOCOL_INFOW , g : u32 , dwflags : u32 ) -> SOCKET ) ;
142144windows_targets:: link!( "ws2_32.dll" "system" fn WSAStartup ( wversionrequested : u16 , lpwsadata : * mut WSADATA ) -> i32 ) ;
143145windows_targets:: link!( "ws2_32.dll" "system" fn accept( s : SOCKET , addr : * mut SOCKADDR , addrlen : * mut i32 ) -> SOCKET ) ;
@@ -3270,6 +3272,30 @@ pub struct WSAPROTOCOLCHAIN {
32703272}
32713273#[ repr( C ) ]
32723274#[ derive( Clone , Copy ) ]
3275+ pub struct WSAPROTOCOL_INFOA {
3276+ pub dwServiceFlags1 : u32 ,
3277+ pub dwServiceFlags2 : u32 ,
3278+ pub dwServiceFlags3 : u32 ,
3279+ pub dwServiceFlags4 : u32 ,
3280+ pub dwProviderFlags : u32 ,
3281+ pub ProviderId : GUID ,
3282+ pub dwCatalogEntryId : u32 ,
3283+ pub ProtocolChain : WSAPROTOCOLCHAIN ,
3284+ pub iVersion : i32 ,
3285+ pub iAddressFamily : i32 ,
3286+ pub iMaxSockAddr : i32 ,
3287+ pub iMinSockAddr : i32 ,
3288+ pub iSocketType : i32 ,
3289+ pub iProtocol : i32 ,
3290+ pub iProtocolMaxOffset : i32 ,
3291+ pub iNetworkByteOrder : i32 ,
3292+ pub iSecurityScheme : i32 ,
3293+ pub dwMessageSize : u32 ,
3294+ pub dwProviderReserved : u32 ,
3295+ pub szProtocol : [ i8 ; 256 ] ,
3296+ }
3297+ #[ repr( C ) ]
3298+ #[ derive( Clone , Copy ) ]
32733299pub struct WSAPROTOCOL_INFOW {
32743300 pub dwServiceFlags1 : u32 ,
32753301 pub dwServiceFlags2 : u32 ,
0 commit comments