How can I create a new context in snmpv3 agent?

Luigi Tura luigi.tura____cefriel.it
Wed Apr 16 10:26:44 CEST 2003


It seems that is impossible to introduce a context different from "".
I'm sure I'm doing something wrong, but I don't know what.
Here is the code I 'm trying to use to introduce a new context (I'm trying 
to modify the dynamic_table agent++ example):

// 
-------------------------------------------------------------------------------------
#ifdef _SNMPv3

	Vacm* vacm = new Vacm(*mib);
	reqList->set_vacm(vacm);

	vacm->addNewContext("testContext");
	
	vacm->addNewGroup(SecurityModel_USM,
		"testGroup",
		"newtestGroup",
		storageType_volatile);

	vacm->addNewAccessEntry("newtestGroup",
		"testContext",
		SecurityModel_USM,
		SecurityLevel_authPriv,
		match_exact,
		"testView",
		"testView",
		"testView",
		storageType_nonVolatile);

	vacm->addNewView("testView",
		"1.3",
		"",
		view_included,
		storageType_nonVolatile);

#endif
// 
-------------------------------------------------------------------------------------

Any suggestion is truly appreciated.
Thanks a lot.

Luigi




More information about the AGENTPP mailing list