Skip to content

print_varbind: Use the correct OID size for OIDs#6

Open
ernie wants to merge 1 commit intomixtli:masterfrom
ernie:fix-print-varbind
Open

print_varbind: Use the correct OID size for OIDs#6
ernie wants to merge 1 commit intomixtli:masterfrom
ernie:fix-print-varbind

Conversation

@ernie
Copy link

@ernie ernie commented Jun 23, 2014

Looks like some code is still reading varbinds as long regardless of type. Apologies for not including a test, but the test harness keeps segfaulting for me on my machine.

@ernie
Copy link
Author

ernie commented Jun 23, 2014

Incidentally, stumbled upon this while trying to track down some way to get named number lists to translate to their names. Given, for instance:

ltmPoolStatusAvailState OBJECT-TYPE 
    SYNTAX INTEGER {
        none(0),
        green(1),
        yellow(2),
        red(3),
        blue(4),
        grey(5)
    }
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The availability of the specified pool indicated in color.
        none - error;
        green - available in some capacity;
        yellow - not currently available;
        red - not available;
        blue - availability is unknown;
        gray - unlicensed"
    ::= { ltmPoolStatusEntry 2 } 

I can only retrieve an integer value from the varbind, but Net-SNMP's snmpget returns:

F5-BIGIP-LOCAL-MIB::ltmPoolStatusAvailState."a_string" = INTEGER: green(1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants