JFIF ( %!1!%)+...383-7(-.+  -% &5/------------------------------------------------";!1AQ"aq2#3BRrb*!1"AQa2q#B ?yRd&vGlJwZvK)YrxB#j]ZAT^dpt{[wkWSԋ*QayBbm*&0<|0pfŷM`̬ ^.qR𽬷^EYTFíw<-.j)M-/s yqT'&FKz-([lև<G$wm2*e Z(Y-FVen櫧lҠDwүH4FX1 VsIOqSBۡNzJKzJξcX%vZcFSuMٖ%B ִ##\[%yYꉅ !VĂ1َRI-NsZJLTAPמQ:y״g_g= m֯Ye+Hyje!EcݸࢮSo{׬*h g<@KI$W+W'_> lUs1,o*ʺE.U"N&CTu7_0VyH,q ,)H㲣5<t ;rhnz%ݓz+4 i۸)P6+F>0Tв`&i}Shn?ik܀՟ȧ@mUSLFηh_er i_qt]MYhq 9LaJpPןߘvꀡ\"z[VƬ¤*aZMo=WkpSp \QhMb˒YH=ܒ m`CJt 8oFp]>pP1F>n8(*aڈ.Y݉[iTع JM!x]ԶaJSWҼܩ`yQ`*kE#nNkZKwA_7~ ΁JЍ;-2qRxYk=Uր>Z qThv@.w c{#&@#l;D$kGGvz/7[P+i3nIl`nrbmQi%}rAVPT*SF`{'6RX46PԮp(3W҅U\a*77lq^rT$vs2MU %*ŧ+\uQXVH !4t*Hg"Z챮 JX+RVU+ތ]PiJT XI= iPO=Ia3[ uؙ&2Z@.*SZ (")s8Y/-Fh Oc=@HRlPYp!wr?-dugNLpB1yWHyoP\ѕрiHִ,ِ0aUL.Yy`LSۜ,HZz!JQiVMb{( tژ <)^Qi_`: }8ٱ9_.)a[kSr> ;wWU#M^#ivT܎liH1Qm`cU+!2ɒIX%ֳNړ;ZI$?b$(9f2ZKe㼭qU8I[ U)9!mh1^N0 f_;׆2HFF'4b! yBGH_jтp'?uibQ T#ѬSX5gޒSF64ScjwU`xI]sAM( 5ATH_+s 0^IB++h@_Yjsp0{U@G -:*} TނMH*֔2Q:o@ w5(߰ua+a ~w[3W(дPYrF1E)3XTmIFqT~z*Is*清Wɴa0Qj%{T.ޅ״cz6u6݁h;֦ 8d97ݴ+ޕxзsȁ&LIJT)R0}f }PJdp`_p)əg(ŕtZ 'ϸqU74iZ{=Mhd$L|*UUn &ͶpHYJۋj /@9X?NlܾHYxnuXږAƞ8j ໲݀pQ4;*3iMlZ6w ȵP Shr!ݔDT7/ҡϲigD>jKAX3jv+ ߧز #_=zTm¦>}Tց<|ag{E*ֳ%5zW.Hh~a%j"e4i=vױi8RzM75i֟fEu64\էeo00d H韧rȪz2eulH$tQ>eO$@B /?=#٤ǕPS/·.iP28s4vOuz3zT& >Z2[0+[#Fޑ]!((!>s`rje('|,),y@\pЖE??u˹yWV%8mJ iw:u=-2dTSuGL+m<*צ1as&5su\phƃ qYLֳ>Y(PKi;Uڕp ..!i,54$IUEGLXrUE6m UJC?%4AT]I]F>׹P9+ee"Aid!Wk|tDv/ODc/,o]i"HIHQ_n spv"b}}&I:pȟU-_)Ux$l:fژɕ(I,oxin8*G>ÌKG}Rڀ8Frajٷh !*za]lx%EVRGYZoWѮ昀BXr{[d,t Eq ]lj+ N})0B,e iqT{z+O B2eB89Cڃ9YkZySi@/(W)d^Ufji0cH!hm-wB7C۔֛X$Zo)EF3VZqm)!wUxM49< 3Y .qDfzm |&T"} {*ih&266U9* <_# 7Meiu^h--ZtLSb)DVZH*#5UiVP+aSRIª!p挤c5g#zt@ypH={ {#0d N)qWT kA<Ÿ)/RT8D14y b2^OW,&Bcc[iViVdִCJ'hRh( 1K4#V`pِTw<1{)XPr9Rc 4)Srgto\Yτ~ xd"jO:A!7􋈒+E0%{M'T^`r=E*L7Q]A{]A<5ˋ.}<9_K (QL9FЍsĮC9!rpi T0q!H \@ܩB>F6 4ۺ6΋04ϲ^#>/@tyB]*ĸp6&<џDP9ᗟatM'> b쪗wI!܁V^tN!6=FD܆9*? q6h8  {%WoHoN.l^}"1+uJ ;r& / IɓKH*ǹP-J3+9 25w5IdcWg0n}U@2 #0iv腳z/^ƃOR}IvV2j(tB1){S"B\ ih.IXbƶ:GnI F.^a?>~!k''T[ע93fHlNDH;;sg-@, JOs~Ss^H '"#t=^@'W~Ap'oTڭ{Fن̴1#'c>꜡?F颅B L,2~ת-s2`aHQm:F^j&~*Nūv+{sk$F~ؒ'#kNsٗ D9PqhhkctԷFIo4M=SgIu`F=#}Zi'cu!}+CZI7NuŤIe1XT xC۷hcc7 l?ziY䠩7:E>k0Vxypm?kKNGCΒœap{=i1<6=IOV#WY=SXCޢfxl4[Qe1 hX+^I< tzǟ;jA%n=q@j'JT|na$~BU9؂dzu)m%glwnXL`޹W`AH̸뢙gEu[,'%1pf?tJ Ζmc[\ZyJvn$Hl'<+5[b]v efsЁ ^. &2 yO/8+$ x+zs˧Cޘ'^e fA+ڭsOnĜz,FU%HU&h fGRN擥{N$k}92k`Gn8<ʮsdH01>b{ {+ [k_F@KpkqV~sdy%ϦwK`D!N}N#)x9nw@7y4*\ Η$sR\xts30`O<0m~%U˓5_m ôªs::kB֫.tpv쌷\R)3Vq>ٝj'r-(du @9s5`;iaqoErY${i .Z(Џs^!yCϾ˓JoKbQU{௫e.-r|XWլYkZe0AGluIɦvd7 q -jEfۭt4q +]td_+%A"zM2xlqnVdfU^QaDI?+Vi\ϙLG9r>Y {eHUqp )=sYkt,s1!r,l鄛u#I$-֐2A=A\J]&gXƛ<ns_Q(8˗#)4qY~$'3"'UYcIv s.KO!{, ($LI rDuL_߰ Ci't{2L;\ߵ7@HK.Z)4
Devil Killer Is Here MiNi Shell

MiNi SheLL

Current Path : /proc/thread-self/root/usr/local/man/man3/

Linux boscustweb5004.eigbox.net 5.4.91 #1 SMP Wed Jan 20 18:10:28 EST 2021 x86_64
Upload File :
Current File : //proc/thread-self/root/usr/local/man/man3/Net::SNMP.3

.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  | will give a
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "Net::SNMP 3"
.TH Net::SNMP 3 "2005-10-20" "perl v5.8.8" "User Contributed Perl Documentation"
.SH "NAME"
Net::SNMP \- Object oriented interface to SNMP 
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
The Net::SNMP module implements an object oriented interface to the Simple 
Network Management Protocol.  Perl applications can use the module to retrieve 
or update information on a remote host using the \s-1SNMP\s0 protocol.  The module 
supports \s-1SNMP\s0 version\-1, \s-1SNMP\s0 version\-2c (Community\-Based SNMPv2), and \s-1SNMP\s0 
version\-3. The Net::SNMP module assumes that the user has a basic understanding
of the Simple Network Management Protocol and related network management 
concepts.
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The Net::SNMP module abstracts the intricate details of the Simple Network
Management Protocol by providing a high level programming interface to the
protocol.  Each Net::SNMP object provides a one-to-one mapping between a Perl
object and a remote \s-1SNMP\s0 agent or manager.  Once an object is created, it can
be used to perform the basic protocol exchange actions defined by \s-1SNMP\s0.
.PP
A Net::SNMP object can be created such that it has either \*(L"blocking\*(R" or
\&\*(L"non\-blocking\*(R" properties.  By default, the methods used to send \s-1SNMP\s0 messages
do not return until the protocol exchange has completed successfully or a
timeout period has expired. This behavior gives the object a \*(L"blocking\*(R"
property because the flow of the code is stopped until the method returns.
.PP
The optional named argument \fB\-nonblocking\fR can be passed to the object
constructor with a true value to give the object \*(L"non\-blocking\*(R" behavior.
A method invoked by a non-blocking object queues the \s-1SNMP\s0 message and returns
immediately, allowing the flow of the code to continue. The queued \s-1SNMP\s0 
messages are not sent until an event loop is entered by calling the 
\&\f(CW\*(C`snmp_dispatcher()\*(C'\fR method.  When the \s-1SNMP\s0 messages are sent, any response to 
the messages invokes the subroutine defined by the user when the message was 
originally queued. The event loop exits when all messages have been removed 
from the queue by either receiving a response, or by exceeding the number of 
retries at the Transport Layer.
.Sh "Blocking Objects"
.IX Subsection "Blocking Objects"
The default behavior of the methods associated with a Net::SNMP object is to
block the code flow until the method completes.  For methods that initiate a
\&\s-1SNMP\s0 protocol exchange requiring a response, a hash reference containing the
results of the query is returned. The undefined value is returned by all
methods when a failure has occurred. The \f(CW\*(C`error()\*(C'\fR method can be used to
determine the cause of the failure.
.PP
The hash reference returned by a \s-1SNMP\s0 protocol exchange points to a hash
constructed from the VarBindList contained in the \s-1SNMP\s0 response message.  The
hash is created using the ObjectName and the ObjectSyntax pairs in the
VarBindList.  The keys of the hash consist of the \s-1OBJECT\s0 IDENTIFIERs in dotted
notation corresponding to each ObjectName in the VarBindList.  The value of
each hash entry is set equal to the value of the corresponding ObjectSyntax.
This hash reference can also be retrieved using the \f(CW\*(C`var_bind_list()\*(C'\fR method.
.Sh "Non-blocking Objects"
.IX Subsection "Non-blocking Objects"
When a Net::SNMP object is created having non-blocking behavior, the invocation
of a method associated with the object returns immediately, allowing the flow 
of the code to continue.  When a method is invoked that would initiate a \s-1SNMP\s0
protocol exchange requiring a response, either a true value (i.e. 0x1) is
returned immediately or the undefined value is returned if there was a failure.
The \f(CW\*(C`error()\*(C'\fR method can be used to determine the cause of the failure.
.PP
The contents of the VarBindList contained in the \s-1SNMP\s0 response message can be
retrieved by calling the \f(CW\*(C`var_bind_list()\*(C'\fR method using the object reference
passed as the first argument to the callback.  The value returned by the 
\&\f(CW\*(C`var_bind_list()\*(C'\fR method is a hash reference created using the ObjectName and
the ObjectSyntax pairs in the VarBindList.  The keys of the hash consist of 
the \s-1OBJECT\s0 IDENTIFIERs in dotted notation corresponding to each ObjectName 
in the VarBindList.  The value of each hash entry is set equal to the value of
the corresponding ObjectSyntax. The undefined value is returned if there has 
been a failure and the \f(CW\*(C`error()\*(C'\fR method may be used to determine the reason.
.SH "METHODS"
.IX Header "METHODS"
When named arguments are expected by the methods, two different styles are 
supported.  All examples in this documentation use the dashed-option style:
.PP
.Vb 1
\&       $object->method(-argument => $value);
.Ve
.PP
However, the \s-1IO::\s0 style is also allowed:
.PP
.Vb 1
\&       $object->method(Argument => $value);
.Ve
.IP "Non-blocking Objects Arguments" 4
.IX Item "Non-blocking Objects Arguments"
When a Net::SNMP object has been created with a \*(L"non\-blocking\*(R" property, most
methods that generate a \s-1SNMP\s0 message take additional arguments to support this
property.
.RS 4
.IP "Callback" 4
.IX Item "Callback"
Most methods associated with a non-blocking object have an optional named
argument called \fB\-callback\fR.  The \fB\-callback\fR argument expects a reference
to a subroutine or to an array whose first element must be a reference to a
subroutine.  The subroutine defined by the \fB\-callback\fR option is executed when
a response to a \s-1SNMP\s0 message is received, an error condition has occurred, or
the number of retries for the message has been exceeded.
.Sp
When the \fB\-callback\fR argument only contains a subroutine reference, the
subroutine is evaluated passing a reference to the original Net::SNMP object 
as the only parameter.  If the \fB\-callback\fR argument was defined as an array
reference, all elements in the array are passed to subroutine after the
reference to the Net::SNMP object.  The first element, which is required to be
a reference to a subroutine, is removed before the remaining arguments are 
passed to that subroutine.
.Sp
Once one method is invoked with the \fB\-callback\fR argument, this argument stays
with the object and is used by any further calls to methods using the
\&\fB\-callback\fR option if the argument is absent.  The undefined value may be
passed to the \fB\-callback\fR argument to delete the callback.
.Sp
\&\fB\s-1NOTE:\s0\fR The subroutine being passed with the \fB\-callback\fR named argument
should not cause blocking itself.  This will cause all the actions in the event
loop to be stopped, defeating the non-blocking property of the Net::SNMP
module.
.IP "Delay" 4
.IX Item "Delay"
An optional argument \fB\-delay\fR can also be passed to non-blocking objects.  The
\&\fB\-delay\fR argument instructs the object to wait the number of seconds passed
to the argument before executing the \s-1SNMP\s0 protocol exchange.  The delay period 
starts when the event loop is entered.  The \fB\-delay\fR parameter is applied to 
all methods associated with the object once it is specified.  The delay value 
must be set back to 0 seconds to disable the delay parameter. 
.RE
.RS 4
.RE
.IP "SNMPv3 Arguments" 4
.IX Item "SNMPv3 Arguments"
A \s-1SNMP\s0 context is a collection of management information accessible by a \s-1SNMP\s0 
entity.  An item of management information may exist in more than one context 
and a \s-1SNMP\s0 entity potentially has access to many contexts.  The combination of 
a contextEngineID and a contextName unambiguously identifies a context within 
an administrative domain.  In a SNMPv3 message, the contextEngineID and 
contextName are included as part of the scopedPDU.  All methods that generate 
a \s-1SNMP\s0 message optionally take a \fB\-contextengineid\fR and \fB\-contextname\fR 
argument to configure these fields.
.RS 4
.IP "Context Engine \s-1ID\s0" 4
.IX Item "Context Engine ID"
The \fB\-contextengineid\fR argument expects a hexadecimal string representing
the desired contextEngineID.  The string must be 10 to 64 characters (5 to 
32 octets) long and can be prefixed with an optional \*(L"0x\*(R".  Once the 
\&\fB\-contextengineid\fR is specified it stays with the object until it is changed 
again or reset to default by passing in the undefined value.  By default, the 
contextEngineID is set to match the authoritativeEngineID of the authoritative
\&\s-1SNMP\s0 engine.
.IP "Context Name" 4
.IX Item "Context Name"
The contextName is passed as a string which must be 0 to 32 octets in length 
using the \fB\-contextname\fR argument.  The contextName stays with the object 
until it is changed.  The contextName defaults to an empty string which 
represents the \*(L"default\*(R" context.
.RE
.RS 4
.RE
.Sh "\fIsession()\fP \- create a new Net::SNMP object"
.IX Subsection "session() - create a new Net::SNMP object"
.Vb 22
\&   ($session, $error) = Net::SNMP->session(
\&                           [-hostname      => $hostname,]
\&                           [-port          => $port,]
\&                           [-localaddr     => $localaddr,]
\&                           [-localport     => $localport,]
\&                           [-nonblocking   => $boolean,]
\&                           [-version       => $version,]
\&                           [-domain        => $domain,]
\&                           [-timeout       => $seconds,]
\&                           [-retries       => $count,]
\&                           [-maxmsgsize    => $octets,]
\&                           [-translate     => $translate,]
\&                           [-debug         => $bitmask,]
\&                           [-community     => $community,]   # v1/v2c
\&                           [-username      => $username,]    # v3
\&                           [-authkey       => $authkey,]     # v3
\&                           [-authpassword  => $authpasswd,]  # v3
\&                           [-authprotocol  => $authproto,]   # v3
\&                           [-privkey       => $privkey,]     # v3
\&                           [-privpassword  => $privpasswd,]  # v3
\&                           [-privprotocol  => $privproto,]   # v3
\&                        );
.Ve
.PP
This is the constructor for Net::SNMP objects.  In scalar context, a
reference to a new Net::SNMP object is returned if the creation of the object
is successful.  In list context, a reference to a new Net::SNMP object and an 
empty error message string is returned.  If a failure occurs, the object 
reference is returned as the undefined value.  The error string may be used 
to determine the cause of the error.
.PP
Most of the named arguments passed to the constructor define basic attributes
for the object and are not modifiable after the object has been created.  The
\&\fB\-timeout\fR, \fB\-retries\fR, \fB\-maxmsgsize\fR, \fB\-translate\fR, and \fB\-debug\fR
arguments are modifiable using an accessor method.  See their corresponding 
method definitions for a complete description of their usage, default values, 
and valid ranges.
.IP "Transport Domain Arguments" 4
.IX Item "Transport Domain Arguments"
The Net::SNMP module uses UDP/IPv4 as the default Transport Domain to exchange
\&\s-1SNMP\s0 messages between the local and remote devices.  The module also supports
UDP/IPv6, TCP/IPv4, and TCP/IPv6 as alternative Transport Domains.  The 
\&\fB\-domain\fR argument can be used to change the Transport Domain by setting the 
value to one of the following strings: 'udp6', 'udp/ipv6'; 'tcp', 'tcp4', 
\&'tcp/ipv4'; 'tcp6', or 'tcp/ipv6'.  The \fB\-domain\fR argument also accepts
the strings 'udp', 'udp4', or 'udp/ipv4' which correspond to the default
Transport Domain of UDP/IPv4.
.Sp
The transport address of the destination \s-1SNMP\s0 device can be specified using
the \fB\-hostname\fR argument.  This argument is optional and defaults to
\&\*(L"localhost\*(R".  The destination port number can be specified as part of the
transport address or by using the \fB\-port\fR argument.  Either a numeric port
number or a textual service name can be specified.  A numeric port number in
parentheses can optionally follow the service name.  This port number will
be used if the service name cannot be resolved.  If the destination port number
is not specified, the well-known \s-1SNMP\s0 port number 161 is used.
.Sp
By default the source transport address and port number are assigned 
dynamically by the local device on which the Net::SNMP module is being used.
This dynamic assignment can be overridden by using the \fB\-localaddr\fR and
\&\fB\-localport\fR arguments.  These arguments accept the same values as the
\&\fB\-hostname\fR and \fB\-port\fR arguments respectively.  The resolved address must
correspond to a valid address of an interface on the local device.
.Sp
When using an IPv4 Transport Domain, the transport address can be specified
as either an \s-1IP\s0 network hostname or an IPv4 address in standard dotted notation.
The port information can be optionally appended to the hostname or address
delimited by a colon.  The accepted IPv4 transport address formats are 
\&\f(CW\*(C`address\*(C'\fR, \f(CW\*(C`address:port\*(C'\fR, \f(CW\*(C`hostname\*(C'\fR, and \f(CW\*(C`hostname:port\*(C'\fR.
.Sp
When using an IPv6 Transport Domain, the transport address can be specified
as an \s-1IP\s0 hostname (which will be looked up as a \s-1DNS\s0 quad-A record) or an IPv6
address in presentation format.  The port information can optionally be 
included following a colon after the hostname or address.  When including this
information after an IPv6 address, the address must be enclosed in square 
brackets.  The scope zone index (described in \s-1RFC\s0 4007) can be specified after
the address as a decimal value delimited by a percent sign.  The accepted
transport address formats for IPv6 are \f(CW\*(C`address\*(C'\fR, \f(CW\*(C`address%zone\*(C'\fR,
\&\f(CW\*(C`[address]:port\*(C'\fR, \f(CW\*(C`[address%zone]:port\*(C'\fR, \f(CW\*(C`hostname\*(C'\fR, and \f(CW\*(C`hostname:port\*(C'\fR.
.IP "Security Model Arguments" 4
.IX Item "Security Model Arguments"
The \fB\-version\fR argument controls which other arguments are expected or 
required by the \f(CW\*(C`session()\*(C'\fR constructor.  The Net::SNMP module supports 
SNMPv1, SNMPv2c, and SNMPv3.  The module defaults to SNMPv1 if no \fB\-version\fR
argument is specified.  The \fB\-version\fR argument expects either a digit (i.e. 
\&'1', '2', or '3') or a string specifying the version (i.e. 'snmpv1', 
\&'snmpv2c', or 'snmpv3') to define the \s-1SNMP\s0 version. 
.Sp
The Security Model used by the Net::SNMP object is based on the \s-1SNMP\s0 version
associated with the object.  If the \s-1SNMP\s0 version is SNMPv1 or SNMPv2c a
Community-based Security Model will be used, while the User-based Security
Model (\s-1USM\s0) will be used if the version is SNMPv3.  
.RS 4
.IP "Community-based Security Model Argument" 4
.IX Item "Community-based Security Model Argument"
If the Security Model is Community\-based, the only argument available is the
\&\fB\-community\fR argument.  This argument expects a string that is to be used as
the \s-1SNMP\s0 community name.  By default the community name is set to 'public' 
if the argument is not present.
.IP "User-based Security Model Arguments" 4
.IX Item "User-based Security Model Arguments"
The User-based Security Model (\s-1USM\s0) used by SNMPv3 requires that a securityName
be specified using the \fB\-username\fR argument.  The creation of a Net::SNMP
object with the version set to SNMPv3 will fail if the \fB\-username\fR argument
is not present.  The \fB\-username\fR argument expects a string 1 to 32 octets
in length.
.Sp
Different levels of security are allowed by the User-based Security Model which
address authentication and privacy concerns.  A SNMPv3 Net::SNMP object will 
derive the security level (securityLevel) based on which of the following 
arguments are specified.
.Sp
By default a securityLevel of 'noAuthNoPriv' is assumed.  If the \fB\-authkey\fR 
or \fB\-authpassword\fR arguments are specified, the securityLevel becomes 
\&'authNoPriv'.  The \fB\-authpassword\fR argument expects a string which is at 
least 1 octet in length.  Optionally, the \fB\-authkey\fR argument can be used so 
that a plain text password does not have to be specified in a script.  The 
\&\fB\-authkey\fR argument expects a hexadecimal string produced by localizing the 
password with the authoritativeEngineID for the specific destination device.  
The \f(CW\*(C`snmpkey\*(C'\fR utility included with the distribution can be used to create 
the hexadecimal string (see snmpkey). 
.Sp
Two different hash algorithms are defined by SNMPv3 which can be used by the 
Security Model for authentication.  These algorithms are \s-1HMAC\-MD5\-96\s0 \*(L"\s-1MD5\s0\*(R" 
(\s-1RFC\s0 1321) and \s-1HMAC\-SHA\-96\s0 \*(L"\s-1SHA\-1\s0\*(R" (\s-1NIST\s0 \s-1FIPS\s0 \s-1PUB\s0 180\-1).   The default 
algorithm used by the module is \s-1HMAC\-MD5\-96\s0.  This behavior can be changed by 
using the \fB\-authprotocol\fR argument.  This argument expects either the string 
\&'md5' or 'sha' to be passed to modify the hash algorithm.
.Sp
By specifying the arguments \fB\-privkey\fR or \fB\-privpassword\fR the securityLevel
associated with the object becomes 'authPriv'.  According to SNMPv3, privacy 
requires the use of authentication.  Therefore, if either of these two 
arguments are present and the \fB\-authkey\fR or \fB\-authpassword\fR arguments are 
missing, the creation of the object fails.  The \fB\-privkey\fR and 
\&\fB\-privpassword\fR arguments expect the same input as the \fB\-authkey\fR and 
\&\fB\-authpassword\fR arguments respectively.
.Sp
The User-based Security Model described in \s-1RFC\s0 3414 defines a single encryption
protocol to be used for privacy.  This protocol, CBC-DES \*(L"\s-1DES\s0\*(R" (\s-1NIST\s0 \s-1FIPS\s0 \s-1PUB\s0 
46\-1), is used by default or if the string 'des' is passed to the 
\&\fB\-privprotocol\fR argument.  The module also supports \s-1RFC\s0 3826 which describes
the use of \s-1CFB128\-AES\-128\s0 \*(L"\s-1AES\s0\*(R" (\s-1NIST\s0 \s-1FIPS\s0 \s-1PUB\s0 197) in the \s-1USM\s0.  The \s-1AES\s0 
encryption protocol can be selected by passing 'aes' or 'aes128' to the 
\&\fB\-privprotocol\fR argument.  By working with the Extended Security Options
Consortium <http://www.snmp.com/eso/>, the module also supports \s-1CBC\-3DES\-EDE\s0
\&\*(L"Triple\-DES\*(R" (\s-1NIST\s0 \s-1FIPS\s0 46\-3) in the User-based Security Model.  This is 
defined in the draft 
<http://www.snmp.com/eso/draft\-reeder\-snmpv3\-usm\-3desede\-00.txt>.  The 
Triple-DES encryption protocol can be selected using the \fB\-privprotocol\fR 
argument with the string '3des' or '3desede'. 
.RE
.RS 4
.RE
.Sh "\fIclose()\fP \- clear the Transport Domain associated with the object"
.IX Subsection "close() - clear the Transport Domain associated with the object"
.Vb 1
\&   $session->close;
.Ve
.PP
This method clears the Transport Domain and any errors associated with the 
object.  Once closed, the Net::SNMP object can no longer be used to send or 
receive \s-1SNMP\s0 messages.
.Sh "\fIsnmp_dispatcher()\fP \- enter the non-blocking object event loop"
.IX Subsection "snmp_dispatcher() - enter the non-blocking object event loop"
.Vb 1
\&   $session->snmp_dispatcher();
.Ve
.PP
This method enters the event loop associated with non-blocking Net::SNMP
objects.  The method exits when all queued \s-1SNMP\s0 messages have received a
response or have timed out at the Transport Layer. This method is also 
exported as the stand alone function \f(CW\*(C`snmp_dispatcher()\*(C'\fR by default 
(see \*(L"\s-1EXPORTS\s0\*(R").
.Sh "\fIget_request()\fP \- send a \s-1SNMP\s0 get-request to the remote agent"
.IX Subsection "get_request() - send a SNMP get-request to the remote agent"
.Vb 7
\&   $result = $session->get_request(
\&                          [-callback        => sub {},]     # non-blocking
\&                          [-delay           => $seconds,]   # non-blocking 
\&                          [-contextengineid => $engine_id,] # v3 
\&                          [-contextname     => $name,]      # v3
\&                          -varbindlist      => \e@oids,
\&                       );
.Ve
.PP
This method performs a \s-1SNMP\s0 get-request query to gather data from the remote
agent on the host associated with the Net::SNMP object.  The message is built
using the list of \s-1OBJECT\s0 IDENTIFIERs in dotted notation passed to the method
as an array reference using the \fB\-varbindlist\fR argument.  Each \s-1OBJECT\s0 
\&\s-1IDENTIFER\s0 is placed into a single \s-1SNMP\s0 GetRequest-PDU in the same order that 
it held in the original list.
.PP
A reference to a hash is returned in blocking mode which contains the contents
of the VarBindList.  In non-blocking mode, a true value is returned when no 
error has occurred.  In either mode, the undefined value is returned when an
error has occurred.  The \f(CW\*(C`error()\*(C'\fR method may be used to determine the cause
of the failure.
.Sh "\fIget_next_request()\fP \- send a \s-1SNMP\s0 get-next-request to the remote agent"
.IX Subsection "get_next_request() - send a SNMP get-next-request to the remote agent"
.Vb 7
\&   $result = $session->get_next_request(
\&                          [-callback        => sub {},]     # non-blocking
\&                          [-delay           => $seconds,]   # non-blocking 
\&                          [-contextengineid => $engine_id,] # v3 
\&                          [-contextname     => $name,]      # v3
\&                          -varbindlist      => \e@oids,
\&                       );
.Ve
.PP
This method performs a \s-1SNMP\s0 get-next-request query to gather data from the 
remote agent on the host associated with the Net::SNMP object.  The message 
is built using the list of \s-1OBJECT\s0 IDENTIFIERs in dotted notation passed to the 
method as an array reference using the \fB\-varbindlist\fR argument.  Each \s-1OBJECT\s0 
\&\s-1IDENTIFER\s0 is placed into a single \s-1SNMP\s0 GetNextRequest-PDU in the same order 
that it held in the original list.
.PP
A reference to a hash is returned in blocking mode which contains the contents
of the VarBindList.  In non-blocking mode, a true value is returned when no 
error has occurred.  In either mode, the undefined value is returned when an
error has occurred.  The \f(CW\*(C`error()\*(C'\fR method may be used to determine the cause
of the failure.
.Sh "\fIset_request()\fP \- send a \s-1SNMP\s0 set-request to the remote agent"
.IX Subsection "set_request() - send a SNMP set-request to the remote agent"
.Vb 7
\&   $result = $session->set_request(
\&                          [-callback        => sub {},]     # non-blocking
\&                          [-delay           => $seconds,]   # non-blocking 
\&                          [-contextengineid => $engine_id,] # v3 
\&                          [-contextname     => $name,]      # v3
\&                          -varbindlist      => \e@oid_value,
\&                       );
.Ve
.PP
This method is used to modify data on the remote agent that is associated
with the Net::SNMP object using a \s-1SNMP\s0 set\-request.  The message is built 
using a list of values consisting of groups of an \s-1OBJECT\s0 \s-1IDENTIFIER\s0, an object 
type, and the actual value to be set.  This list is passed to the method as 
an array reference using the \fB\-varbindlist\fR argument.  The \s-1OBJECT\s0 IDENTIFIERs 
in each trio are to be in dotted notation.  The object type is an octet 
corresponding to the \s-1ASN\s0.1 type of value that is to be set.  Each of the 
supported \s-1ASN\s0.1 types have been defined and are exported by the package by 
default (see \*(L"\s-1EXPORTS\s0\*(R"). 
.PP
A reference to a hash is returned in blocking mode which contains the contents
of the VarBindList.  In non-blocking mode, a true value is returned when no
error has occurred.  In either mode, the undefined value is returned when an
error has occurred.  The \f(CW\*(C`error()\*(C'\fR method may be used to determine the cause
of the failure.
.Sh "\fItrap()\fP \- send a \s-1SNMP\s0 trap to the remote manager"
.IX Subsection "trap() - send a SNMP trap to the remote manager"
.Vb 9
\&   $result = $session->trap(
\&                          [-delay           => $seconds,]   # non-blocking 
\&                          [-enterprise      => $oid,]
\&                          [-agentaddr       => $ipaddress,]
\&                          [-generictrap     => $generic,]
\&                          [-specifictrap    => $specific,]
\&                          [-timestamp       => $timeticks,]
\&                          -varbindlist      => \e@oid_value,
\&                       );
.Ve
.PP
This method sends a \s-1SNMP\s0 trap to the remote manager associated with the
Net::SNMP object.  All arguments are optional and will be given the following 
defaults in the absence of a corresponding named argument: 
.IP "\(bu" 4
The default value for the trap \fB\-enterprise\fR is \*(L"1.3.6.1.4.1\*(R", which 
corresponds to \*(L"iso.org.dod.internet.private.enterprises\*(R".  The enterprise 
value is expected to be an \s-1OBJECT\s0 \s-1IDENTIFER\s0 in dotted notation. 
.IP "\(bu" 4
When the Transport Domain is UDP/IPv4 or TCP/IPv4, the default value for the
trap \fB\-agentaddr\fR is the \s-1IP\s0 address associated with the interface on which 
the trap will be transmitted.  For other Transport Domains the \fB\-agentaddr\fR
is defaulted to \*(L"0.0.0.0\*(R".  When specified, the agent-addr is expected to be
an IpAddress in dotted notation.
.IP "\(bu" 4
The default value for the \fB\-generictrap\fR type is 6 which corresponds to 
\&\*(L"enterpriseSpecific\*(R".  The generic-trap types are defined and can be exported
upon request (see \*(L"\s-1EXPORTS\s0\*(R").
.IP "\(bu" 4
The default value for the \fB\-specifictrap\fR type is 0.  No pre-defined values
are available for specific-trap types.
.IP "\(bu" 4
The default value for the trap \fB\-timestamp\fR is the \*(L"uptime\*(R" of the script.  
The \*(L"uptime\*(R" of the script is the number of hundredths of seconds that have 
elapsed since the script began running.  The time-stamp is expected to be a 
TimeTicks number in hundredths of seconds.
.IP "\(bu" 4
The default value for the trap \fB\-varbindlist\fR is an empty array reference.
The variable-bindings are expected to be in an array format consisting of 
groups of an \s-1OBJECT\s0 \s-1IDENTIFIER\s0, an object type, and the actual value of the 
object.  This is identical to the list expected by the \f(CW\*(C`set_request()\*(C'\fR method.
The \s-1OBJECT\s0 IDENTIFIERs in each trio are to be in dotted notation.  The object 
type is an octet corresponding to the \s-1ASN\s0.1 type for the value. Each of the 
supported types have been defined and are exported by default (see 
\&\*(L"\s-1EXPORTS\s0\*(R").
.PP
A true value is returned when the method is successful. The undefined value 
is returned when a failure has occurred.  The \f(CW\*(C`error()\*(C'\fR method can be used to
determine the cause of the failure. Since there are no acknowledgements for 
Trap\-PDUs, there is no way to determine if the remote host actually received
the trap.  
.PP
\&\fB\s-1NOTE:\s0\fR When the object is in non-blocking mode, the trap is not sent until 
the event loop is entered and no callback is ever executed.
.PP
\&\fB\s-1NOTE:\s0\fR This method can only be used when the version of the object is set to
SNMPv1.
.Sh "\fIget_bulk_request()\fP \- send a \s-1SNMP\s0 get-bulk-request to the remote agent"
.IX Subsection "get_bulk_request() - send a SNMP get-bulk-request to the remote agent"
.Vb 9
\&   $result = $session->get_bulk_request(
\&                          [-callback        => sub {},]     # non-blocking
\&                          [-delay           => $seconds,]   # non-blocking 
\&                          [-contextengineid => $engine_id,] # v3 
\&                          [-contextname     => $name,]      # v3
\&                          [-nonrepeaters    => $non_reps,]
\&                          [-maxrepetitions  => $max_reps,]
\&                          -varbindlist      => \e@oids,
\&                       );
.Ve
.PP
This method performs a \s-1SNMP\s0 get-bulk-request query to gather data from the
remote agent on the host associated with the Net::SNMP object.  All arguments 
are optional except \fB\-varbindlist\fR and will be given the following defaults 
in the absence of a corresponding named argument: 
.IP "\(bu" 4
The default value for the get-bulk-request \fB\-nonrepeaters\fR is 0.  The 
non-repeaters value specifies the number of variables in the 
variable-bindings list for which a single successor is to be returned.
.IP "\(bu" 4
The default value for the get-bulk-request \fB\-maxrepetitions\fR is 0. The
max-repetitions value specifies the number of successors to be returned for
the remaining variables in the variable-bindings list.
.IP "\(bu" 4
The \fB\-varbindlist\fR argument expects an array reference consisting of a list of
\&\s-1OBJECT\s0 IDENTIFIERs in dotted notation.  Each \s-1OBJECT\s0 \s-1IDENTIFER\s0 is placed into a 
single \s-1SNMP\s0 GetBulkRequest-PDU in the same order that it held in the original 
list.
.PP
A reference to a hash is returned in blocking mode which contains the contents
of the VarBindList.  In non-blocking mode, a true value is returned when no
error has occurred.  In either mode, the undefined value is returned when an
error has occurred.  The \f(CW\*(C`error()\*(C'\fR method may be used to determine the cause
of the failure.
.PP
\&\fB\s-1NOTE:\s0\fR This method can only be used when the version of the object is set to
SNMPv2c or SNMPv3.
.Sh "\fIinform_request()\fP \- send a \s-1SNMP\s0 inform-request to the remote manager"
.IX Subsection "inform_request() - send a SNMP inform-request to the remote manager"
.Vb 7
\&   $result = $session->inform_request(
\&                          [-callback        => sub {},]     # non-blocking
\&                          [-delay           => $seconds,]   # non-blocking 
\&                          [-contextengineid => $engine_id,] # v3 
\&                          [-contextname     => $name,]      # v3
\&                          -varbindlist      => \e@oid_value,
\&                       );
.Ve
.PP
This method is used to provide management information to the remote manager
associated with the Net::SNMP object using an inform\-request.  The message is 
built using a list of values consisting of groups of an \s-1OBJECT\s0 \s-1IDENTIFIER\s0, 
an object type, and the actual value to be identified.  This list is passed 
to the method as an array reference using the \fB\-varbindlist\fR argument.  The 
\&\s-1OBJECT\s0 IDENTIFIERs in each trio are to be in dotted notation.  The object type 
is an octet corresponding to the \s-1ASN\s0.1 type of value that is to be identified.  
Each of the supported \s-1ASN\s0.1 types have been defined and are exported by the 
package by default (see \*(L"\s-1EXPORTS\s0\*(R"). 
.PP
The first two variable-bindings fields in the inform-request are specified
by SNMPv2 and should be:
.IP "\(bu" 4
sysUpTime.0 \- ('1.3.6.1.2.1.1.3.0', \s-1TIMETICKS\s0, \f(CW$timeticks\fR) 
.IP "\(bu" 4
snmpTrapOID.0 \- ('1.3.6.1.6.3.1.1.4.1.0', \s-1OBJECT_IDENTIFIER\s0, \f(CW$oid\fR)
.PP
A reference to a hash is returned in blocking mode which contains the contents
of the VarBindList.  In non-blocking mode, a true value is returned when no
error has occurred.  In either mode, the undefined value is returned when an
error has occurred.  The \f(CW\*(C`error()\*(C'\fR method may be used to determine the cause
of the failure.
.PP
\&\fB\s-1NOTE:\s0\fR This method can only be used when the version of the object is set to
SNMPv2c or SNMPv3.
.Sh "\fIsnmpv2_trap()\fP \- send a \s-1SNMP\s0 snmpV2\-trap to the remote manager"
.IX Subsection "snmpv2_trap() - send a SNMP snmpV2-trap to the remote manager"
.Vb 4
\&   $result = $session->snmpv2_trap(
\&                          [-delay           => $seconds,]   # non-blocking 
\&                          -varbindlist      => \e@oid_value,
\&                       );
.Ve
.PP
This method sends a snmpV2\-trap to the remote manager associated with the 
Net::SNMP object.  The message is built using a list of values consisting of 
groups of an \s-1OBJECT\s0 \s-1IDENTIFIER\s0, an object type, and the actual value to be 
identified.  This list is passed to the method as an array reference using the 
\&\fB\-varbindlist\fR argument.  The \s-1OBJECT\s0 IDENTIFIERs in each trio are to be in 
dotted notation.  The object type is an octet corresponding to the \s-1ASN\s0.1 type 
of value that is to be identified.  Each of the supported \s-1ASN\s0.1 types have 
been defined and are exported by the package by default (see \*(L"\s-1EXPORTS\s0\*(R"). 
.PP
The first two variable-bindings fields in the snmpV2\-trap are specified by
SNMPv2 and should be:
.IP "\(bu" 4
sysUpTime.0 \- ('1.3.6.1.2.1.1.3.0', \s-1TIMETICKS\s0, \f(CW$timeticks\fR)
.IP "\(bu" 4
snmpTrapOID.0 \- ('1.3.6.1.6.3.1.1.4.1.0', \s-1OBJECT_IDENTIFIER\s0, \f(CW$oid\fR)
.PP
A true value is returned when the method is successful. The undefined value 
is returned when a failure has occurred.  The \f(CW\*(C`error()\*(C'\fR method can be used 
to determine the cause of the failure. Since there are no acknowledgements for
SNMPv2\-Trap\-PDUs, there is no way to determine if the remote host actually 
received the snmpV2\-trap.  
.PP
\&\fB\s-1NOTE:\s0\fR When the object is in non-blocking mode, the snmpV2\-trap is not sent 
until the event loop is entered and no callback is ever executed.
.PP
\&\fB\s-1NOTE:\s0\fR This method can only be used when the version of the object is set to
SNMPv2c.  SNMPv2\-Trap\-PDUs are supported by SNMPv3, but require the sender of
the message to be an authoritative \s-1SNMP\s0 engine which is not currently supported
by the Net::SNMP module.
.Sh "\fIget_table()\fP \- retrieve a table from the remote agent"
.IX Subsection "get_table() - retrieve a table from the remote agent"
.Vb 8
\&   $result = $session->get_table(
\&                          [-callback        => sub {},]     # non-blocking
\&                          [-delay           => $seconds,]   # non-blocking 
\&                          [-contextengineid => $engine_id,] # v3 
\&                          [-contextname     => $name,]      # v3
\&                          -baseoid          => $oid,
\&                          [-maxrepetitions  => $max_reps,]  # v2c/v3
\&                       );
.Ve
.PP
This method performs repeated \s-1SNMP\s0 get-next-request or get-bulk-request 
(when using SNMPv2c or SNMPv3) queries to gather data from the remote agent 
on the host associated with the Net::SNMP object.  The first message sent 
is built using the \s-1OBJECT\s0 \s-1IDENTIFIER\s0 in dotted notation passed to the method 
by the \fB\-baseoid\fR argument.   Repeated \s-1SNMP\s0 requests are issued until the 
\&\s-1OBJECT\s0 \s-1IDENTIFIER\s0 in the response is no longer a child of the base \s-1OBJECT\s0 
\&\s-1IDENTIFIER\s0.
.PP
The \fB\-maxrepetitions\fR argument can be used to specify the max-repetitions
value that is passed to the get-bulk-requests when using SNMPv2c or SNMPv3.  
If this argument is not present, a value is calculated based on the maximum 
message size for the Net::SNMP object.  If the value is set to 1 or less, 
get-next-requests will be used for the queries instead of get\-bulk\-requests.
.PP
A reference to a hash is returned in blocking mode which contains the contents
of the VarBindList.  In non-blocking mode, a true value is returned when no
error has occurred.  In either mode, the undefined value is returned when an
error has occurred.  The \f(CW\*(C`error()\*(C'\fR method may be used to determine the cause
of the failure.
.PP
\&\fB\s-1WARNING:\s0\fR Results from this method can become very large if the base
\&\s-1OBJECT\s0 \s-1IDENTIFIER\s0 is close to the root of the \s-1SNMP\s0 \s-1MIB\s0 tree.
.Sh "\fIget_entries()\fP \- retrieve table entries from the remote agent"
.IX Subsection "get_entries() - retrieve table entries from the remote agent"
.Vb 10
\&   $result = $session->get_entries(
\&                          [-callback        => sub {},]     # non-blocking
\&                          [-delay           => $seconds,]   # non-blocking
\&                          [-contextengineid => $engine_id,] # v3
\&                          [-contextname     => $name,]      # v3
\&                          -columns          => \e@columns,
\&                          [-startindex      => $start,]
\&                          [-endindex        => $end,]
\&                          [-maxrepetitions  => $max_reps,]  # v2c/v3
\&                       );
.Ve
.PP
This method performs repeated \s-1SNMP\s0 get-next-request or get-bulk-request
(when using SNMPv2c or SNMPv3) queries to gather data from the remote agent
on the host associated with the Net::SNMP object.  Each message specifically
requests data for each \s-1OBJECT\s0 \s-1IDENTIFIER\s0 specified in the \fB\-columns\fR array.
The \s-1OBJECT\s0 IDENTIFIERs must correspond to column entries for a conceptual row 
in a table.  They may however be columns in different tables as long as each
table is indexed the same way.  The optional \fB\-startindex\fR and \fB\-endindex\fR 
arguments may be specified to limit the query to specific rows in the table(s).
.PP
The \fB\-startindex\fR can be specified as a single decimal value or in dotted
notation if the index associated with the entry so requires.  If the
\&\fB\-startindex\fR is specified, it will be include as part of the query results.
If no \fB\-startindex\fR is specified, the first request message will be sent
without an index.  To insure that the \fB\-startindex\fR is included, the last
subidentifier in the index is decremented by one.  If the last subidentifier
has a value of zero, the subidentifier is removed from the index.
.PP
The optional \fB\-endindex\fR argument can be specified as a single decimal value
or in dotted notation.  If the \fB\-endindex\fR is specified, it will be included 
as part of the query results.  If no \fB\-endindex\fR is specified, repeated \s-1SNMP\s0
requests are issued until the response no longer returns entries matching 
any of the columns specified in the \fB\-columns\fR array.
.PP
The \fB\-maxrepetitions\fR argument can be used to specify the max-repetitions
value that is passed to the get-bulk-requests when using SNMPv2c or SNMPv3.
If this argument is not present, a value is calculated based on the maximum
message size of the object and the number of columns specified in the
\&\fB\-columns\fR array.  If the value is set to 1 or less, get-next-requests will 
be used for the queries instead of get\-bulk\-requests. 
.PP
A reference to a hash is returned in blocking mode which contains the contents
of the VarBindList.  In non-blocking mode, a true value is returned when no
error has occurred.  In either mode, the undefined value is returned when an
error has occurred.  The \f(CW\*(C`error()\*(C'\fR method may be used to determine the cause
of the failure.
.Sh "\fIversion()\fP \- get the \s-1SNMP\s0 version from the object"
.IX Subsection "version() - get the SNMP version from the object"
.Vb 1
\&   $rfc_version = $session->version;
.Ve
.PP
This method returns the current value for the \s-1SNMP\s0 version associated with
the object.  The returned value is the corresponding version number defined by
the RFCs for the protocol version field (i.e. SNMPv1 == 0, SNMPv2c == 1, and 
SNMPv3 == 3).  The \s-1RFC\s0 versions are defined as constant by the module and can 
be exported by request (see \*(L"\s-1EXPORTS\s0\*(R"). 
.Sh "\fIerror()\fP \- get the current error message from the object"
.IX Subsection "error() - get the current error message from the object"
.Vb 1
\&   $error_message = $session->error;
.Ve
.PP
This method returns a text string explaining the reason for the last error.
An empty string is returned if no error has occurred.
.Sh "\fIhostname()\fP \- get the hostname associated with the object"
.IX Subsection "hostname() - get the hostname associated with the object"
.Vb 1
\&   $hostname = $session->hostname;
.Ve
.PP
This method returns the hostname string that is associated with the object 
as it was passed to the \f(CW\*(C`session()\*(C'\fR constructor.
.Sh "\fIerror_status()\fP \- get the current \s-1SNMP\s0 error-status from the object"
.IX Subsection "error_status() - get the current SNMP error-status from the object"
.Vb 1
\&   $error_status = $session->error_status;
.Ve
.PP
This method returns the numeric value of the error-status contained in the 
last \s-1SNMP\s0 message received by the object.
.Sh "\fIerror_index()\fP \- get the current \s-1SNMP\s0 error-index from the object"
.IX Subsection "error_index() - get the current SNMP error-index from the object"
.Vb 1
\&   $error_index = $session->error_index;
.Ve
.PP
This method returns the numeric value of the error-index contained in the 
last \s-1SNMP\s0 message received by the object.
.Sh "\fIvar_bind_list()\fP \- get the hash reference for the VarBindList values"
.IX Subsection "var_bind_list() - get the hash reference for the VarBindList values"
.Vb 1
\&   $values = $session->var_bind_list;
.Ve
.PP
This method returns a hash reference created using the ObjectName and the 
ObjectSyntax pairs in the VarBindList of the last \s-1SNMP\s0 message received by 
the object.  The keys of the hash consist of the \s-1OBJECT\s0 IDENTIFIERs in dotted
notation corresponding to each ObjectName in the VarBindList.  If any of the 
\&\s-1OBJECT\s0 IDENTIFIERs passed to the request method began with a leading dot, all
of the \s-1OBJECT\s0 \s-1IDENTIFIER\s0 hash keys will be prefixed with a leading dot.  If 
duplicate \s-1OBJECT\s0 IDENTIFIERs are present in the VarBindList they will be 
padded with spaces to make them an uniq hash key.  The value of each hash entry
is set equal to the value of the corresponding ObjectSyntax.  The undefined
value is returned if there has been a failure.
.Sh "\fIvar_bind_names()\fP \- get the array of the ObjectNames in the VarBindList"
.IX Subsection "var_bind_names() - get the array of the ObjectNames in the VarBindList"
.Vb 1
\&   @names = $session->var_bind_names;
.Ve
.PP
This method returns an array containing the \s-1OBJECT\s0 IDENTIFIERs corresponding
to the ObjectNames in the VarBindList in the order that they were received
in the last \s-1SNMP\s0 message.  The entries in the array will map directly to the
keys in the hash reference returned by the methods that perform \s-1SNMP\s0 message
exchanges and by the \f(CW\*(C`var_bind_list()\*(C'\fR and \f(CW\*(C`var_bind_types()\*(C'\fR methods.  The
array returned for the convenience methods \f(CW\*(C`get_table()\*(C'\fR and \f(CW\*(C`get_entries()\*(C'\fR
will be in lexicographical order.  An empty array is returned if there has been
a failure.
.Sh "\fIvar_bind_types()\fP \- get the hash reference for the VarBindList \s-1ASN\s0.1 types"
.IX Subsection "var_bind_types() - get the hash reference for the VarBindList ASN.1 types"
.Vb 1
\&   $types = $session->var_bind_types;
.Ve
.PP
This method returns a hash reference created using the ObjectName and the \s-1ASN\s0.1
type of the ObjectSyntax in the VarBindList of the last \s-1SNMP\s0 message received
by the object.  The keys of the hash consist of the \s-1OBJECT\s0 IDENTIFIERs in 
dotted notation corresponding to each ObjectName in the VarBindList.  The
value of each hash entry is set equal to the \s-1ASN\s0.1 type of the corresponding
ObjectSyntax.  Constants for the supported \s-1ASN\s0.1 types have been defined and
are exported by the package by default (see \*(L"\s-1EXPORTS\s0\*(R").  The undefined value
is returned if there has been a failure.
.Sh "\fItimeout()\fP \- set or get the current timeout period for the object"
.IX Subsection "timeout() - set or get the current timeout period for the object"
.Vb 1
\&   $seconds = $session->timeout([$seconds]);
.Ve
.PP
This method returns the current value for the Transport Layer timeout for 
the Net::SNMP object.  This value is the number of seconds that the object 
will wait for a response from the agent on the remote host.  The default 
timeout is 5.0 seconds.
.PP
If a parameter is specified, the timeout for the object is set to the provided
value if it falls within the range 1.0 to 60.0 seconds.  The undefined value
is returned upon an error and the \f(CW\*(C`error()\*(C'\fR method may be used to determine
the cause.
.Sh "\fIretries()\fP \- set or get the current retry count for the object"
.IX Subsection "retries() - set or get the current retry count for the object"
.Vb 1
\&   $count = $session->retries([$count]);
.Ve
.PP
This method returns the current value for the number of times to retry
sending a \s-1SNMP\s0 message to the remote host.  The default number of retries
is 1.
.PP
If a parameter is specified, the number of retries for the object is set to
the provided value if it falls within the range 0 to 20. The undefined value
is returned upon an error and the \f(CW\*(C`error()\*(C'\fR method may be used to determine 
the cause.
.Sh "\fImax_msg_size()\fP \- set or get the current maxMsgSize for the object"
.IX Subsection "max_msg_size() - set or get the current maxMsgSize for the object"
.Vb 1
\&   $octets = $session->max_msg_size([$octets]);
.Ve
.PP
This method returns the current value for the maximum message size 
(maxMsgSize) for the Net::SNMP object.  This value is the largest message size
in octets that can be prepared or processed by the object.  The default 
maxMsgSize is 1472 octets for UDP/IPv4, 1452 octets for UDP/IPv6, 1460 octets
for TCP/IPv4, and 1440 octets for TCP/IPv6.
.PP
If a parameter is specified, the maxMsgSize is set to the provided
value if it falls within the range 484 to 65535 octets.  The undefined 
value is returned upon an error and the \f(CW\*(C`error()\*(C'\fR method may be used to 
determine the cause.
.PP
\&\fB\s-1NOTE:\s0\fR When using SNMPv3, the maxMsgSize is actually contained in the \s-1SNMP\s0
message (as msgMaxSize).  If the value received from a remote device is less 
than the current maxMsgSize, the size is automatically adjusted to be the 
lower value.
.Sh "\fItranslate()\fP \- enable or disable the translation mode for the object"
.IX Subsection "translate() - enable or disable the translation mode for the object"
.Vb 14
\&   $mask = $session->translate([ 
\&                        $mode |
\&                        [ # Perl anonymous ARRAY reference 
\&                           ['-all'            => $mode0,]
\&                           ['-octetstring     => $mode1,]
\&                           ['-null'           => $mode2,]
\&                           ['-timeticks'      => $mode3,]
\&                           ['-opaque'         => $mode4,]
\&                           ['-nosuchobject'   => $mode5,] 
\&                           ['-nosuchinstance' => $mode6,]
\&                           ['-endofmibview'   => $mode7,]
\&                           ['-unsigned'       => $mode8]  
\&                        ]
\&                     ]);
.Ve
.PP
When the object decodes the GetResponse-PDU that is returned in response to 
a \s-1SNMP\s0 message, certain values are translated into a more \*(L"human readable\*(R" 
form.  By default the following translations occur: 
.IP "\(bu" 4
\&\s-1OCTET\s0 STRINGs and Opaques containing non-printable \s-1ASCII\s0 characters are 
converted into a hexadecimal representation prefixed with \*(L"0x\*(R".  \fB\s-1NOTE:\s0\fR  
The following \s-1ASCII\s0 control characters are considered to be printable by
the module:  \s-1NUL\s0(0x00), \s-1HT\s0(0x09), \s-1LF\s0(0x0A), \s-1FF\s0(0x0C), and \s-1CR\s0(0x0D). 
.IP "\(bu" 4
TimeTicks integer values are converted to a time format.
.IP "\(bu" 4
\&\s-1NULL\s0 values return the string \*(L"\s-1NULL\s0\*(R" instead of an empty string.
.IP "\(bu" 4
noSuchObject exception values return the string \*(L"noSuchObject\*(R" instead of an
empty string.  If translation is not enabled, the \s-1SNMP\s0 error-status field
is set to 128 which is equal to the exported definition \s-1NOSUCHOBJECT\s0 (see 
\&\*(L"\s-1EXPORTS\s0\*(R").
.IP "\(bu" 4
noSuchInstance exception values return the string \*(L"noSuchInstance\*(R" instead of 
an empty string.  If translation is not enabled, the \s-1SNMP\s0 error-status field
is set to 129 which is equal to the exported definition \s-1NOSUCHINSTANCE\s0 (see 
\&\*(L"\s-1EXPORTS\s0\*(R").
.IP "\(bu" 4
endOfMibView exception values return the string \*(L"endOfMibView\*(R" instead of an
empty string.  If translation is not enabled, the \s-1SNMP\s0 error-status field
is set to 130 which is equal to the exported definition \s-1ENDOFMIBVIEW\s0 (see 
\&\*(L"\s-1EXPORTS\s0\*(R").
.IP "\(bu" 4
Counter64, Counter, Gauge, and TimeTick values that have been incorrectly 
encoded as signed negative values are returned as unsigned values.
.PP
The \f(CW\*(C`translate()\*(C'\fR method can be invoked with two different types of arguments.
.PP
If the argument passed is any Perl variable type except an array reference,
the translation mode for all \s-1ASN\s0.1 types is set to either enabled or disabled, 
depending on the value of the passed parameter.  Any value that Perl would 
treat as a true value will set the mode to be enabled for all types, while a 
false value will disable translation for all types.
.PP
A reference to an array can be passed to the \f(CW\*(C`translate()\*(C'\fR method in order to
define the translation mode on a per \s-1ASN\s0.1 type basis.  The array is expected
to contain a list of named argument pairs for each \s-1ASN\s0.1 type that is to
be modified.  The arguments in the list are applied in the order that they
are passed in via the array.  Arguments at the end of the list supercede 
those passed earlier in the list.  The argument \*(L"\-all\*(R" can be used to specify
that the mode is to apply to all \s-1ASN\s0.1 types.  Only the arguments for the 
\&\s-1ASN\s0.1 types that are to be modified need to be included in the list.
.PP
The \f(CW\*(C`translate()\*(C'\fR method returns a bit mask indicating which \s-1ASN\s0.1 types
are to be translated.  Definitions of the bit to \s-1ASN\s0.1 type mappings can be
exported using the \fI:translate\fR tag (see \*(L"\s-1EXPORTS\s0\*(R").  The undefined value 
is returned upon an error and the \f(CW\*(C`error()\*(C'\fR method may be used to determine 
the cause.
.Sh "\fIdebug()\fP \- set or get the debug mode for the module"
.IX Subsection "debug() - set or get the debug mode for the module"
.Vb 1
\&   $mask = $session->debug([$mask]);
.Ve
.PP
This method is used to enable or disable debugging for the Net::SNMP module. 
Debugging can be enabled on a per component level as defined by a bit mask
passed to the \f(CW\*(C`debug()\*(C'\fR method.  The bit mask is broken up as follows:
.IP "\(bu" 4
0x02 \- Message or \s-1PDU\s0 encoding and decoding 
.IP "\(bu" 4
0x04 \- Transport Layer 
.IP "\(bu" 4
0x08 \- Dispatcher 
.IP "\(bu" 4
0x10 \- Message Processing  
.IP "\(bu" 4
0x20 \- Security
.PP
Symbols representing these bit mask values are defined by the module and can
be exported using the \fI:debug\fR tag (see \*(L"\s-1EXPORTS\s0\*(R").  If a non-numeric
value is passed to the \f(CW\*(C`debug()\*(C'\fR method, it is evaluated in boolean context.
Debugging for all of the components is then enabled or disabled based on the
resulting truth value.
.PP
The current debugging mask is returned by the method.  Debugging can also be
enabled using the stand alone function \f(CW\*(C`snmp_debug()\*(C'\fR. This function can be
exported by request (see \*(L"\s-1EXPORTS\s0\*(R"). 
.SH "FUNCTIONS"
.IX Header "FUNCTIONS"
.Sh "\fIoid_base_match()\fP \- determine if an \s-1OID\s0 has a specified \s-1OID\s0 base"
.IX Subsection "oid_base_match() - determine if an OID has a specified OID base"
.Vb 1
\&   $value = oid_base_match($base_oid, $oid);
.Ve
.PP
This function takes two \s-1OBJECT\s0 IDENTIFIERs in dotted notation and returns a
true value (i.e. 0x1) if the second \s-1OBJECT\s0 \s-1IDENTIFIER\s0 is equal to or is a 
child of the first \s-1OBJECT\s0 \s-1IDENTIFIER\s0 in the \s-1SNMP\s0 Management Information Base 
(\s-1MIB\s0).  This function can be used in conjunction with the \f(CW\*(C`get\-next\-request()\*(C'\fR
or \f(CW\*(C`get\-bulk\-request()\*(C'\fR methods to determine when a \s-1OBJECT\s0 \s-1IDENTIFIER\s0 in the 
GetResponse-PDU is no longer in the desired \s-1MIB\s0 tree branch.
.Sh "\fIoid_lex_sort()\fP \- sort a list of \s-1OBJECT\s0 IDENTIFIERs lexicographically"
.IX Subsection "oid_lex_sort() - sort a list of OBJECT IDENTIFIERs lexicographically"
.Vb 1
\&   @sorted_oids = oid_lex_sort(@oids);
.Ve
.PP
This function takes a list of \s-1OBJECT\s0 IDENTIFIERs in dotted notation and returns
the listed sorted in lexicographical order.
.Sh "\fIsnmp_type_ntop()\fP \- convert an \s-1ASN\s0.1 type to presentation format"
.IX Subsection "snmp_type_ntop() - convert an ASN.1 type to presentation format"
.Vb 1
\&   $text = snmp_type_ntop($type);
.Ve
.PP
This function takes an \s-1ASN\s0.1 type octet and returns a text string suitable for
presentation.  Some \s-1ASN\s0.1 type definitions map to the same octet value when
encoded.  This method cannot distinquish between these multiple mappings and
the most basic type name will be returned.
.Sh "\fIticks_to_time()\fP \- convert TimeTicks to formatted time"
.IX Subsection "ticks_to_time() - convert TimeTicks to formatted time"
.Vb 1
\&   $time = ticks_to_time($timeticks);
.Ve
.PP
This function takes an \s-1ASN\s0.1 TimeTicks value and returns a string representing
the time defined by the value.  The TimeTicks value is expected to be a 
non-negative integer value representing the time in hundredths of a second 
since some epoch.  The returned string will display the time in days, hours, 
and seconds format according to the value of the TimeTicks argument.
.SH "EXPORTS"
.IX Header "EXPORTS"
The Net::SNMP module uses the \fIExporter\fR module to export useful constants 
and subroutines.  These exportable symbols are defined below and follow the
rules and conventions of the \fIExporter\fR module (see Exporter).
.IP "Default" 4
.IX Item "Default"
&snmp_dispatcher, \s-1INTEGER\s0, \s-1INTEGER32\s0, \s-1OCTET_STRING\s0, \s-1OBJECT_IDENTIFIER\s0, 
\&\s-1IPADDRESS\s0, \s-1COUNTER\s0, \s-1COUNTER32\s0, \s-1GAUGE\s0, \s-1GAUGE32\s0, \s-1UNSIGNED32\s0, \s-1TIMETICKS\s0, 
\&\s-1OPAQUE\s0, \s-1COUNTER64\s0, \s-1NOSUCHOBJECT\s0, \s-1NOSUCHINSTANCE\s0, \s-1ENDOFMIBVIEW\s0 
.IP "Exportable" 4
.IX Item "Exportable"
&snmp_debug, &snmp_dispatcher, &snmp_type_ntop, &oid_base_match, &oid_lex_sort, 
&ticks_to_time, \s-1INTEGER\s0, \s-1INTEGER32\s0, \s-1OCTET_STRING\s0, \s-1NULL\s0, \s-1OBJECT_IDENTIFIER\s0, 
\&\s-1SEQUENCE\s0, \s-1IPADDRESS\s0, \s-1COUNTER\s0, \s-1COUNTER32\s0, \s-1GAUGE\s0, \s-1GAUGE32\s0, \s-1UNSIGNED32\s0, \s-1TIMETICKS\s0,
\&\s-1OPAQUE\s0, \s-1COUNTER64\s0, \s-1NOSUCHOBJECT\s0, \s-1NOSUCHINSTANCE\s0, \s-1ENDOFMIBVIEW\s0, \s-1GET_REQUEST\s0,
\&\s-1GET_NEXT_REQUEST\s0, \s-1GET_RESPONSE\s0, \s-1SET_REQUEST\s0, \s-1TRAP\s0, \s-1GET_BULK_REQUEST\s0,
\&\s-1INFORM_REQUEST\s0, \s-1SNMPV2_TRAP\s0, \s-1REPORT\s0, \s-1DEBUG_ALL\s0, \s-1DEBUG_NONE\s0, \s-1DEBUG_MESSAGE\s0,
\&\s-1DEBUG_TRANSPORT\s0, \s-1DEBUG_DISPATCHER\s0,DEBUG_PROCESSING, \s-1DEBUG_SECURITY\s0, \s-1COLD_START\s0,
\&\s-1WARM_START\s0, \s-1LINK_DOWN\s0, \s-1LINK_UP\s0,AUTHENTICATION_FAILURE, \s-1EGP_NEIGHBOR_LOSS\s0,
\&\s-1ENTERPRISE_SPECIFIC\s0, \s-1SNMP_VERSION_1\s0,SNMP_VERSION_2C, \s-1SNMP_VERSION_3\s0, \s-1SNMP_PORT\s0,
\&\s-1SNMP_TRAP_PORT\s0, \s-1TRANSLATE_NONE\s0,TRANSLATE_OCTET_STRING, \s-1TRANSLATE_NULL\s0,
\&\s-1TRANSLATE_TIMETICKS\s0, \s-1TRANSLATE_OPAQUE\s0,TRANSLATE_NOSUCHOBJECT,
\&\s-1TRANSLATE_NOSUCHINSTANCE\s0, \s-1TRANSLATE_ENDOFMIBVIEW\s0, \s-1TRANSLATE_UNSIGNED\s0, 
\&\s-1TRANSLATE_ALL\s0
.IP "Tags" 4
.IX Item "Tags"
.RS 4
.PD 0
.IP ":asn1" 4
.IX Item ":asn1"
.PD
\&\s-1INTEGER\s0, \s-1INTEGER32\s0, \s-1OCTET_STRING\s0, \s-1NULL\s0, \s-1OBJECT_IDENTIFIER\s0, \s-1SEQUENCE\s0, 
\&\s-1IPADDRESS\s0, \s-1COUNTER\s0, \s-1COUNTER32\s0, \s-1GAUGE\s0, \s-1GAUGE32\s0, \s-1UNSIGNED32\s0, \s-1TIMETICKS\s0, \s-1OPAQUE\s0, 
\&\s-1COUNTER64\s0, \s-1NOSUCHOBJECT\s0, \s-1NOSUCHINSTANCE\s0, \s-1ENDOFMIBVIEW\s0, \s-1GET_REQUEST\s0, 
\&\s-1GET_NEXT_REQUEST\s0, \s-1GET_RESPONSE\s0, \s-1SET_REQUEST\s0, \s-1TRAP\s0, \s-1GET_BULK_REQUEST\s0, 
\&\s-1INFORM_REQUEST\s0, \s-1SNMPV2_TRAP\s0, \s-1REPORT\s0
.IP ":debug" 4
.IX Item ":debug"
&snmp_debug, \s-1DEBUG_ALL\s0, \s-1DEBUG_NONE\s0, \s-1DEBUG_MESSAGE\s0, \s-1DEBUG_TRANSPORT\s0, 
\&\s-1DEBUG_DISPATCHER\s0, \s-1DEBUG_PROCESSING\s0, \s-1DEBUG_SECURITY\s0
.IP ":generictrap" 4
.IX Item ":generictrap"
\&\s-1COLD_START\s0, \s-1WARM_START\s0, \s-1LINK_DOWN\s0, \s-1LINK_UP\s0, \s-1AUTHENTICATION_FAILURE\s0,
\&\s-1EGP_NEIGHBOR_LOSS\s0, \s-1ENTERPRISE_SPECIFIC\s0
.IP ":snmp" 4
.IX Item ":snmp"
&snmp_debug, &snmp_dispatcher, &snmp_type_ntop, &oid_base_match, &oid_lex_sort, 
&ticks_to_time, \s-1SNMP_VERSION_1\s0, \s-1SNMP_VERSION_2C\s0, \s-1SNMP_VERSION_3\s0, \s-1SNMP_PORT\s0,
\&\s-1SNMP_TRAP_PORT\s0
.IP ":translate" 4
.IX Item ":translate"
\&\s-1TRANSLATE_NONE\s0, \s-1TRANSLATE_OCTET_STRING\s0, \s-1TRANSLATE_NULL\s0, \s-1TRANSLATE_TIMETICKS\s0,
\&\s-1TRANSLATE_OPAQUE\s0, \s-1TRANSLATE_NOSUCHOBJECT\s0, \s-1TRANSLATE_NOSUCHINSTANCE\s0, 
\&\s-1TRANSLATE_ENDOFMIBVIEW\s0, \s-1TRANSLATE_UNSIGNED\s0, \s-1TRANSLATE_ALL\s0
.IP ":ALL" 4
.IX Item ":ALL"
All of the above exportable items.
.RE
.RS 4
.RE
.SH "EXAMPLES"
.IX Header "EXAMPLES"
.Sh "1. Blocking SNMPv1 get-request for sysUpTime"
.IX Subsection "1. Blocking SNMPv1 get-request for sysUpTime"
This example gets the sysUpTime from a remote host.
.PP
.Vb 1
\&   #! /usr/local/bin/perl
.Ve
.PP
.Vb 1
\&   use strict;
.Ve
.PP
.Vb 1
\&   use Net::SNMP;
.Ve
.PP
.Vb 5
\&   my ($session, $error) = Net::SNMP->session(
\&      -hostname  => shift || 'localhost',
\&      -community => shift || 'public',
\&      -port      => shift || 161 
\&   );
.Ve
.PP
.Vb 4
\&   if (!defined($session)) {
\&      printf("ERROR: %s.\en", $error);
\&      exit 1;
\&   }
.Ve
.PP
.Vb 1
\&   my $sysUpTime = '1.3.6.1.2.1.1.3.0';
.Ve
.PP
.Vb 3
\&   my $result = $session->get_request(
\&      -varbindlist => [$sysUpTime]
\&   );
.Ve
.PP
.Vb 5
\&   if (!defined($result)) {
\&      printf("ERROR: %s.\en", $session->error);
\&      $session->close;
\&      exit 1;
\&   }
.Ve
.PP
.Vb 3
\&   printf("sysUpTime for host '%s' is %s\en",
\&      $session->hostname, $result->{$sysUpTime} 
\&   );
.Ve
.PP
.Vb 1
\&   $session->close;
.Ve
.PP
.Vb 1
\&   exit 0;
.Ve
.Sh "2. Blocking SNMPv3 set-request of sysContact"
.IX Subsection "2. Blocking SNMPv3 set-request of sysContact"
This example sets the sysContact information on the remote host to 
\&\*(L"Help Desk x911\*(R".  The named arguments passed to the \f(CW\*(C`session()\*(C'\fR constructor
are for the demonstration of syntax only.  These parameters will need to be
set according to the SNMPv3 parameters of the remote host used by the script. 
.PP
.Vb 1
\&   #! /usr/local/bin/perl
.Ve
.PP
.Vb 1
\&   use strict;
.Ve
.PP
.Vb 1
\&   use Net::SNMP;
.Ve
.PP
.Vb 8
\&   my ($session, $error) = Net::SNMP->session(
\&      -hostname     => 'myv3host.company.com',
\&      -version      => 'snmpv3',
\&      -username     => 'myv3Username',
\&      -authkey      => '0x05c7fbde31916f64da4d5b77156bdfa7',
\&      -authprotocol => 'md5',
\&      -privkey      => '0x93725fd3a02a48ce02df4e065a1c1746'
\&   );
.Ve
.PP
.Vb 4
\&   if (!defined($session)) {
\&      printf("ERROR: %s.\en", $error);
\&      exit 1;
\&   }
.Ve
.PP
.Vb 1
\&   my $sysContact = '1.3.6.1.2.1.1.4.0';
.Ve
.PP
.Vb 3
\&   my $result = $session->set_request(
\&      -varbindlist => [$sysContact, OCTET_STRING, 'Help Desk x911']
\&   );
.Ve
.PP
.Vb 5
\&   if (!defined($result)) {
\&      printf("ERROR: %s.\en", $session->error);
\&      $session->close;
\&      exit 1;
\&   }
.Ve
.PP
.Vb 3
\&   printf("sysContact for host '%s' set to '%s'\en", 
\&      $session->hostname, $result->{$sysContact}
\&   );
.Ve
.PP
.Vb 1
\&   $session->close;
.Ve
.PP
.Vb 1
\&   exit 0;
.Ve
.Sh "3. Non-blocking SNMPv2c get-bulk-request for ifTable"
.IX Subsection "3. Non-blocking SNMPv2c get-bulk-request for ifTable"
This example gets the contents of the ifTable by sending get-bulk-requests
until the responses are no longer part of the ifTable.  The ifTable can also 
be retrieved using the \f(CW\*(C`get_table()\*(C'\fR method. 
.PP
.Vb 1
\&   #! /usr/local/bin/perl
.Ve
.PP
.Vb 1
\&   use strict;
.Ve
.PP
.Vb 1
\&   use Net::SNMP qw(:snmp);
.Ve
.PP
.Vb 7
\&   my ($session, $error) = Net::SNMP->session(
\&      -version     => 'snmpv2c',
\&      -nonblocking => 1,
\&      -hostname    => shift || 'localhost',
\&      -community   => shift || 'public',
\&      -port        => shift || 161 
\&   );
.Ve
.PP
.Vb 4
\&   if (!defined($session)) {
\&      printf("ERROR: %s.\en", $error);
\&      exit 1;
\&   }
.Ve
.PP
.Vb 1
\&   my $ifTable = '1.3.6.1.2.1.2.2';
.Ve
.PP
.Vb 5
\&   my $result = $session->get_bulk_request(
\&      -callback       => [\e&table_cb, {}],
\&      -maxrepetitions => 10,
\&      -varbindlist    => [$ifTable]
\&   );
.Ve
.PP
.Vb 5
\&   if (!defined($result)) {
\&      printf("ERROR: %s.\en", $session->error);
\&      $session->close;
\&      exit 1;
\&   }
.Ve
.PP
.Vb 1
\&   snmp_dispatcher();
.Ve
.PP
.Vb 1
\&   $session->close;
.Ve
.PP
.Vb 1
\&   exit 0;
.Ve
.PP
.Vb 3
\&   sub table_cb
\&   {
\&      my ($session, $table) = @_;
.Ve
.PP
.Vb 1
\&      if (!defined($session->var_bind_list)) {
.Ve
.PP
.Vb 1
\&         printf("ERROR: %s\en", $session->error);
.Ve
.PP
.Vb 1
\&      } else {
.Ve
.PP
.Vb 4
\&         # Loop through each of the OIDs in the response and assign
\&         # the key/value pairs to the anonymous hash that is passed
\&         # to the callback.  Make sure that we are still in the table
\&         # before assigning the key/values.
.Ve
.PP
.Vb 1
\&         my $next;
.Ve
.PP
.Vb 8
\&         foreach my $oid (oid_lex_sort(keys(%{$session->var_bind_list}))) {
\&            if (!oid_base_match($ifTable, $oid)) {
\&               $next = undef;
\&               last;
\&            }
\&            $next = $oid; 
\&            $table->{$oid} = $session->var_bind_list->{$oid};   
\&         }
.Ve
.PP
.Vb 2
\&         # If $next is defined we need to send another request 
\&         # to get more of the table.
.Ve
.PP
.Vb 1
\&         if (defined($next)) {
.Ve
.PP
.Vb 5
\&            $result = $session->get_bulk_request(
\&               -callback       => [\e&table_cb, $table],
\&               -maxrepetitions => 10,
\&               -varbindlist    => [$next]
\&            );
.Ve
.PP
.Vb 3
\&            if (!defined($result)) {
\&               printf("ERROR: %s\en", $session->error);
\&            }
.Ve
.PP
.Vb 1
\&         } else {
.Ve
.PP
.Vb 1
\&            # We are no longer in the table, so print the results.
.Ve
.PP
.Vb 3
\&            foreach my $oid (oid_lex_sort(keys(%{$table}))) {
\&               printf("%s => %s\en", $oid, $table->{$oid});
\&            }
.Ve
.PP
.Vb 3
\&         }
\&      }
\&   }
.Ve
.Sh "4. Non-blocking SNMPv1 get-request for sysUpTime on multiple hosts"
.IX Subsection "4. Non-blocking SNMPv1 get-request for sysUpTime on multiple hosts"
This example polls several hosts for their sysUpTime using non-blocking
objects and reports a warning if this value is less than the value from
the last poll.
.PP
.Vb 1
\&   #! /usr/local/bin/perl
.Ve
.PP
.Vb 1
\&   use strict;
.Ve
.PP
.Vb 1
\&   use Net::SNMP qw(snmp_dispatcher ticks_to_time);
.Ve
.PP
.Vb 1
\&   # List of hosts to poll
.Ve
.PP
.Vb 1
\&   my @HOSTS = qw(1.1.1.1 1.1.1.2 localhost);
.Ve
.PP
.Vb 2
\&   # Poll interval (in seconds).  This value should be greater 
\&   # than the number of retries plus one, times the timeout value.
.Ve
.PP
.Vb 1
\&   my $INTERVAL  = 60;
.Ve
.PP
.Vb 1
\&   # Maximum number of polls, including the initial poll.
.Ve
.PP
.Vb 1
\&   my $MAX_POLLS = 10;
.Ve
.PP
.Vb 1
\&   my $sysUpTime = '1.3.6.1.2.1.1.3.0';
.Ve
.PP
.Vb 1
\&   # Create a session for each host and queue the first get-request.
.Ve
.PP
.Vb 1
\&   foreach my $host (@HOSTS) {
.Ve
.PP
.Vb 11
\&      my ($session, $error) = Net::SNMP->session(
\&         -hostname    => $host,
\&         -nonblocking => 0x1,   # Create non-blocking objects
\&         -translate   => [
\&            -timeticks => 0x0   # Turn off so sysUpTime is numeric
\&         ]  
\&      );
\&      if (!defined($session)) {
\&         printf("ERROR: %s.\en", $error);
\&         exit 1;
\&      }
.Ve
.PP
.Vb 3
\&      # Queue the get-request, passing references to variables that
\&      # will be used to store the last sysUpTime and the number of
\&      # polls that this session has performed.
.Ve
.PP
.Vb 1
\&      my ($last_uptime, $num_polls) = (0, 0);
.Ve
.PP
.Vb 6
\&      $session->get_request(
\&          -varbindlist => [$sysUpTime],
\&          -callback    => [
\&             \e&validate_sysUpTime_cb, \e$last_uptime, \e$num_polls
\&          ]
\&      );
.Ve
.PP
.Vb 1
\&   }
.Ve
.PP
.Vb 2
\&   # Define a reference point for all of the polls
\&   my $EPOC = time();
.Ve
.PP
.Vb 2
\&   # Enter the event loop
\&   snmp_dispatcher();
.Ve
.PP
.Vb 1
\&   exit 0;
.Ve
.PP
.Vb 3
\&   sub validate_sysUpTime_cb
\&   {
\&      my ($session, $last_uptime, $num_polls) = @_;
.Ve
.PP
.Vb 1
\&      if (!defined($session->var_bind_list)) {
.Ve
.PP
.Vb 1
\&         printf("%-15s  ERROR: %s\en", $session->hostname, $session->error);
.Ve
.PP
.Vb 1
\&      } else {
.Ve
.PP
.Vb 1
\&         # Validate the sysUpTime
.Ve
.PP
.Vb 1
\&         my $uptime = $session->var_bind_list->{$sysUpTime};
.Ve
.PP
.Vb 11
\&         if ($uptime < ${$last_uptime}) {
\&            printf("%-15s  WARNING: %s is less than %s\en",
\&               $session->hostname, 
\&               ticks_to_time($uptime), 
\&               ticks_to_time(${$last_uptime})
\&            );
\&         } else {
\&            printf("%-15s  Ok (%s)\en", 
\&               $session->hostname, ticks_to_time($uptime)
\&            );
\&         }
.Ve
.PP
.Vb 2
\&         # Store the new sysUpTime
\&         ${$last_uptime} = $uptime;
.Ve
.PP
.Vb 1
\&      }
.Ve
.PP
.Vb 3
\&      # Queue the next message if we have not reached $MAX_POLLS.  
\&      # Since we do not provide a -callback argument, the same 
\&      # callback and it's original arguments will be used.
.Ve
.PP
.Vb 7
\&      if (++${$num_polls} < $MAX_POLLS) {
\&         my $delay = (($INTERVAL * ${$num_polls}) + $EPOC) - time();
\&         $session->get_request(
\&            -delay       => ($delay >= 0) ? $delay : 0,
\&            -varbindlist => [$sysUpTime]
\&         );
\&      }
.Ve
.PP
.Vb 2
\&      $session->error_status;
\&   }
.Ve
.SH "REQUIREMENTS"
.IX Header "REQUIREMENTS"
.IP "\(bu" 4
The Net::SNMP module uses syntax that is not supported in versions of Perl 
earlier than v5.6.0. 
.IP "\(bu" 4
The non-core modules \fICrypt::DES\fR, \fIDigest::MD5\fR, \fIDigest::SHA1\fR, and 
\&\fIDigest::HMAC\fR are required to support SNMPv3. 
.IP "\(bu" 4
In order to support the \s-1AES\s0 Cipher Algorithm as a SNMPv3 privacy protocol, the
non-core module \fICrypt::Rijndael\fR is needed.
.IP "\(bu" 4
To use UDP/IPv6 or TCP/IPv6 as a Transport Domain, the non-core module 
\&\fISocket6\fR is needed.
.SH "AUTHOR"
.IX Header "AUTHOR"
David M. Town <dtown@cpan.org>
.SH "ACKNOWLEDGMENTS"
.IX Header "ACKNOWLEDGMENTS"
The original concept for this module was based on \fISNMP_Session.pm\fR 
written by Simon Leinen <simon@switch.ch>.
.PP
The Abstract Syntax Notation One (\s-1ASN\s0.1) encode and decode methods were 
originally derived by example from the \s-1CMU\s0 \s-1SNMP\s0 package whose copyright 
follows: Copyright (c) 1988, 1989, 1991, 1992 by Carnegie Mellon University. 
All rights reserved. 
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1998\-2005 David M. Town.  All rights reserved.  This program 
is free software; you may redistribute it and/or modify it under the same
terms as Perl itself.

Creat By MiNi SheLL
Email: devilkiller@gmail.com