[AGENT++] how to change default community?

Jochen Katz katz at agentpp.com
Fri Dec 22 17:31:22 CET 2006


Hi,

> I am developing , agenpro2 base SNMP agent.
> It uses default community   public  / public .
>  
> I wanna change default community of agent.
>  
> Where can I change default community stfing?

if you use snmp community mib, just configure the desired mapping; from
atm_mib example:
	// add SNMPv1/v2c community to v3 security name mapping
	OctetStr co("public");
	MibTableRow* row = snmpCommunityEntry::instance->
	    add_row(Oidx::from_string(co, FALSE));
	OctetStr tag("v1v2cPermittedManagers");
	snmpCommunityEntry::instance->
	    set_row(row, co, co,
		    reqList->get_v3mp()->get_local_engine_id(),
		    "", tag, 3, 1);

If you disabled SNMPv3, you can use
RequestList::set_read/write_community functions.

Regards,
  Jochen





More information about the AGENTPP mailing list