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.

142 lines
2.9 KiB

  1. //*****************************************************************************
  2. //
  3. // Name: snmpinfo.h
  4. //
  5. // Description:
  6. //
  7. // History:
  8. // 01/13/94 JayPh Created.
  9. //
  10. //*****************************************************************************
  11. //*****************************************************************************
  12. //
  13. // Copyright (c) 1994 by Microsoft Corp. All rights reserved.
  14. //
  15. //*****************************************************************************
  16. //
  17. // Include Files
  18. //
  19. #include "ipexport.h"
  20. #include "ipinfo.h"
  21. #include "llinfo.h"
  22. #include "tcpinfo.h"
  23. //
  24. // Definitions
  25. //
  26. #define MAX_ID_LENGTH 50
  27. // Table Types
  28. #define TYPE_IF 0
  29. #define TYPE_IP 1
  30. #define TYPE_IPADDR 2
  31. #define TYPE_ROUTE 3
  32. #define TYPE_ARP 4
  33. #define TYPE_ICMP 5
  34. #define TYPE_TCP 6
  35. #define TYPE_TCPCONN 7
  36. #define TYPE_UDP 8
  37. #define TYPE_UDPCONN 9
  38. #define TYPE_IP6 10
  39. #define TYPE_TCP6 11
  40. #define TYPE_TCP6CONN 12
  41. #define TYPE_UDP6 13
  42. #define TYPE_UDP6LISTENER 14
  43. #define TYPE_ICMP6 15
  44. #define TYPE_MAX TYPE_ICMP6
  45. //
  46. // Structure Definitions
  47. //
  48. typedef struct _GenericTable {
  49. LIST_ENTRY ListEntry;
  50. } GenericTable;
  51. typedef struct _IfEntry {
  52. LIST_ENTRY ListEntry;
  53. IFEntry Info;
  54. } IfEntry;
  55. typedef struct _IpEntry {
  56. LIST_ENTRY ListEntry;
  57. IPSNMPInfo Info;
  58. } IpEntry;
  59. typedef struct _IpAddrEntry {
  60. LIST_ENTRY ListEntry;
  61. IPAddrEntry Info;
  62. } IpAddrEntry;
  63. typedef struct _RouteEntry {
  64. LIST_ENTRY ListEntry;
  65. IPRouteEntry Info;
  66. } RouteEntry;
  67. typedef struct _ArpEntry {
  68. LIST_ENTRY ListEntry;
  69. IPNetToMediaEntry Info;
  70. } ArpEntry;
  71. typedef struct _IcmpEntry {
  72. LIST_ENTRY ListEntry;
  73. ICMPStats InInfo;
  74. ICMPStats OutInfo;
  75. } IcmpEntry;
  76. typedef struct _Icmp6Entry {
  77. LIST_ENTRY ListEntry;
  78. ICMPv6Stats InInfo;
  79. ICMPv6Stats OutInfo;
  80. } Icmp6Entry;
  81. typedef struct _TcpEntry {
  82. LIST_ENTRY ListEntry;
  83. TCPStats Info;
  84. } TcpEntry;
  85. typedef struct _TcpConnEntry {
  86. LIST_ENTRY ListEntry;
  87. TCPConnTableEntry Info;
  88. } TcpConnEntry;
  89. typedef struct _Tcp6ConnEntry {
  90. LIST_ENTRY ListEntry;
  91. TCP6ConnTableEntry Info;
  92. } Tcp6ConnEntry;
  93. typedef struct _UdpEntry {
  94. LIST_ENTRY ListEntry;
  95. UDPStats Info;
  96. } UdpEntry;
  97. typedef struct _UdpConnEntry {
  98. LIST_ENTRY ListEntry;
  99. UDPEntry Info;
  100. } UdpConnEntry;
  101. typedef struct _Udp6ListenerEntry {
  102. LIST_ENTRY ListEntry;
  103. UDP6ListenerEntry Info;
  104. } Udp6ListenerEntry;
  105. //
  106. // Function Prototypes
  107. //
  108. ulong InitSnmp( void );
  109. void *GetTable( ulong Type, ulong *pResult );
  110. void FreeTable( GenericTable *pList );
  111. ulong MapSnmpErrorToNt( ulong ErrCode );
  112. ulong InetEqual( uchar *Inet1, uchar *Inet2 );
  113. ulong PutMsg(ulong Handle, ulong MsgNum, ... );
  114. uchar *LoadMsg( ulong MsgNum, ... );