Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.5 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. verify.h
  7. WINS defines from ntdef.h
  8. FILE HISTORY:
  9. */
  10. #ifndef _VERIFY_H
  11. #define _VERIFY_H
  12. #ifdef __cplusplus
  13. extern "C"
  14. {
  15. #endif
  16. typedef struct
  17. {
  18. BOOLEAN fQueried;
  19. struct in_addr Server;
  20. struct in_addr RetAddr;
  21. int Valid;
  22. int Failed;
  23. int Retries;
  24. int LastResponse;
  25. int Completed;
  26. } WINSERVERS;
  27. #define MAX_SERVERS 1000
  28. #define NBT_NONCODED_NMSZ 17
  29. #define NBT_NAMESIZE 34
  30. #define WINSTEST_FOUND 0
  31. #define WINSTEST_NOT_FOUND 1
  32. #define WINSTEST_NO_RESPONSE 2
  33. #define WINSTEST_VERIFIED 0
  34. #define WINSTEST_OUT_OF_MEMORY 3
  35. #define WINSTEST_BAD_IP_ADDRESS 4
  36. #define WINSTEST_HOST_NOT_FOUND 5
  37. #define WINSTEST_NOT_VERIFIED 6
  38. #define WINSTEST_INVALID_ARG 7
  39. #define WINSTEST_OPEN_FAILED 8
  40. #define BUFF_SIZE 1024
  41. typedef struct _NameResponse
  42. {
  43. u_short TransactionID;
  44. u_short Flags;
  45. u_short QuestionCount;
  46. u_short AnswerCount;
  47. u_short NSCount;
  48. u_short AdditionalRec;
  49. u_char AnswerName[NBT_NAMESIZE];
  50. u_short AnswerType;
  51. u_short AnswerClass;
  52. u_short AnswerTTL1;
  53. u_short AnswerTTL2;
  54. u_short AnswerLength;
  55. u_short AnswerFlags;
  56. u_short AnswerAddr1;
  57. u_short AnswerAddr2;
  58. } NameResponse;
  59. #define NAME_RESPONSE_BUFFER_SIZE sizeof(NameResponse) * 10
  60. extern int VerifyRemote(IN PCHAR RemoteName, IN PCHAR NBName);
  61. extern INT _stdcall CheckNameConsistency(char * szName);
  62. extern INT _stdcall InitNameConsistency(HINSTANCE hInstance, HWND hWnd);
  63. extern INT _stdcall AddWinsServer(char * szServer, BOOL fVerifyWithPartners);
  64. extern INT _stdcall InitNameCheckSocket();
  65. extern INT _stdcall CloseNameCheckSocket();
  66. extern void _stdcall SendNameQuery(unsigned char *name, u_long winsaddr, u_short TransID);
  67. extern int _stdcall GetNameResponse(u_long *recvaddr, u_short TransactionID);
  68. extern void CreateConsistencyStatusWindow(HINSTANCE hInstance, HWND hWndParent);
  69. extern void DestroyConsistencyStatusWindow();
  70. extern void ClearConsistencyStatusWindow();
  71. extern void EnableConsistencyCloseButton(BOOL bEnable);
  72. extern void AddStatusMessageW(LPCWSTR pszMessage);
  73. extern HWND GetConsistencyStatusWnd();
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77. #endif _VERIFY_H