1OID(3)                User Contributed Perl Documentation               OID(3)
2
3
4

NAME

6       NetSNMP::OID - Perl extension for manipulating OIDs
7

SYNOPSIS

9         use NetSNMP::OID;
10
11         my $oid = new NetSNMP::OID('sysContact.0');
12
13         if ($oid < new NetSNMP::OID('ifTable')) {
14             do_something();
15         }
16
17         my @numarray = $oid->to_array();
18
19         # appending oids
20         $oid = new NetSNMP::OID('.1.3');
21         $oid += ".6.1";
22         # -> .1.3.6.1
23
24         # appending index strings
25
26         $oid2 = $oid + "\"wes\"";
27         # -> .1.3.6.1.3.119.101.115
28
29         $oid3 = $oid + "\'wes\'";
30         # -> .1.3.6.1.119.101.115
31
32         $len = $oid3->length();
33         # -> 7
34
35         # retrieving indexes from an oid:
36         $arrayref = $tableoid->get_indexes()
37

DESCRIPTION

39       The NetSNMP::OID module is a simple wrapper around a C-based net-snmp
40       oid (which is an array of unsigned integers).  The OID is internally
41       stored as a C array of integers for speed purposes when doing
42       comparisons, etc.
43
44       The standard logical expression operators (<, >, ==, ...) are
45       overloaded such that lexographical comparisons may be done with them.
46
47       The + operator is overloaded to allow you to append stuff on to the end
48       of a OID, like index segments of a table, for example.
49
50   EXPORT
51       int snmp_oid_compare(oid1, oid2) int compare(oid1, oid2)
52

AUTHOR

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

SEE ALSO

57       SNMP, perl.
58
60       Copyright (c) 2002 Networks Associates Technology, Inc.  All Rights
61       Reserved.  This program is free software; you can redistribute it
62       and/or modify it under the same terms as Perl itself.
63
64
65
66perl v5.34.0                      2021-07-29                            OID(3)
Impressum