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.

121 lines
2.2 KiB

  1. //*****************************************************************************
  2. //
  3. // Name: snmputil.h
  4. //
  5. // Description:
  6. //
  7. // History:
  8. // 01/13/94 smanda Created.
  9. // Copied from \sdnt\net\tcpip\commands\common2\common2.h
  10. //
  11. //*****************************************************************************
  12. //*****************************************************************************
  13. //
  14. // Copyright (c) 1994 by Microsoft Corp. All rights reserved.
  15. //
  16. //*****************************************************************************
  17. #ifndef __SNMPUTIL_H__
  18. #define __SNMPUTIL_H__
  19. //
  20. // Include Files
  21. //
  22. #include "ipexport.h"
  23. #include "ipinfo.h"
  24. #include "llinfo.h"
  25. #include "tcpinfo.h"
  26. //
  27. // Definitions
  28. //
  29. #define MAX_ID_LENGTH 50
  30. // Table Types
  31. #define TYPE_IF 0
  32. #define TYPE_IP 1
  33. #define TYPE_IPADDR 2
  34. #define TYPE_ROUTE 3
  35. #define TYPE_ARP 4
  36. #define TYPE_ICMP 5
  37. #define TYPE_TCP 6
  38. #define TYPE_TCPCONN 7
  39. #define TYPE_UDP 8
  40. #define TYPE_UDPCONN 9
  41. //
  42. // Structure Definitions
  43. //
  44. typedef struct _GenericTable {
  45. LIST_ENTRY ListEntry;
  46. } GenericTable;
  47. typedef struct _IfEntry {
  48. LIST_ENTRY ListEntry;
  49. IFEntry Info;
  50. } IfEntry;
  51. typedef struct _IpEntry {
  52. LIST_ENTRY ListEntry;
  53. IPSNMPInfo Info;
  54. } IpEntry;
  55. typedef struct _IpAddrEntry {
  56. LIST_ENTRY ListEntry;
  57. IPAddrEntry Info;
  58. } IpAddrEntry;
  59. typedef struct _RouteEntry {
  60. LIST_ENTRY ListEntry;
  61. IPRouteEntry Info;
  62. } RouteEntry;
  63. typedef struct _ArpEntry {
  64. LIST_ENTRY ListEntry;
  65. IPNetToMediaEntry Info;
  66. } ArpEntry;
  67. typedef struct _IcmpEntry {
  68. LIST_ENTRY ListEntry;
  69. ICMPStats InInfo;
  70. ICMPStats OutInfo;
  71. } IcmpEntry;
  72. typedef struct _TcpEntry {
  73. LIST_ENTRY ListEntry;
  74. TCPStats Info;
  75. } TcpEntry;
  76. typedef struct _TcpConnEntry {
  77. LIST_ENTRY ListEntry;
  78. TCPConnTableEntry Info;
  79. } TcpConnEntry;
  80. typedef struct _UdpEntry {
  81. LIST_ENTRY ListEntry;
  82. UDPStats Info;
  83. } UdpEntry;
  84. typedef struct _UdpConnEntry {
  85. LIST_ENTRY ListEntry;
  86. UDPEntry Info;
  87. } UdpConnEntry;
  88. //
  89. // Function Prototypes
  90. //
  91. ulong InitSnmp( void );
  92. void *GetTable( ulong Type, ulong *pResult );
  93. void FreeTable( GenericTable *pList );
  94. ulong ReadTable( GenericTable *pList, ulong Type, ulong Size );
  95. #endif