summaryrefslogtreecommitdiff
path: root/lib/snmp/doc/src/snmpa_discovery_handler.xml
blob: 309a21ec328e3b7555c05eabd93ad9f2a2491e95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>2004</year><year>2013</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      The contents of this file are subject to the Erlang Public License,
      Version 1.1, (the "License"); you may not use this file except in
      compliance with the License. You should have received a copy of the
      Erlang Public License along with this software. If not, it can be
      retrieved online at http://www.erlang.org/.
    
      Software distributed under the License is distributed on an "AS IS"
      basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
      the License for the specific language governing rights and limitations
      under the License.
    
    </legalnotice>

    <title>snmpa_discovery_handler</title>
    <prepared></prepared>
    <responsible></responsible>
    <docno></docno>
    <approved></approved>
    <checked></checked>
    <date></date>
    <rev></rev>
    <file>snmpa_discovery_handler.xml</file>
  </header>
  <module>snmpa_discovery_handler</module>
  <modulesummary>Behaviour module for the SNMP agent discovery handler.</modulesummary>
  <description>
    <p>This module defines the behaviour of the agent discovery
      handler. A <c>snmpa_discovery_handler</c> compliant module 
      must export the following functions: </p>
    <list type="bulleted">
      <item>
        <p><seealso marker="#stage1_finish">stage1_finish/2</seealso></p>
      </item>
    </list>
    <p>The semantics of them and their exact signatures are explained
      below. </p>

     <marker id="stage1_finish"></marker>
  </description>

  <funcs>
    <func>
      <name>stage1_finish(TargetName, ManagerEngineID, ExtraInfo) -> ignore | {ok, usm_entry() | [usm_entry()]} | {ok, usm_entry() | [usm_entry()], NewExtraInfo}</name>
      <fsummary>Discovery stage 1 finish</fsummary>
      <type>
        <v>TargetName = string()</v>
        <v>ManagerEngineID = string()</v>
        <v>ExtraInfo = term()</v>
        <v>usm_entry() = tuple() compatible with usm.conf</v>
        <v>NewExtraInfo = term()</v>
      </type>
      <desc>
        <p>This function is called at the end of stage 1 of the 
          discovery process. It should return either the atom 
          <c>ignore</c> or <c>{ok, usm_entry() | [usm_entry()]}</c>. See 
          <seealso marker="snmp_agent_config_files#usm">usm_entry()</seealso>
          and 
          <seealso marker="snmpa_conf#usm_entry">usm_entry/13</seealso>
          for more info. </p>

        <p>If the function returns <c>ignore</c>, then it is assumed that 
          either: </p>
        
        <list type="bulleted">
          <item>The caller (of the discovery function) will make the 
             needed updates later. </item>
          <item>The callback function itself did the updates. </item>
        </list>

        <p>In either case, the agent will do nothing, but return
          the retrieved ManagerEngineID (see 
          <seealso marker="snmpa#discovery">discovery</seealso>
          for more info) and possible continue with stage 2 of 
          the discovery process. </p>

        <p>The <c>ExtraInfo</c> argument is passed on from the 
          <seealso marker="snmpa#discovery">discovery</seealso>
          function. </p>

        <p>This function may return an updated <c>NewExtraInfo</c> 
          that will be used in subsequent calls to the callback 
          functions. Intended for future use. </p>

        <p>The purpose of this function is to generate the usm-
          related security data needed for usm processing in the 
          agent. Specifically, updating the usmUserTable. </p>

        <p>When an <c>usm_entry()</c> tuple (or a list of such
          tuples) is returned, this data is then added to the 
          <c>usmUserTable</c> by the (master-) agent. </p>

        <p>When an <c>usm_entry()</c> tuple (or a list of such
          tuples) is returned, this data is then added to the 
          <c>usmUserTable</c> by the (master-) agent. </p>

        <note><p>Note that the function does not check if this entry 
          already exists. </p></note>

        <note><p>Note that this function is executed in the context of 
          the master-agent process. </p></note>

      </desc>
    </func>

  </funcs>
  
</erlref>