From 88083048885ef829c5bb947e947918b6dd623aa4 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Mon, 4 Sep 2017 07:56:52 +0200 Subject: [PATCH] afd: rename and restyle msafd provider guid list, add labels --- src/afd.h | 21 +++++++++++---------- src/epoll.c | 6 +++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/afd.h b/src/afd.h index 00b40cd..7c805b6 100644 --- a/src/afd.h +++ b/src/afd.h @@ -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_ */ diff --git a/src/epoll.c b/src/epoll.c index 87665b9..011491e 100644 --- a/src/epoll.c +++ b/src/epoll.c @@ -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; }