.TH snmpa_discovery_handler 3erl "snmp 5.15" "Ericsson AB" "Erlang Module Definition" .SH NAME snmpa_discovery_handler \- Behaviour module for the SNMP agent discovery handler. .SH DESCRIPTION .LP This module defines the behaviour of the agent discovery handler\&. A \fIsnmpa_discovery_handler\fR\& compliant module must export the following functions: .RS 2 .TP 2 * stage1_finish/2 .LP .RE .LP The semantics of them and their exact signatures are explained below\&. .SH EXPORTS .LP .B stage1_finish(TargetName, ManagerEngineID, ExtraInfo) -> ignore | {ok, usm_entry() | [usm_entry()]} | {ok, usm_entry() | [usm_entry()], NewExtraInfo} .br .RS .LP Types: .RS 3 TargetName = string() .br ManagerEngineID = string() .br ExtraInfo = term() .br usm_entry() = tuple() compatible with usm\&.conf .br NewExtraInfo = term() .br .RE .RE .RS .LP This function is called at the end of stage 1 of the discovery process\&. It should return either the atom \fIignore\fR\& or \fI{ok, usm_entry() | [usm_entry()]}\fR\&\&. See usm_entry() and usm_entry/13 for more info\&. .LP If the function returns \fIignore\fR\&, then it is assumed that either: .RS 2 .TP 2 * The caller (of the discovery function) will make the needed updates later\&. .LP .TP 2 * The callback function itself did the updates\&. .LP .RE .LP In either case, the agent will do nothing, but return the retrieved ManagerEngineID (see discovery for more info) and possible continue with stage 2 of the discovery process\&. .LP The \fIExtraInfo\fR\& argument is passed on from the discovery function\&. .LP This function may return an updated \fINewExtraInfo\fR\& that will be used in subsequent calls to the callback functions\&. Intended for future use\&. .LP The purpose of this function is to generate the usm- related security data needed for usm processing in the agent\&. Specifically, updating the usmUserTable\&. .LP When an \fIusm_entry()\fR\& tuple (or a list of such tuples) is returned, this data is then added to the \fIusmUserTable\fR\& by the (master-) agent\&. .LP When an \fIusm_entry()\fR\& tuple (or a list of such tuples) is returned, this data is then added to the \fIusmUserTable\fR\& by the (master-) agent\&. .LP .RS -4 .B Note: .RE Note that the function does not check if this entry already exists\&. .LP .RS -4 .B Note: .RE Note that this function is executed in the context of the master-agent process\&. .RE