home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl502b.zip / lib / DPI.pm < prev    next >
Text File  |  1996-02-23  |  4KB  |  173 lines

  1. package DPI;
  2.  
  3. require Exporter;
  4. require DynaLoader;
  5. require AutoLoader;
  6.  
  7. @ISA = qw(Exporter DynaLoader);
  8. # Items to export into callers namespace by default. Note: do not export
  9. # names by default without a very good reason. Use EXPORT_OK instead.
  10. # Do not simply export all your public functions/methods/constants.
  11. @EXPORT = qw(
  12.  
  13. DPIawait_packet_from_agent
  14. DPIconnect_to_agent_NMQ
  15. DPIconnect_to_agent_TCP
  16. DPIconnect_to_agent_UDP
  17. DPIdisconnect_from_agent
  18. DPIsend_packet_to_agent
  19. DPIdebug
  20. fDPIparse
  21. fDPIset
  22. mkDPIAreYouThere
  23. mkDPIclose
  24. mkDPIget
  25. mkDPIhdr
  26. mkDPIhdr_version
  27. mkDPInext
  28. mkDPIopen
  29. mkDPIpacket
  30. mkDPIregister
  31. mkDPIresponse
  32. mkDPIset
  33. mkDPItrap
  34. mkDPIunregister
  35. pDPIpacket
  36.  
  37. DPI_ASCII_CSET
  38. DPI_BULK_NO
  39. DPI_BULK_YES
  40. DPI_NATIVE_CSET
  41. DPI_RC_EOF
  42. DPI_RC_INVALID_HANDLE
  43. DPI_RC_IO_ERROR
  44. DPI_RC_NOK
  45. DPI_RC_NO_CONNECTION
  46. DPI_RC_NO_PORT
  47. DPI_RC_OK
  48. DPI_RC_PACKET_TOO_LARGE
  49. DPI_RC_TIMEOUT
  50. DPI_VIEW_NO
  51. DPI_VIEW_YES
  52. SNMP_CLOSE_authenticationFailure
  53. SNMP_CLOSE_byManager
  54. SNMP_CLOSE_goingDown
  55. SNMP_CLOSE_openError
  56. SNMP_CLOSE_otherReason
  57. SNMP_CLOSE_protocolError
  58. SNMP_CLOSE_timeout
  59. SNMP_CLOSE_unsupportedVersion
  60. SNMP_DPI_ARE_YOU_THERE
  61. SNMP_DPI_BUFSIZE
  62. SNMP_DPI_BULK_SELECTION
  63. SNMP_DPI_CLOSE
  64. SNMP_DPI_COMMIT
  65. SNMP_DPI_GET
  66. SNMP_DPI_GETBULK
  67. SNMP_DPI_GETNEXT
  68. SNMP_DPI_INFORM
  69. SNMP_DPI_OPEN
  70. SNMP_DPI_PROTOCOL
  71. SNMP_DPI_REGISTER
  72. SNMP_DPI_RELEASE
  73. SNMP_DPI_RESPONSE
  74. SNMP_DPI_SET
  75. SNMP_DPI_TRAP
  76. SNMP_DPI_TRAPV1
  77. SNMP_DPI_TRAPV2
  78. SNMP_DPI_UNDO
  79. SNMP_DPI_UNREGISTER
  80. SNMP_DPI_VERSION
  81. SNMP_DPI_VIEW_SELECTION
  82. SNMP_ERROR_DPI_alreadyRegistered
  83. SNMP_ERROR_DPI_characterSetSelectionNotSupported
  84. SNMP_ERROR_DPI_duplicateSubAgentIdentifier
  85. SNMP_ERROR_DPI_getBulkSelectionNotSupported
  86. SNMP_ERROR_DPI_higherPriorityRegistered
  87. SNMP_ERROR_DPI_invalidDisplayString
  88. SNMP_ERROR_DPI_mustOpenFirst
  89. SNMP_ERROR_DPI_noError
  90. SNMP_ERROR_DPI_notAuthorized
  91. SNMP_ERROR_DPI_notFound
  92. SNMP_ERROR_DPI_otherError
  93. SNMP_ERROR_DPI_viewSelectionNotSupported
  94. SNMP_ERROR_authorizationError
  95. SNMP_ERROR_badValue
  96. SNMP_ERROR_commitFailed
  97. SNMP_ERROR_genErr
  98. SNMP_ERROR_inconsistentName
  99. SNMP_ERROR_inconsistentValue
  100. SNMP_ERROR_noAccess
  101. SNMP_ERROR_noCreation
  102. SNMP_ERROR_noError
  103. SNMP_ERROR_noSuchName
  104. SNMP_ERROR_notWritable
  105. SNMP_ERROR_readOnly
  106. SNMP_ERROR_resourceUnavailable
  107. SNMP_ERROR_tooBig
  108. SNMP_ERROR_undoFailed
  109. SNMP_ERROR_wrongEncoding
  110. SNMP_ERROR_wrongLength
  111. SNMP_ERROR_wrongType
  112. SNMP_ERROR_wrongValue
  113. SNMP_TYPE_BIT_STRING
  114. SNMP_TYPE_Counter32
  115. SNMP_TYPE_Counter64
  116. SNMP_TYPE_DisplayString
  117. SNMP_TYPE_Gauge32
  118. SNMP_TYPE_Integer32
  119. SNMP_TYPE_IpAddress
  120. SNMP_TYPE_MASK
  121. SNMP_TYPE_NULL
  122. SNMP_TYPE_NsapAddress
  123. SNMP_TYPE_OBJECT_IDENTIFIER
  124. SNMP_TYPE_OCTET_STRING
  125. SNMP_TYPE_Opaque
  126. SNMP_TYPE_TimeTicks
  127. SNMP_TYPE_UInteger32
  128. SNMP_TYPE_endOfMibView
  129. SNMP_TYPE_noSuchInstance
  130. SNMP_TYPE_noSuchObject
  131. SNMP_UNREGISTER_byManager
  132. SNMP_UNREGISTER_goingDown
  133. SNMP_UNREGISTER_higherPriorityRegistered
  134. SNMP_UNREGISTER_justUnregister
  135. SNMP_UNREGISTER_newRegistration
  136. SNMP_UNREGISTER_otherReason
  137. SNMP_UNREGISTER_timeout
  138. dpiPortForTCP
  139. dpiPortForUDP
  140. );
  141.  
  142. sub AUTOLOAD {
  143.     # This AUTOLOAD is used to 'autoload' constants from the constant()
  144.     # XS function.  If a constant is not found then control is passed
  145.     # to the AUTOLOAD in AutoLoader.
  146.  
  147.     local($constname);
  148.     ($constname = $AUTOLOAD) =~ s/.*:://;
  149.     $val = constant($constname, @_ ? $_[0] : 0);
  150.     if ($! != 0) {
  151.     if ($! =~ /Invalid/) {
  152.         $AutoLoader::AUTOLOAD = $AUTOLOAD;
  153.         goto &AutoLoader::AUTOLOAD;
  154.     }
  155.     else {
  156.         ($pack,$file,$line) = caller;
  157.         die "Your vendor has not defined DPI macro $constname, used at $file line $line.
  158. ";
  159.     }
  160.     }
  161.     eval "sub $AUTOLOAD { $val }";
  162.     goto &$AUTOLOAD;
  163. }
  164.  
  165. bootstrap DPI;
  166.  
  167. # Preloaded methods go here.
  168.  
  169. # Autoload methods go after __END__, and are processed by the autosplit program.
  170.  
  171. 1;
  172. __END__
  173.