Yes I did try the "sysobjectid" directive but didn't work. Looking at code, I
see the open-pdu OID is always set to the sysObjectId. I have a multiple agentx
subagents in the system and each should have it's own unique subagent OID.
In /agent/mibgroup/agentx/client.c
int
agentx_open_session(netsnmp_session * ss)
{
netsnmp_pdu *pdu, *response;
extern oid version_sysoid[];
DEBUGMSGTL(("agentx/subagent", "opening session \n"));
if (ss == NULL || !IS_AGENTX_VERSION(ss->version)) {
return 0;
}
pdu = snmp_pdu_create(AGENTX_MSG_OPEN);
if (pdu == NULL)
return 0;
pdu->time = 0;
snmp_add_var(pdu, version_sysoid, SYSTEM_DOT_MIB_LENGTH,
's', "Net-SNMP AgentX sub-agent");
if (agentx_synch_response(ss, pdu, &response) != STAT_SUCCESS)
return 0;
if (response->errstat != SNMP_ERR_NOERROR) {
snmp_free_pdu(response);
return 0;
}
ss->sessid = response->sessid;
snmp_free_pdu(response);
DEBUGMSGTL(("agentx/subagent", "open \n"));
return 1;
}
> Date: Tue, 10 Mar 2009 14:36:02 +0000
> Subject: Re: FW: Subagent OID
> From: [email protected]
> To: [email protected]
> CC: [email protected];
> [email protected]
>
> 2009/3/10 Samer Vazdekis <[email protected]>:
> > Would adding a new interface to specifically set the open-pdu subagent OID
> > be a good idea?. It will overwrite the oid given to snmp_add_var() in
> > agentx_open_session(), in ./agent/mibgroup/agentx/client.c
>
> That doesn't feel necessary.
> Just use the "sysobjectid" directive in the subagent's config file.
>
> Dave
_________________________________________________________________
Reunite with the people closest to you, chat face to face with Messenger.
http://go.microsoft.com/?linkid=9650736------------------------------------------------------------------------------
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders