Unix/Linux Go Back    

CentOS 7.0 - man page for netsnmp::oid (centos section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

OID(3)			       User Contributed Perl Documentation			   OID(3)

       NetSNMP::OID - Perl extension for manipulating OIDs

	 use NetSNMP::OID;

	 my $oid = new NetSNMP::OID('sysContact.0');

	 if ($oid < new NetSNMP::OID('ifTable')) {

	 my @numarray = $oid->to_array();

	 # appending oids
	 $oid = new NetSNMP::OID('.1.3');
	 $oid += ".6.1";
	 # -> .

	 # appending index strings

	 $oid2 = $oid + "\"wes\"";
	 # -> .

	 $oid3 = $oid + "\'wes\'";
	 # -> .

	 $len = $oid3->length();
	 # -> 7

	 # retrieving indexes from an oid:
	 $arrayref = $tableoid->get_indexes()

       The NetSNMP::OID module is a simple wrapper around a C-based net-snmp oid (which is an
       array of unsigned integers).  The OID is internally stored as a C array of integers for
       speed purposes when doing comparisons, etc.

       The standard logical expression operators (<, >, ==, ...) are overloaded such that
       lexographical comparisons may be done with them.

       The + operator is overloaded to allow you to append stuff on to the end of a OID, like
       index segments of a table, for example.

       int snmp_oid_compare(oid1, oid2) int compare(oid1, oid2)

       Wes Hardaker, <hardaker@users.sourceforge.net>

       SNMP, perl.

       Copyright (c) 2002 Networks Associates Technology, Inc.	All Rights Reserved.  This
       program is free software; you can redistribute it and/or modify it under the same terms as
       Perl itself.

perl v5.16.3				    2012-10-09					   OID(3)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 03:34 PM.