To overcome the problem I registered my own parser handler for the sysObjectId
toke in my subagent.
void subagentMnitorParseConfigSysObjectID(const char *token, char *cptr)
{
char tmpbuf[1024];
extern oid sysObjectID[];
extern size_t sysObjectIDLength;
sysObjectIDLength = MAX_OID_LEN;
if (!read_objid(cptr, sysObjectID, &sysObjectIDLength)) {
snprintf(tmpbuf,
sizeof(tmpbuf),
"sysobjectid token not a parsable OID:\n\t%s",
cptr);
config_perror(tmpbuf);
}
}
int main( int argc, char* argv[] )
{
...
register_config_handler("subagent",
"sysobjectid",
subagentParseConfigSysObjectID,
NULL,
NULL);
}
> Date: Wed, 11 Mar 2009 16:11:17 +0000
> Subject: Re: Subagent OID
> From: [email protected]
> To: [email protected]
> CC: [email protected]
>
> 2009/3/10 Samer Vazdekis <[email protected]>:
> > One problem, keep getting this warning.
> >
> > Warning: Unknown token: sysObjectID
> > So, sysObjectID keeps it's default value.
>
> Hmmm... that looks as if your subagent doesn't
> include the 'mibII/system_mib' module.
> (It worked for me, because I was running tests
> using the main agent binary as my subagent).
>
> A workaround would certainly be to include this
> module within your subagent.
>
> (Note that running "configure --with-mib-modules...
> probably won't work, since this is concerned with
> building the main SNMP agent. You'd need to tweak
> your subagent build structure instead).
>
> But a longer-term solution would probably be
> to move the "sysObjectID" config handling away
> from the system_mib module, and into the main
> agent code.
> I'd like input from some of the other core
> developers before I do this, though.
> (And we're definitely looking at the next major
> release - it's not the sort of thing we could
> sensibly change in an existing line).
>
>
> Dave
_________________________________________________________________
Reinvent how you stay in touch with the new Windows Live Messenger.
http://go.microsoft.com/?linkid=9650731------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders