Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bec06ad7
Commit
bec06ad7
authored
Nov 01, 2004
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 01, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fill WSAPROTOCOL_INFO structures instead of PROTOCOL_INFO structures.
Implement WSCEnumProtocols(). Add some tests.
parent
d3eb0550
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
1 deletion
+137
-1
protocol.c
dlls/winsock/protocol.c
+0
-0
.cvsignore
dlls/winsock/tests/.cvsignore
+1
-0
Makefile.in
dlls/winsock/tests/Makefile.in
+1
-0
protocol.c
dlls/winsock/tests/protocol.c
+109
-0
ws2_32.spec
dlls/winsock/ws2_32.spec
+1
-1
winsock2.h
include/winsock2.h
+25
-0
No files found.
dlls/winsock/protocol.c
View file @
bec06ad7
This diff is collapsed.
Click to expand it.
dlls/winsock/tests/.cvsignore
View file @
bec06ad7
Makefile
protocol.ok
sock.ok
testlist.c
dlls/winsock/tests/Makefile.in
View file @
bec06ad7
...
...
@@ -6,6 +6,7 @@ TESTDLL = ws2_32.dll
IMPORTS
=
ws2_32
CTESTS
=
\
protocol.c
\
sock.c
@MAKE_TEST_RULES@
...
...
dlls/winsock/tests/protocol.c
0 → 100644
View file @
bec06ad7
/*
* Unit test suite for protocol functions
*
* Copyright 2004 Hans Leidekker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winsock2.h>
#include "wine/test.h"
#include "wine/debug.h"
static
void
test_WSAEnumProtocolsA
()
{
INT
ret
;
DWORD
len
=
0
;
WSAPROTOCOL_INFOA
info
,
*
buffer
;
ret
=
WSAEnumProtocolsA
(
NULL
,
NULL
,
&
len
);
ok
(
ret
==
SOCKET_ERROR
,
"WSAEnumProtocolsA() succeeded unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
len
=
0
;
ret
=
WSAEnumProtocolsA
(
NULL
,
&
info
,
&
len
);
ok
(
ret
==
SOCKET_ERROR
,
"WSAEnumProtocolsA() succeeded unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
buffer
)
{
INT
i
;
ret
=
WSAEnumProtocolsA
(
NULL
,
buffer
,
&
len
);
ok
(
ret
!=
SOCKET_ERROR
,
"WSAEnumProtocolsA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
for
(
i
=
0
;
i
<
ret
;
i
++
)
{
ok
(
strlen
(
buffer
[
i
].
szProtocol
),
"No protocol name found
\n
"
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
static
void
test_WSAEnumProtocolsW
()
{
INT
ret
;
DWORD
len
=
0
;
WSAPROTOCOL_INFOW
info
,
*
buffer
;
ret
=
WSAEnumProtocolsW
(
NULL
,
NULL
,
&
len
);
ok
(
ret
==
SOCKET_ERROR
,
"WSAEnumProtocolsW() succeeded unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
len
=
0
;
ret
=
WSAEnumProtocolsW
(
NULL
,
&
info
,
&
len
);
ok
(
ret
==
SOCKET_ERROR
,
"WSAEnumProtocolsW() succeeded unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
buffer
)
{
INT
i
;
ret
=
WSAEnumProtocolsW
(
NULL
,
buffer
,
&
len
);
ok
(
ret
!=
SOCKET_ERROR
,
"WSAEnumProtocolsW() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
for
(
i
=
0
;
i
<
ret
;
i
++
)
{
ok
(
lstrlenW
(
buffer
[
i
].
szProtocol
),
"No protocol name found
\n
"
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
START_TEST
(
protocol
)
{
WSADATA
data
;
WORD
version
=
MAKEWORD
(
2
,
2
);
if
(
WSAStartup
(
version
,
&
data
))
return
;
test_WSAEnumProtocolsA
();
test_WSAEnumProtocolsW
();
}
dlls/winsock/ws2_32.spec
View file @
bec06ad7
...
...
@@ -86,7 +86,7 @@
82 stdcall WSAWaitForMultipleEvents(long ptr long long long) kernel32.WaitForMultipleObjectsEx
83 stdcall WSCDeinstallProvider(ptr ptr)
84 stub WSCEnableNSProvider
85 st
ub WSCEnumProtocols
85 st
dcall WSCEnumProtocols(ptr ptr ptr ptr)
86 stub WSCGetProviderPath
87 stub WSCInstallNameSpace
88 stdcall WSCInstallProvider(ptr wstr ptr long ptr)
...
...
include/winsock2.h
View file @
bec06ad7
...
...
@@ -176,6 +176,31 @@ typedef struct _WSAPROTOCOLCHAIN
DWORD
ChainEntries
[
MAX_PROTOCOL_CHAIN
];
/* a list of dwCatalogEntryIds */
}
WSAPROTOCOLCHAIN
,
*
LPWSAPROTOCOLCHAIN
;
#define XP1_CONNECTIONLESS 0x00000001
#define XP1_GUARANTEED_DELIVERY 0x00000002
#define XP1_GUARANTEED_ORDER 0x00000004
#define XP1_MESSAGE_ORIENTED 0x00000008
#define XP1_PSEUDO_STREAM 0x00000010
#define XP1_GRACEFUL_CLOSE 0x00000020
#define XP1_EXPEDITED_DATA 0x00000040
#define XP1_CONNECT_DATA 0x00000080
#define XP1_DISCONNECT_DATA 0x00000100
#define XP1_SUPPORT_BROADCAST 0x00000200
#define XP1_SUPPORT_MULTIPOINT 0x00000400
#define XP1_MULTIPOINT_CONTROL_PLANE 0x00000800
#define XP1_MULTIPOINT_DATA_PLANE 0x00001000
#define XP1_QOS_SUPPORTED 0x00002000
#define XP1_INTERRUPT 0x00004000
#define XP1_UNI_SEND 0x00008000
#define XP1_UNI_RECV 0x00010000
#define XP1_IFS_HANDLES 0x00020000
#define XP1_PARTIAL_MESSAGE 0x00040000
#define BIGENDIAN 0x0000
#define LITTLEENDIAN 0x0001
#define SECURITY_PROTOCOL_NONE 0x0000
#define WSAPROTOCOL_LEN 255
typedef
struct
_WSAPROTOCOL_INFOA
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment