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.

73 lines
1.6 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 1998 **/
  4. /**********************************************************************/
  5. /*
  6. winsmon.h
  7. wins monitoring defines
  8. FILE HISTORY:
  9. */
  10. #ifndef _WINSMON_H
  11. #define _WINSMON_H
  12. // wins monitoring stuff
  13. #define STR_BUF_SIZE 255
  14. //
  15. // WINS related constants
  16. //
  17. #define NM_QRY_XID 0x6DFC
  18. const u_short NBT_NAME_SERVICE_PORT = htons(137); // UDP
  19. const int NBT_NAME_SIZE = 32;
  20. const int MAX_NBT_PACKET_SIZE = 1500;
  21. const WORD NBT_NM_OPC_REQUEST = 0x0000;
  22. const WORD NBT_NM_OPC_RESPONSE = 0x0080;
  23. const WORD NBT_NM_OPC_QUERY = 0x0000;
  24. const WORD NBT_NM_OPC_REGISTRATION = 0x0028;
  25. const WORD NBT_NM_OPC_RELEASE = 0x0030;
  26. const WORD NBT_NM_OPC_WACK = 0x0038;
  27. const WORD NBT_NM_OPC_REFRESH = 0x0040;
  28. //
  29. // Name Service Flags
  30. //
  31. const WORD NBT_NM_FLG_BCAST = 0x1000;
  32. const WORD NBT_NM_FLG_RECURS_AVAIL = 0x8000;
  33. const WORD NBT_NM_FLG_RECURS_DESRD = 0x0001;
  34. const WORD NBT_NM_FLG_TRUNCATED = 0x0002;
  35. const WORD NBT_NM_FLG_AUTHORITATIV = 0x0004;
  36. //
  37. // Name Service question types
  38. //
  39. const WORD NBT_NM_QTYP_NB = 0x2000;
  40. const WORD NBT_NM_QTYP_NBSTAT = 0x2100;
  41. const WORD NBT_NM_QCLASS_IN = 0x0100;
  42. typedef struct {
  43. WORD xid;
  44. WORD flags;
  45. WORD question_cnt;
  46. WORD answer_cnt;
  47. WORD name_serv_cnt;
  48. WORD additional_cnt;
  49. } NM_FRAME_HDR;
  50. typedef struct {
  51. BYTE q_name[NBT_NAME_SIZE+2];
  52. WORD q_type;
  53. WORD q_class;
  54. } NM_QUESTION_SECT;
  55. #endif