1 #ifndef HOSTSUTILS_H_INCLUDED 2 #define HOSTSUTILS_H_INCLUDED 3 4 #include "iheader.h" 5 #include "hostscontainer.h" 6 7 typedef enum _HostsUtilsTryResult{ 8 HOSTSUTILS_TRY_BLOCKED = -2, 9 HOSTSUTILS_TRY_NONE = -1, 10 HOSTSUTILS_TRY_OK = 0, 11 HOSTSUTILS_TRY_RECURSED = 1 12 } HostsUtilsTryResult; 13 14 int HostsUtils_GetCName(const char *Domain, 15 char *Buffer, 16 HostsContainer *Container 17 ); 18 19 BOOL HostsUtils_TypeExisting(HostsContainer *Container, 20 const char *Domain, 21 HostsRecordType Type 22 ); 23 24 HostsUtilsTryResult HostsUtils_Try(IHeader *Header, 25 int BufferLength, 26 HostsContainer *Container 27 ); 28 29 int HostsUtils_Query(SOCKET Socket, /* Both for sending and receiving */ 30 Address_Type *BackAddress, 31 int Identifier, 32 const char *Name, 33 DNSRecordType Type 34 ); 35 36 /* Error code returned */ 37 int HostsUtils_CombineRecursedResponse(void *Buffer, /* Include IHeader */ 38 int Bufferlength, 39 char *RecursedEntity, 40 int EntityLength, 41 const char *RecursedDomain 42 ); 43 44 #endif // HOSTSUTILS_H_INCLUDED 45