Leaked source code of windows server 2003
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.

107 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 2002-2003 Microsoft Corporation
  3. Module Name:
  4. tcpioctl.h
  5. Abstract:
  6. This module contains definitions for IOCTL_TCP_QUERY_INFORMATION_EX.
  7. CAVEAT: IPHLPAPI provides cleaner API's to access this information.
  8. --*/
  9. #ifndef _TCPIOCTL_
  10. #define _TCPIOCTL_
  11. #define FSCTL_TCP_BASE FILE_DEVICE_NETWORK
  12. #define _TCP_CTL_CODE(function, method, access) \
  13. CTL_CODE(FSCTL_TCP_BASE, function, method, access)
  14. #define IOCTL_TCP_QUERY_INFORMATION_EX \
  15. _TCP_CTL_CODE(0, METHOD_NEITHER, FILE_ANY_ACCESS)
  16. #define DD_TCP_DEVICE_NAME L"\\Device\\Tcp"
  17. #define IF_MIB_STATS_ID 1
  18. #define IP_MIB_STATS_ID 1
  19. #define IP_MIB_ADDRTABLE_ENTRY_ID 0x102
  20. #define IP_INTFC_INFO_ID 0x103
  21. #define MAX_PHYSADDR_SIZE 8
  22. typedef struct IFEntry {
  23. ulong if_index;
  24. ulong if_type;
  25. ulong if_mtu;
  26. ulong if_speed;
  27. ulong if_physaddrlen;
  28. uchar if_physaddr[MAX_PHYSADDR_SIZE];
  29. ulong if_adminstatus;
  30. ulong if_operstatus;
  31. ulong if_lastchange;
  32. ulong if_inoctets;
  33. ulong if_inucastpkts;
  34. ulong if_innucastpkts;
  35. ulong if_indiscards;
  36. ulong if_inerrors;
  37. ulong if_inunknownprotos;
  38. ulong if_outoctets;
  39. ulong if_outucastpkts;
  40. ulong if_outnucastpkts;
  41. ulong if_outdiscards;
  42. ulong if_outerrors;
  43. ulong if_outqlen;
  44. ulong if_descrlen;
  45. uchar if_descr[1];
  46. } IFEntry;
  47. typedef struct IPSNMPInfo {
  48. ulong ipsi_forwarding;
  49. ulong ipsi_defaultttl;
  50. ulong ipsi_inreceives;
  51. ulong ipsi_inhdrerrors;
  52. ulong ipsi_inaddrerrors;
  53. ulong ipsi_forwdatagrams;
  54. ulong ipsi_inunknownprotos;
  55. ulong ipsi_indiscards;
  56. ulong ipsi_indelivers;
  57. ulong ipsi_outrequests;
  58. ulong ipsi_routingdiscards;
  59. ulong ipsi_outdiscards;
  60. ulong ipsi_outnoroutes;
  61. ulong ipsi_reasmtimeout;
  62. ulong ipsi_reasmreqds;
  63. ulong ipsi_reasmoks;
  64. ulong ipsi_reasmfails;
  65. ulong ipsi_fragoks;
  66. ulong ipsi_fragfails;
  67. ulong ipsi_fragcreates;
  68. ulong ipsi_numif;
  69. ulong ipsi_numaddr;
  70. ulong ipsi_numroutes;
  71. } IPSNMPInfo;
  72. typedef struct IPAddrEntry {
  73. ulong iae_addr;
  74. ulong iae_index;
  75. ulong iae_mask;
  76. ulong iae_bcastaddr;
  77. ulong iae_reasmsize;
  78. ushort iae_context;
  79. ushort iae_pad;
  80. } IPAddrEntry;
  81. typedef struct IPInterfaceInfo {
  82. ulong iii_flags;
  83. ulong iii_mtu;
  84. ulong iii_speed;
  85. ulong iii_addrlength;
  86. uchar iii_addr[1];
  87. } IPInterfaceInfo;
  88. #endif // _TCPIOCTL_