From aea7190a8eec464aecd8dbcbf0e7ebcf23583f5b Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 21 May 2013 11:44:16 +0200 Subject: [snmp/agent] Fixed basic type issues Defines some basic snmp types in the main snmp api module. Also define some basic snmp agent types in the main snmp agent api module. --- lib/snmp/src/agent/snmpa.erl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'lib/snmp/src/agent/snmpa.erl') diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl index b45a47ec6b..785276c73d 100644 --- a/lib/snmp/src/agent/snmpa.erl +++ b/lib/snmp/src/agent/snmpa.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2012. All Rights Reserved. +%% Copyright Ericsson AB 2004-2013. All Rights Reserved. %% %% 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 @@ -111,12 +111,26 @@ -export([print_mib_info/0, print_mib_tables/0, print_mib_variables/0]). +-export_type([ + me/0 + ]). + + + -include("snmpa_atl.hrl"). -include("snmpa_internal.hrl"). +-include_lib("snmp/include/snmp_types.hrl"). % type of me needed. -define(DISCO_EXTRA_INFO, undefined). +%%----------------------------------------------------------------- +%% Types +%%----------------------------------------------------------------- + +-type me() :: #me{}. + + %%----------------------------------------------------------------- %% This utility function is used to convert an old SNMP application %% config (prior to snmp-4.0) to a SNMP agent config (as of -- cgit v1.2.3 From b90e858649c07e6e744a2adee95f6f2d22cb63f9 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 22 May 2013 13:55:36 +0200 Subject: [snmp/agent] Deprecate *old* info conversion function --- lib/snmp/src/agent/snmpa.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/snmp/src/agent/snmpa.erl') diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl index 785276c73d..a22f1b2eb4 100644 --- a/lib/snmp/src/agent/snmpa.erl +++ b/lib/snmp/src/agent/snmpa.erl @@ -115,6 +115,7 @@ me/0 ]). +-deprecated([{old_info_format, 1}]). -include("snmpa_atl.hrl"). -- cgit v1.2.3 From 0b2501e1a98c7cfe87813b542d8ac7a876c85072 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 28 May 2013 12:31:05 +0200 Subject: [snmp/agent] Updated deprecated attribute --- lib/snmp/src/agent/snmpa.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/snmp/src/agent/snmpa.erl') diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl index a22f1b2eb4..0ce1f611b2 100644 --- a/lib/snmp/src/agent/snmpa.erl +++ b/lib/snmp/src/agent/snmpa.erl @@ -115,7 +115,7 @@ me/0 ]). --deprecated([{old_info_format, 1}]). +-deprecated([{old_info_format, 1, next_major_release}]). -include("snmpa_atl.hrl"). -- cgit v1.2.3 From a49f52da6e07f438686b66e71db8a4865f31af6c Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 29 May 2013 11:44:05 +0200 Subject: [snmp/agent] Moved agent config type definition to main agent interface module --- lib/snmp/src/agent/snmpa.erl | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'lib/snmp/src/agent/snmpa.erl') diff --git a/lib/snmp/src/agent/snmpa.erl b/lib/snmp/src/agent/snmpa.erl index 0ce1f611b2..14b93439df 100644 --- a/lib/snmp/src/agent/snmpa.erl +++ b/lib/snmp/src/agent/snmpa.erl @@ -112,7 +112,13 @@ -export([print_mib_info/0, print_mib_tables/0, print_mib_variables/0]). -export_type([ - me/0 + me/0, + + %% Agent config types + mib_storage/0, + mib_storage_opt/0, + mib_storage_module/0, + mib_storage_options/0 ]). -deprecated([{old_info_format, 1, next_major_release}]). @@ -131,6 +137,16 @@ -type me() :: #me{}. +%% Agent config types +-type mib_storage() :: [mib_storage_opt()]. +-type mib_storage_opt() :: {module, mib_storage_module()} | + {options, mib_storage_options()}. + +%% Module implementing the snmpa_mib_storage behaviour +-type mib_storage_module() :: atom(). +%% Options specific to the above module +-type mib_storage_options() :: list(). + %%----------------------------------------------------------------- %% This utility function is used to convert an old SNMP application -- cgit v1.2.3