diff options
Diffstat (limited to 'lib/snmp')
-rw-r--r-- | lib/snmp/doc/src/snmpa_mib_data.xml | 40 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa_mib_data.erl | 2 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa_mib_data_tttn.erl | 2 |
3 files changed, 41 insertions, 3 deletions
diff --git a/lib/snmp/doc/src/snmpa_mib_data.xml b/lib/snmp/doc/src/snmpa_mib_data.xml index 462112ac71..eeeb124d9d 100644 --- a/lib/snmp/doc/src/snmpa_mib_data.xml +++ b/lib/snmp/doc/src/snmpa_mib_data.xml @@ -180,7 +180,7 @@ <fsummary>Find the mib-entry corresponding to the Oid</fsummary> <type> <v>State = term()</v> - <v>Reply = {variable, ME} | {table_column, ME, TEOid} | {subagent, SAPid, SAOid} | [false, Reason}</v> + <v>Reply = {variable, ME} | {table_column, ME, TEOid} | {subagent, SAPid, SAOid} | {false, Reason}</v> <v>Oid = TEOid = SAOid = oid()</v> <v>SAPid = pid()</v> <v>ME = me()</v> @@ -193,8 +193,46 @@ and if it is a table, Oid must be <table>.<entry>.<col>.<any>.</p> <!-- FIX --> + + <marker id="next"></marker> + </desc> + </func> + + <func> + <name>next(State, Oid, MibView) -> Reply</name> + <fsummary>Finds the lexicographically next oid</fsummary> + <type> + <v>State = term()</v> + <v>Reply = false | endOfTable | {subagent, SAPid, SAOid} | {variable, ME, VarOid} | {table, TableOid, TableRestOid, ME}</v> + <v>Oid = SAOid = VarOid = TableOid = TableRestOid = oid()</v> + <v>SAPid = pid()</v> + <v>ME = me()</v> + </type> + <desc> + <p>Finds the lexicographically next oid. </p> + + <marker id="register_subagent"></marker> </desc> </func> + + <func> + <name>register_subagent(State, Oid, Pid) -> Reply</name> + <fsummary>Register the subagent</fsummary> + <type> + <v>State = NewState = term()</v> + <v>Reply = {ok, NewState} | {error, Reason}</v> + <v>Oid = oid()</v> + <v>Pid = pid()</v> + <v>Reason = term()</v> + </type> + <desc> + <p>Register the the subagent, process, + handling part of the mib-tree. </p> + + <marker id="unregister_subagent"></marker> + </desc> + </func> + </funcs> </erlref> diff --git a/lib/snmp/src/agent/snmpa_mib_data.erl b/lib/snmp/src/agent/snmpa_mib_data.erl index 599cba4b5b..790b056065 100644 --- a/lib/snmp/src/agent/snmpa_mib_data.erl +++ b/lib/snmp/src/agent/snmpa_mib_data.erl @@ -53,7 +53,7 @@ {table, TableOid :: oid(), TableRestOid :: oid(), MibEntry :: me()} -callback register_subagent(State :: term(), Oid :: oid(), Pid :: pid()) -> - {error, Reason :: term()} | NewState :: term(). + {ok, NewState :: term()} | {error, Reason :: term()}. -callback unregister_subagent(State :: term(), Pid :: pid() | Oid :: oid()) -> diff --git a/lib/snmp/src/agent/snmpa_mib_data_tttn.erl b/lib/snmp/src/agent/snmpa_mib_data_tttn.erl index 043dbaef6c..561e97deee 100644 --- a/lib/snmp/src/agent/snmpa_mib_data_tttn.erl +++ b/lib/snmp/src/agent/snmpa_mib_data_tttn.erl @@ -376,7 +376,7 @@ register_subagent(#mib_data{tree = T} = MibData, Oid, Pid) -> NewRootTree -> SAs = [{Pid, Oid} | MibData#mib_data.subagents], T2 = T#tree{root = NewRootTree}, - MibData#mib_data{tree = T2, subagents = SAs} + {ok, MibData#mib_data{tree = T2, subagents = SAs}} end. |