cache_snmp.h
上传用户:liugui
上传日期:2007-01-04
资源大小:822k
文件大小:4k
源码类别:

代理服务器

开发平台:

Unix_Linux

  1. /*
  2.  * $Id: cache_snmp.h,v 1.22 1999/01/26 06:16:30 glenn Exp $
  3.  */
  4. #ifdef SQUID_SNMP
  5. #ifndef CACHE_SNMP_H
  6. #define CACHE_SNMP_H
  7. #if SIZEOF_LONG == 8
  8. #define snint int
  9. #else
  10. #define snint long
  11. #endif
  12. #ifndef MIN
  13. #define MIN(a,b) (a<b?a:b)
  14. #endif
  15. #include "snmp.h"
  16. #include "snmp_impl.h"
  17. #include "asn1.h"
  18. #include "snmp_api.h"
  19. #include "snmp_vars.h"
  20. /* MIB definitions
  21.  * SQUID-MIB
  22.  *  .iso.org.dod.internet.private.enterprises.nlanr.squid
  23.  *   1   3   6     1        4         1      3495    1
  24.  *
  25.  * PROXY-MIB
  26.  * .iso.org.dod.internet.experimental.nsfnet.proxy
  27.  *   1   3   6     1          3         25    17
  28.  */
  29. #define SQUIDMIB 1, 3, 6, 1, 4, 1, 3495, 1
  30. #define LEN_SQUIDMIB 8
  31. /* basic groups under .squid */
  32. #define SQ_SYS  SQUIDMIB, 1
  33. #define LEN_SQ_SYS LEN_SQUIDMIB+1
  34. #define SQ_CONF SQUIDMIB, 2
  35. #define LEN_SQ_CONF LEN_SQUIDMIB+1
  36. #define SQ_PRF  SQUIDMIB, 3
  37. #define LEN_SQ_PRF LEN_SQUIDMIB+1
  38. #define SQ_NET  SQUIDMIB, 4
  39. #define LEN_SQ_NET LEN_SQUIDMIB+1
  40. #define SQ_MESH  SQUIDMIB, 5
  41. #define LEN_SQ_MESH LEN_SQUIDMIB+1
  42. /* 
  43. cacheSystem group 
  44. */
  45. enum {
  46.     SYS_START,
  47.     SYSVMSIZ,
  48.     SYSSTOR,
  49.     SYS_UPTIME,
  50.     SYS_END
  51. };
  52. /* 
  53. cacheConfig group 
  54. */
  55. enum {
  56.     CONF_START,
  57.     CONF_ADMIN,
  58.     CONF_VERSION,
  59.     CONF_VERSION_ID,
  60.     CONF_LOG_FAC,
  61.     CONF_STORAGE,
  62.     CONF_END
  63. };
  64. enum {
  65.     CONF_ST_START,
  66.     CONF_ST_MMAXSZ,
  67.     CONF_ST_SWMAXSZ,
  68.     CONF_ST_SWHIWM,
  69.     CONF_ST_SWLOWM,
  70.     CONF_ST_END
  71. };
  72. /* 
  73. cacheMesh group 
  74. */
  75. enum {
  76.     MESH_START,
  77.     MESH_PTBL,
  78.     MESH_CTBL,
  79.     MESH_END
  80. };
  81. enum { /* cachePeerTable */
  82.     MESH_PTBL_START,
  83.     MESH_PTBL_NAME,
  84.     MESH_PTBL_IP,
  85.     MESH_PTBL_HTTP,
  86.     MESH_PTBL_ICP,
  87.     MESH_PTBL_TYPE,
  88.     MESH_PTBL_STATE,
  89.     MESH_PTBL_SENT,
  90.     MESH_PTBL_PACKED,
  91.     MESH_PTBL_FETCHES,
  92.     MESH_PTBL_RTT,
  93.     MESH_PTBL_IGN,
  94.     MESH_PTBL_KEEPAL_S,
  95.     MESH_PTBL_KEEPAL_R,
  96.     MESH_PTBL_END
  97. };
  98. enum { /* cacheClientTable */
  99.     MESH_CTBL_START,
  100.     MESH_CTBL_ADDR,
  101.     MESH_CTBL_HTREQ,
  102.     MESH_CTBL_HTBYTES,
  103.     MESH_CTBL_HTHITS,
  104.     MESH_CTBL_HTHITBYTES,
  105.     MESH_CTBL_ICPREQ,
  106.     MESH_CTBL_ICPBYTES,
  107.     MESH_CTBL_ICPHITS,
  108.     MESH_CTBL_ICPHITBYTES,
  109.     MESH_CTBL_END
  110. };
  111. /* 
  112. cacheNetwork group 
  113. */
  114. enum {
  115.     IP_START,
  116.     IP_ENT,
  117.     IP_REQ,
  118.     IP_HITS,
  119.     IP_PENDHIT,
  120.     IP_NEGHIT,
  121.     IP_MISS,
  122.     IP_GHBN,
  123.     IP_LOC,
  124.     IP_END
  125. };
  126. enum {
  127.     FQDN_START,
  128.     FQDN_ENT,
  129.     FQDN_REQ,
  130.     FQDN_HITS,
  131.     FQDN_PENDHIT,
  132.     FQDN_NEGHIT,
  133.     FQDN_MISS,
  134.     FQDN_GHBN,
  135.     FQDN_END
  136. };
  137. enum {
  138.     DNS_START,
  139.     DNS_REQ,
  140.     DNS_REP,
  141.     DNS_SERVERS,
  142.     DNS_END
  143. };
  144. /* 
  145. Cache Performance Group 
  146. */
  147. enum {
  148.     PERF_START,
  149.     PERF_SYS,
  150.     PERF_PROTO,
  151.     PERF_PEER,
  152.     PERF_END
  153. };
  154. enum {
  155.     PERF_SYS_START,
  156.     PERF_SYS_PF,
  157.     PERF_SYS_NUMR,
  158.     PERF_SYS_DEFR,
  159.     PERF_SYS_MEMUSAGE,
  160.     PERF_SYS_CPUUSAGE,
  161.     PERF_SYS_MAXRESSZ,
  162.     PERF_SYS_NUMOBJCNT,
  163.     PERF_SYS_CURLRUEXP,
  164.     PERF_SYS_CURUNLREQ,
  165.     PERF_SYS_CURUNUSED_FD,
  166.     PERF_SYS_CURRESERVED_FD,
  167.     PERF_SYS_END
  168. };
  169. enum {
  170.     PERF_PROTOSTAT_START,
  171.     PERF_PROTOSTAT_AGGR,
  172.     PERF_PROTOSTAT_MEDIAN,
  173.     PERF_PROTOSTAT_END
  174. };
  175. enum {
  176.     PERF_PROTOSTAT_AGGR_START,
  177.     PERF_PROTOSTAT_AGGR_HTTP_REQ,
  178.     PERF_PROTOSTAT_AGGR_HTTP_HITS,
  179.     PERF_PROTOSTAT_AGGR_HTTP_ERRORS,
  180.     PERF_PROTOSTAT_AGGR_HTTP_KBYTES_IN,
  181.     PERF_PROTOSTAT_AGGR_HTTP_KBYTES_OUT,
  182.     PERF_PROTOSTAT_AGGR_ICP_S,
  183.     PERF_PROTOSTAT_AGGR_ICP_R,
  184.     PERF_PROTOSTAT_AGGR_ICP_SKB,
  185.     PERF_PROTOSTAT_AGGR_ICP_RKB,
  186.     PERF_PROTOSTAT_AGGR_REQ,
  187.     PERF_PROTOSTAT_AGGR_ERRORS,
  188.     PERF_PROTOSTAT_AGGR_KBYTES_IN,
  189.     PERF_PROTOSTAT_AGGR_KBYTES_OUT,
  190.     PERF_PROTOSTAT_AGGR_CURSWAP,
  191.     PERF_PROTOSTAT_AGGR_CLIENTS,
  192.     PERF_PROTOSTAT_AGGR_END
  193. };
  194. enum {
  195.     PERF_MEDIAN_START,
  196.     PERF_MEDIAN_TIME,
  197.     PERF_MEDIAN_HTTP_ALL,
  198.     PERF_MEDIAN_HTTP_MISS,
  199.     PERF_MEDIAN_HTTP_NM,
  200.     PERF_MEDIAN_HTTP_HIT,
  201.     PERF_MEDIAN_ICP_QUERY,
  202.     PERF_MEDIAN_ICP_REPLY,
  203.     PERF_MEDIAN_DNS,
  204.     PERF_MEDIAN_RHR,
  205.     PERF_MEDIAN_BHR,
  206.     PERF_MEDIAN_END
  207. };
  208. #endif
  209. #endif