convert oid to numeric in Perl API

Joao Ferreira gmail <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hello all,

I did not find a function in the Perl API to obtain
the .number.number.number representation of a given OID...

so I wrote my own function.... 

-------------------------------------
sub oid2numeric {
    my ($oid) = shift;
    my @vals = $oid->to_array();
    my $joined = join('.',@vals);
    $joined = '.' . $joined;
    debug_log_hv('oid2txt |' . "$oid". '|' . "$joined" . '|');
    return $joined;
}
--------------------------------------

but I guess there should be such a function somewhere...

any pointers ?

Thanks

Joao



------------------------------------------------------------------------------

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.