Skip to content

Pointer to structure for addReadWriteStringHandler results in SNMP no such object  #41

@dmarc1234

Description

@dmarc1234

I am trying to point the addReadWriteStringHandler() to a char array within a global structure to allow a GET and SET to be performed on it and I am having real problems getting to work.

I have tried creating a pointer to the structure and dereferencing the structure like this:

SNMPAgent * snmp;
snmp = new SNMPAgent("public", "private");

CONFIG_REG conf = new CONFIG_REG();
snmp->addReadWriteStringHandler(".1.3.6.1.4.1.38218.1.3.1.0", (char
*) (*conf).sensor_name, 40, true);

But get a SNMP not such object reply in iReasoning MIB browser.

The snmp->addReadOnlyStaticStringHandler() works okay so I am at a loss as to why it will not work ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions