18#define WsTcLock() EnterCriticalSection(&Catalog->Lock)
19#define WsTcUnlock() LeaveCriticalSection(&Catalog->Lock)
43 HKEY CatalogKey, NewKey;
57 "Current_Protocol_Catalog",
64 static const CHAR DefaultCatalogName[] =
"Protocol_Catalog9";
65 RegSize =
sizeof(DefaultCatalogName);
67 memcpy(CatalogKeyName, DefaultCatalogName, RegSize);
79 DPRINT1(
"Protocol catalog name is not a string (Type %d).\n", RegType);
87 "Current_Protocol_Catalog",
123 RegSize =
sizeof(
DWORD);
133 "Num_Catalog_Entries",
148 "Next_Catalog_Entry_ID",
197 RegSize =
sizeof(
DWORD);
221 Catalog->CatalogKey = CatalogKey;
254 DWORD CatalogEntries;
256 DWORD NextCatalogEntry;
288 if (UniqueId == Catalog->UniqueId)
310 "Next_Catalog_Entry_ID",
313 (
LPBYTE)&NextCatalogEntry,
324 "Num_Catalog_Entries",
337 for (
i = 1;
i <= CatalogEntries;
i++)
374 Catalog->UniqueId = UniqueId;
375 Catalog->NextId = NextCatalogEntry;
389 }
while (NewChangesMade);
412 *CatalogEntry =
NULL;
418 NextEntry = Catalog->ProtocolList.
Flink;
419 while (NextEntry != &Catalog->ProtocolList)
423 NextEntry = NextEntry->
Flink;
429 if (!
Entry->Provider)
440 *CatalogEntry =
Entry;
467 NextEntry = Catalog->ProtocolList.
Flink;
468 while (NextEntry != &Catalog->ProtocolList)
472 NextEntry = NextEntry->
Flink;
478 if (!
Entry->Provider)
486 *CatalogEntry =
Entry;
514 *CatalogEntry =
NULL;
519 NextEntry = Catalog->ProtocolList.
Flink;
525 while (NextEntry != &Catalog->ProtocolList)
529 NextEntry = NextEntry->
Flink;
532 if (
Entry->ProtocolInfo.dwCatalogEntryId == StartId)
break;
537 while (NextEntry != &Catalog->ProtocolList)
541 NextEntry = NextEntry->
Flink;
544 if ((
Entry->ProtocolInfo.iAddressFamily == af) || (af ==
AF_UNSPEC))
547 if ((
Entry->ProtocolInfo.iSocketType ==
type) || (
type == 0))
551 ((
Entry->ProtocolInfo.iProtocol +
556 if (!
Entry->Provider)
567 *CatalogEntry =
Entry;
604 Entry = Catalog->ProtocolList.Flink;
605 while (
Entry != &Catalog->ProtocolList)
634 DPRINT(
"WsTcLoadProvider: %p, %p\n", Catalog, CatalogEntry);
640 if (!CatalogEntry->Provider)
644 &CatalogEntry->ProtocolInfo.ProviderId);
660 CatalogEntry->DllPath,
661 &CatalogEntry->ProtocolInfo);
709 while (
Entry != &TempList)
721 CatalogEntry = OldCatalogEntry;
725 Catalog->ItemCount--;
732 Catalog->ItemCount++;
743 Catalog->ItemCount--;
762 Entry = Catalog->ProtocolList.Flink;
763 while (GoOn && (
Entry != &Catalog->ProtocolList))
799 Entry = Catalog->ProtocolList.Flink;
800 while (
Entry != &Catalog->ProtocolList)
826 UniqueId = Catalog->UniqueId;
832 OptionLength =
sizeof(ProtocolInfo);
836 (
PCHAR)&ProtocolInfo,
846 if (UniqueId == Catalog->UniqueId)
continue;
878 Catalog->ItemCount--;
889 if (!Catalog->ProtocolList.Flink)
return;
895 Entry = Catalog->ProtocolList.Flink;
896 while (
Entry != &Catalog->ProtocolList)
906 Entry = Catalog->ProtocolList.Flink;
910 if (Catalog->CatalogKey)
914 Catalog->CatalogKey =
NULL;
#define InterlockedIncrement
#define RegCloseKey(hKey)
VOID WSAAPI WsTcRemoveCatalogItem(IN PTCATALOG Catalog, IN PTCATALOG_ENTRY Entry)
VOID WSAAPI WsTcUpdateProtocolList(IN PTCATALOG Catalog, IN PLIST_ENTRY List)
DWORD WSAAPI WsTcGetEntryFromTriplet(IN PTCATALOG Catalog, IN INT af, IN INT type, IN INT protocol, IN DWORD StartId, IN PTCATALOG_ENTRY *CatalogEntry)
PTCATALOG WSAAPI WsTcAllocate(VOID)
DWORD WSAAPI WsTcGetEntryFromAf(IN PTCATALOG Catalog, IN INT AddressFamily, IN PTCATALOG_ENTRY *CatalogEntry)
DWORD WSAAPI WsTcLoadProvider(IN PTCATALOG Catalog, IN PTCATALOG_ENTRY CatalogEntry)
DWORD WSAAPI WsTcRefreshFromRegistry(IN PTCATALOG Catalog, IN HANDLE CatalogEvent)
VOID WSAAPI WsTcEnumerateCatalogItems(IN PTCATALOG Catalog, IN PTCATALOG_ENUMERATE_PROC Callback, IN PVOID Context)
DWORD WSAAPI WsTcFindIfsProviderForSocket(IN PTCATALOG Catalog, IN SOCKET Handle)
PTPROVIDER WSAAPI WsTcFindProvider(IN PTCATALOG Catalog, IN LPGUID ProviderId)
DWORD WSAAPI WsTcGetEntryFromCatalogEntryId(IN PTCATALOG Catalog, IN DWORD CatalogEntryId, IN PTCATALOG_ENTRY *CatalogEntry)
DWORD WSAAPI WsTcInitializeFromRegistry(IN PTCATALOG Catalog, IN HKEY ParentKey, IN HANDLE CatalogEvent)
VOID WSAAPI WsTcDelete(IN PTCATALOG Catalog)
BOOL WSAAPI WsTcOpen(IN PTCATALOG Catalog, IN HKEY ParentKey)
#define HeapFree(x, y, z)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
GLuint GLuint GLsizei GLenum type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
#define ERROR_FILE_NOT_FOUND
_In_ NDIS_ERROR_CODE ErrorCode
IN PCO_ADDRESS_FAMILY AddressFamily
#define REG_OPTION_NON_VOLATILE
#define REG_CREATED_NEW_KEY
#define REG_OPENED_EXISTING_KEY
#define IsEqualGUID(rguid1, rguid2)
SOCKET WSPAPI WPUModifyIFSHandle(IN DWORD dwCatalogEntryId, IN SOCKET ProposedHandle, OUT LPINT lpErrno)
base of all file and directory entries
struct _LIST_ENTRY * Flink
WSAPROTOCOL_INFOW ProtocolInfo
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define CONTAINING_RECORD(address, type, field)
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
_Must_inspect_result_ _In_opt_ WDFKEY _In_ PCUNICODE_STRING _In_ ACCESS_MASK _In_ ULONG _Out_opt_ PULONG CreateDisposition
_Must_inspect_result_ _In_opt_ WDFKEY ParentKey
_Must_inspect_result_ _In_ WDFCMRESLIST List
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define WSASYSCALLFAILURE
#define WSAEPROTONOSUPPORT
#define WSAESOCKTNOSUPPORT
#define SO_PROTOCOL_INFOW
#define WSA_NOT_ENOUGH_MEMORY
DWORD WSAAPI WsTcEntryInitializeFromRegistry(IN PTCATALOG_ENTRY CatalogEntry, IN HKEY, unsigned long)
PTCATALOG_ENTRY WSAAPI WsTcEntryAllocate(VOID)
INT WSAAPI WsSetupCatalogProtection(IN HKEY CatalogKey, IN HANDLE CatalogEvent, OUT LPDWORD UniqueId)
VOID WSAAPI WsTcEntrySetProvider(IN PTCATALOG_ENTRY CatalogEntry, IN PTPROVIDER Provider)
VOID WSAAPI WsTcEntryDereference(IN PTCATALOG_ENTRY CatalogEntry)
BOOL(WINAPI * PTCATALOG_ENUMERATE_PROC)(IN PVOID Context, IN PTCATALOG_ENTRY Entry)
VOID WSAAPI WsTpDereference(IN PTPROVIDER Provider)
BOOL WSAAPI WsCheckCatalogState(IN HANDLE Event)
PTPROVIDER WSAAPI WsTpAllocate(VOID)
DWORD WSAAPI WsTpInitialize(IN PTPROVIDER Provider, IN LPSTR DllName, LPWSAPROTOCOL_INFOW ProtocolInfo)