⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 ucd-snmp源代码
💻
📖 第 1 页 / 共 3 页
字号:
                         $val = SNMP::mapEnum($varbind);                         # where $varbind is SNMP::Varbind or equiv                         # note: $varbind will be updated                         $val = SNMP::mapEnum('ipForwarding', 'forwarding');                         $val = SNMP::mapEnum('ipForwarding', 1); &SNMP::MainLoop([<timeout>, [<callback>]])                   - to be used with async SNMP::Session                     calls. MainLoop must be called after initial async calls                     so return packets from the agent will not be processed.                     If no args supplied this function enters an infinite loop                     so program must be exited in a callback or externally                     interrupted. If <timeout &SNMP::finish()		   - This function, when called from an SNMP::MainLoop()		     callback function, will cause the current SNMP::MainLoop		     to return after the callback is completed. finish() can		     be used to terminate an otherwise-infinite MainLoop. A		     new MainLoop() instance can then be started to handle		     further requests.Exported SNMP utility functions&snmp_get() - takes args of SNMP::Session::new followed by those of              SNMP::Session::get&snmp_getnext() - takes args of SNMP::Session::new followed by those of                  SNMP::Session::getnext&snmp_set() - takes args of SNMP::Session::new followed by those of              SNMP::Session::set&snmp_trap() - takes args of SNMP::TrapSession::new followed by those of               SNMP::TrapSession::trapNote: utility functions do not support async operation yet.Trouble Shooting:If problems occur there are number areas to look at to narrow down thepossibilities.The first step should be to test the Net-SNMP installationindependently from the Perl5 SNMP interface.Try running the apps from the Net-SNMP distribution.Make sure your agent (snmpd) is running and properly configured withread-write access for the community you are using.Ensure that your MIBs are installed and environment variables are setappropriately (see man mib_api)Be sure to ensure headers and libraries from old CMU installations arenot being used by mistake (see -NET-SNMP-PATH).If the problem occurs during compilation/linking check that the snmplibrary being linked is actually the Net-SNMP library (there have beenname conflicts with existing snmp libs).Also check that the header files are correct and up to date.Sometimes compiling the Net-SNMP library with'position-independent-code' enabled is required (HPUX specifically).If you cannot resolve the problem you can post tocomp.lang.perl.modules or email net-snmp-coders@lists.sourceforge.net.please give sufficient information to analyze the problem (OS type,versions for OS/Perl/net-SNMP/compiler, complete error output, etc.)Acknowledgments:Many thanks to all those who supplied patches, suggestions andfeedback.Wes Hardaker and the net-snmp-codersDave PerkinsMarcel WigetDavid BlackburnJohn StofellGary HaywardClaire HarrisonAchim BohnetDoug KingstonJacques VidrineCarl JacobsenWayne MarquetteScott SchumateMichael SlifcakSrivathsan SrinivasagopalanBill FennerJef PeeraerDaniel HagertyKarl "Rat" Schilke and Electric Lightwave, Inc.Perl5 PortersApologies to any/all who's patch/feature/request was not mentioned orincluded - most likely it was lost when paying work intruded on myfun. Please try again if you do not see a desired feature. This mayactually turn out to be a decent package with such excellent help andthe fact that I have more time to work on it than in the past.------History:Bugs fixed and changes in 3.1.01) update to ucd-snmp-4.1.02) support much of SNMPv33) add support for getbulk - Thanks Daniel4) further regularize error return codes - will return undef on errorfor most cases except where values are expected from a varbind (willthemselves be undef)5) fix bug where session deletion inadvertently occurred with async callsif calling Session went out of scope - a reference is saved which willnot destruct until after async callback completes6) pass protocol errors to callbacks7) added lower level async API so SNMP events can be integrated witharbitrary event loop (Event.pm?) - thanks Jef8) Major enhancement to 'make test' - thanks Sri9) POD documentation - thanks Bill10) fix OBJECTID translations (unsigned long)11) display Mib info on 'status' and 'indexes'Bugs fixed and changes in 1.8.21) minor bug fixBugs fixed and changes in 1.8.11) updated docs2) fixed #defines from MAX_NAME_LEN to MAX_OID_LEN (mslifcak)3) reverted __tag2oid to use read_objid rather than get_node. thisgives full name resolution provided by libsnmp and no longer createsproblems on failure since 3.6.2 removes the call to 'exit' inread_objid4) fixed Makefile.PL to use win32 'type' vs. 'cat'Bugs fixed and changes in 1.81) added async API (async api should be considered beta -   potential changes are most likely in the event loop integration   area - would like to integrate with Event.pm)2) added trap generation API (implemented v1 traps only for now)3) added and exported non-OO utility API (snmp_get, snmp_set, etc.)4) added $SNMP::debugging to dynamically control libsnmp debugging output5) added $SNMP::save_descriptions to control libsnmp parsing/saving   of MIB descriptions6) added $SNMP::dump_packet to control libsnmp packet dumping7) implemented the SNMP::mapEnum function (thanks to Wayne Marquette)8) officially added(documented) tied %SNMP::MIB hash to allow access   to parsed MIB meta-data (new support for textualConvention and syntax)9) fixed bug related to AUTOLOAD recursion10) fixed bug with SNMP::use_enums so 'set' (and trap) should now accept   enums as input values11) fixed bug with fget[next] - formatted values are supplied as return    values as well as within args passed12) fixed Makefile to link with -kstat on solaris13) fixed bug when handling noSuchName returns for getnext calls with    varbinds w/ no iid supplied (__get_label_iid should not use the    FAIL_ON_NULL_IID flag)14) fixed bug with uninitialized sprintval_flag15) fixed bug when no val is passed to SNMP::Session::set - now    will not core or complain about uninitialized data16) fixed bug with __translate_appl_type in case of NULL or empty string17) eliminated the use of strtoul for portability - use sscanf(,"%lu",)18) getType() supports all tag formats now19) fixed bug when setting values of type OBJID (thanks Scott Schumate)20) *WARNING* RetryNoSuch in session creation had a bug which prevented    it from being disabled. It now defaults to being disabled - this may    break code *WARNING*Bugs fixed and changes in 1.71) fixed seg fault on use of unknown/unparsed attribute in Varbind or   passed to translateObj2) fixed truncation of last char of attribute name in translateObj3) handles variable args to setMib without complaint4) added SNMP::getType to query data type of a given attribute and   extended Varbind structure to return type wherever possible5) added RemotePort to SNMP::Session initialization list to allow override   of port 1616) removed noisy announcement of mib parse success unless verbose is set	       *WARNING*  *this may break existing scripts*7) changed return format for IpAddress and ObjID data types - these are   now always returned as dotted decimal strings as opposed to the   packed binary forms in 1.6	       *WARNING*  *this may break existing scripts*8) Session now sets ErrorInd (e.g., $session->{ErrorInd}) where appropriate9) Support for ucd-snmp-3.2 (and greater) style of Mib loading10) Fully qualified attribute names and numeric OIDs are now valid <obj>   definitions.11) Numeric OIDs can be used even if they have not been parsed in the    current Mib - Mib loading is now optional12) Support for Win32 perl13) Updated docs and examples14) Reworked/extended the test harness to use the perl t/* facility    (thanks to jfs@fluent.com)15) fixed up error handling to be more consistent with library and more    useful in general. Now returns both library API errors and snmp    protocol error numbers and strings.16) added per object and per type formatting of returned values - more    control of value formatting with UseEnums and UseSprintValueCopyright:     Copyright (c) 1995-2000 G. S. Marzot. All rights reserved.     This program is free software; you can redistribute it and/or     modify it under the same terms as Perl itself.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -