
Hi,
Suppose you try to create a subagent using the output from "smidump -f netsnmp".
In the header file you get definitions like
typedef struct yourMib { uint32_t *foo; void *_clientData; uint32_t __foo; } yourMib_t
Now take a look a the switch statement that takes care of returned the correct value to the master agent (switch based on vp's magic number). It looks like this:
static yourMib_t yourMib; // ... return (unsigned char *) &yourMib.foo;
However, what the master agent is actually expecting is a pointer to the value, not a pointer to the pointer to the value. Looks nice in those snmpwalk outputs, such memory addresses :-)
Is this a problem with libsmi or am I overlooking something?
On a sidenote, what I am supposed to use *_clientData and __foo in the example above for?
Thanks,
Remco.
-- !! This message is brought to you via the `libsmi' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to libsmi-request@ibr.cs.tu-bs.de. !! See http://www.ibr.cs.tu-bs.de/projects/libsmi/ for more information.