afd: rename and restyle msafd provider guid list, add labels

This commit is contained in:
Bert Belder 2017-09-04 07:56:52 +02:00
parent 5e93699a41
commit 8808304888
2 changed files with 14 additions and 13 deletions

View File

@ -52,18 +52,19 @@ typedef struct _AFD_POLL_INFO {
int afd_poll(SOCKET socket, AFD_POLL_INFO* info, OVERLAPPED* overlapped);
static const GUID AFD_PROVIDER_IDS[] = {
{0xe70f1aa0,
0xab8b,
0x11cf,
/* clang-format off */
static const GUID AFD_PROVIDER_GUID_LIST[] = {
/* MSAFD Tcpip [TCP+UDP+RAW / IP] */
{0xe70f1aa0, 0xab8b, 0x11cf,
{0x8c, 0xa3, 0x00, 0x80, 0x5f, 0x48, 0xa1, 0x92}},
{0xf9eab0c0,
0x26d4,
0x11d0,
/* MSAFD Tcpip [TCP+UDP+RAW / IPv6] */
{0xf9eab0c0, 0x26d4, 0x11d0,
{0xbb, 0xbf, 0x00, 0xaa, 0x00, 0x6c, 0x34, 0xe4}},
{0x9fc48064,
0x7298,
0x43e4,
/* MSAFD RfComm [Bluetooth] */
{0x9fc48064, 0x7298, 0x43e4,
{0xb7, 0xbd, 0x18, 0x1f, 0x20, 0x89, 0x79, 0x2a}}};
/* clang-format on */
#endif /* EPOLL_AFD_H_ */

View File

@ -50,7 +50,7 @@ static int epoll__initialized = 0;
/* State associated with a epoll handle. */
typedef struct epoll_port_data {
HANDLE iocp;
SOCKET peer_sockets[array_count(AFD_PROVIDER_IDS)];
SOCKET peer_sockets[array_count(AFD_PROVIDER_GUID_LIST)];
RB_HEAD(epoll_sock_data_tree, epoll_sock_data) sock_data_tree;
epoll_sock_data_t* attn_list;
size_t pending_reqs_count;
@ -570,9 +570,9 @@ SOCKET epoll__get_peer_socket(epoll_port_data_t* port_data,
SOCKET peer_socket;
index = -1;
for (i = 0; i < array_count(AFD_PROVIDER_IDS); i++) {
for (i = 0; i < array_count(AFD_PROVIDER_GUID_LIST); i++) {
if (memcmp((void*) &protocol_info->ProviderId,
(void*) &AFD_PROVIDER_IDS[i],
(void*) &AFD_PROVIDER_GUID_LIST[i],
sizeof protocol_info->ProviderId) == 0) {
index = i;
}