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.

94 lines
3.7 KiB

  1. /*****************************************************************************
  2. *
  3. * $Workfile: StdOids.cpp $
  4. *
  5. * Copyright (C) 1997 Hewlett-Packard Company.
  6. * Copyright (C) 1997 Microsoft Corporation.
  7. * All rights reserved.
  8. *
  9. * 11311 Chinden Blvd.
  10. * Boise, Idaho 83714
  11. *
  12. *****************************************************************************/
  13. #include "precomp.h"
  14. #include "stdoids.h"
  15. // MIB2 group
  16. UINT OID_Mib2_Prefix[] = { 1, 3, 6, 1, 2, 1 };
  17. AsnObjectIdentifier MIB2_OidPrefix = { OID_SIZEOF(OID_Mib2_Prefix), OID_Mib2_Prefix };
  18. // All leaf variables have a zero appended to their OID to indicate
  19. // that it is the only instance of this variable and it exists.
  20. // all others are used for GetNext purposes, and they are located in a table
  21. // MIB2 - system group
  22. UINT OID_Mib2_sysDescr[] = { 1, 3, 6, 1, 2, 1, 1, 1, 0 };
  23. UINT OID_Mib2_sysContact[] = { 1, 3, 6, 1, 2, 1, 1, 4, 0};
  24. // MIB2 - interfaces group
  25. UINT OID_Mib2_ifType[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 3 };
  26. AsnObjectIdentifier OID_Mib2_ifTypeTree = { OID_SIZEOF(OID_Mib2_ifType), OID_Mib2_ifType };
  27. UINT OID_Mib2_ifPhysAddress[] = { 1, 3, 6, 1, 2, 1, 2, 2, 1, 6 };
  28. // MIB2 - tcp group
  29. UINT OID_Mib2_tcpConnTable[] = { 1, 3, 6, 1, 2, 1, 6, 13, 1 };
  30. UINT OID_Mib2_tcpConnLocalPort[] = { 1, 3, 6, 1, 2, 1, 6, 13, 1, 3 };
  31. // Printer MIB group
  32. UINT OID_PrtMIB_Prefix[] = { 1, 3, 6, 1, 2, 1, 43 };
  33. AsnObjectIdentifier PrtMIB_OidPrefix = { OID_SIZEOF(OID_PrtMIB_Prefix), OID_PrtMIB_Prefix };
  34. UINT OID_PrtMIB_testPrinterMIB[] = { 1, 3, 6, 1, 2, 1, 43 };
  35. // HR MIB - host resources
  36. UINT OID_HRMIB_hrDeviceType[] = { 1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 2};
  37. UINT OID_HRMIB_hrDeviceDescr[] = { 1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 3};
  38. UINT OID_HRMIB_hrDevicePrinter[] = { 1, 3, 6, 1, 2, 1, 25, 3, 1, 5};
  39. AsnObjectIdentifier HRMIB_hrDevicePrinter = { OID_SIZEOF(OID_HRMIB_hrDevicePrinter), OID_HRMIB_hrDevicePrinter };
  40. // status objects are defined in status .cpp
  41. // OID_HRMIB_hrDeviceStatus[] = { 1, 3, 6, 1, 2, 1, 25, 3, 2, 1, 5, 1};
  42. // OID_HRMIB_hrPrinterStatus[] = { 1, 3, 6, 1, 2, 1, 25, 3, 5, 1, 1, 1};
  43. // OID_HRMIB_hrPrinterDetectedErrorState[] = { 1, 3, 6, 1, 2, 1, 25, 3, 5, 1, 2, 1};
  44. // OT_groups
  45. // tests the existance of Printer MIB in the device
  46. AsnObjectIdentifier OT_TEST_PRINTER_MIB[] = { { OID_SIZEOF(OID_PrtMIB_testPrinterMIB), OID_PrtMIB_testPrinterMIB },
  47. { 0, 0}
  48. };
  49. // identifies the type of device
  50. AsnObjectIdentifier OT_DEVICE_TYPE[] = { { OID_SIZEOF(OID_Mib2_sysDescr), OID_Mib2_sysDescr },
  51. { OID_SIZEOF(OID_Mib2_tcpConnLocalPort), OID_Mib2_tcpConnLocalPort },
  52. { 0, 0}
  53. };
  54. // identifies the ports on the device
  55. AsnObjectIdentifier OT_DEVICE_TCPPORTS[] = { { OID_SIZEOF(OID_Mib2_tcpConnLocalPort), OID_Mib2_tcpConnLocalPort },
  56. { 0, 0}
  57. };
  58. // identifies the hardware address of the device
  59. AsnObjectIdentifier OT_DEVICE_ADDRESS[] = { { OID_SIZEOF(OID_Mib2_ifType), OID_Mib2_ifType },
  60. { OID_SIZEOF(OID_Mib2_ifPhysAddress), OID_Mib2_ifPhysAddress },
  61. { 0, 0}
  62. };
  63. // identifies the MIB 2 device description
  64. AsnObjectIdentifier OT_DEVICE_SYSDESCR[] = { { OID_SIZEOF(OID_Mib2_sysDescr), OID_Mib2_sysDescr },
  65. { 0, 0}
  66. };
  67. // identifies the HR device description (manufacturer id)
  68. AsnObjectIdentifier OT_DEVICE_DESCRIPTION[] = { { OID_SIZEOF(OID_HRMIB_hrDeviceType), OID_HRMIB_hrDeviceType },
  69. { OID_SIZEOF(OID_HRMIB_hrDeviceDescr), OID_HRMIB_hrDeviceDescr },
  70. { 0, 0}
  71. };
  72. // identifies the status of the device defined in status .cpp
  73. // AsnObjectIdentifier OT_DEVICE_STATUS[]