diff options
Diffstat (limited to 'lib/snmp/priv/conf/manager')
-rw-r--r-- | lib/snmp/priv/conf/manager/Makefile | 63 | ||||
-rw-r--r-- | lib/snmp/priv/conf/manager/agents.conf | 40 | ||||
-rw-r--r-- | lib/snmp/priv/conf/manager/files.mk | 20 | ||||
-rw-r--r-- | lib/snmp/priv/conf/manager/manager.conf | 16 | ||||
-rw-r--r-- | lib/snmp/priv/conf/manager/users.conf | 14 | ||||
-rw-r--r-- | lib/snmp/priv/conf/manager/usm.conf | 30 |
6 files changed, 183 insertions, 0 deletions
diff --git a/lib/snmp/priv/conf/manager/Makefile b/lib/snmp/priv/conf/manager/Makefile new file mode 100644 index 0000000000..16355f0ff3 --- /dev/null +++ b/lib/snmp/priv/conf/manager/Makefile @@ -0,0 +1,63 @@ +#-*-makefile-*- ; force emacs to enter makefile-mode + +# %CopyrightBegin% +# +# Copyright Ericsson AB 2004-2009. 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 +# 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. +# +# %CopyrightEnd% + +include $(ERL_TOP)/make/target.mk +include $(ERL_TOP)/make/$(TARGET)/otp.mk + +# ---------------------------------------------------- +# Application version +# ---------------------------------------------------- +include ../../../vsn.mk + +VSN = $(SNMP_VSN) + +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- +RELSYSDIR = $(RELEASE_PATH)/lib/snmp-$(VSN) + +# ---------------------------------------------------- +# Common macros +# ---------------------------------------------------- + +include files.mk + + +# ---------------------------------------------------- +# Targets +# ---------------------------------------------------- + +debug opt: + +clean: + +docs: + +# ---------------------------------------------------- +# Release Target +# ---------------------------------------------------- +include $(ERL_TOP)/make/otp_release_targets.mk + +release_spec: opt + $(INSTALL_DIR) $(RELSYSDIR)/priv/conf + $(INSTALL_DIR) $(RELSYSDIR)/priv/conf/manager + $(INSTALL_DATA) $(CONF_FILES) $(RELSYSDIR)/priv/conf/manager + +release_docs_spec: + diff --git a/lib/snmp/priv/conf/manager/agents.conf b/lib/snmp/priv/conf/manager/agents.conf new file mode 100644 index 0000000000..7f9b3d60ab --- /dev/null +++ b/lib/snmp/priv/conf/manager/agents.conf @@ -0,0 +1,40 @@ +%% agents.conf +%% +%% Configuration for each agent the manager shall handle. +%% (Relevant parts of the snmpTargetAddrTable and snmpTargetParamsTable) +%% +%% {UserId, +%% TargetName, Comm, Ip, Port, EngineID, Timeout, MaxMessageSize, +%% Version, SecModel, SecName, SecLevel} +%% +%% UserId -> User identity of "manager entity" responsible for this +%% agent: term() +%% TargetName -> string(), length > 0 (Name associated with the agent) +%% Comm -> string(), length > 0 (Community string) +%% Ip -> [integer()] (Host address as a list of integers) +%% Port -> integer() > 0 +%% EngineID -> string() +%% Timeout -> infinity (no retransmission) | integer() > 0 | +%% incr_timer() +%% (Can be overridden when sending a sync message) +%% MaxMessageSize -> integer() >= 484 +%% Version -> v1 | v2 | v3 +%% SecModel -> any | v1 | v2c | usm +%% SecName -> string() +%% SecLevel -> noAuthNoPriv | authNoPriv | authPriv +%% +%% incr_timer() -> {wait_for(), factor(). incr(), retry()} +%% wait_for() -> integer() (Initial timeout (milli seconds)) +%% factor() -> integer() (Factor to multiply with at timeout) +%% incr() -> integer() (Milli seconds to add at timeout) +%% retry() -> integer() (Number of retransmissions) + +%% Example: +{user_id_1, + "targ-hobbes", "comm1", [192,168,0,100], 162, "hobbe's agent", + 1500, 484, + v1, any, "initial", noAuthNoPriv}. +{"user_id_2", + "targ-calvin", "comm2", [192,168,0,101], 162, "calvin's agent", + {1500, 1, 0, 0}, 484, + v1, any, "initial", noAuthNoPriv}. diff --git a/lib/snmp/priv/conf/manager/files.mk b/lib/snmp/priv/conf/manager/files.mk new file mode 100644 index 0000000000..61dde77d93 --- /dev/null +++ b/lib/snmp/priv/conf/manager/files.mk @@ -0,0 +1,20 @@ +#-*-makefile-*- ; force emacs to enter makefile-mode + +# %CopyrightBegin% +# +# Copyright Ericsson AB 2004-2009. 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 +# 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. +# +# %CopyrightEnd% + +CONF_FILES = manager.conf agents.conf users.conf diff --git a/lib/snmp/priv/conf/manager/manager.conf b/lib/snmp/priv/conf/manager/manager.conf new file mode 100644 index 0000000000..624ad4310e --- /dev/null +++ b/lib/snmp/priv/conf/manager/manager.conf @@ -0,0 +1,16 @@ +%% manager.conf +%% +%% General SNMP-related configuration parameters for the SNMP manager +%% +%% Default values: +%% address local host +%% port 5000 +%% engine_id "mgrEngine" +%% max_message_size 484 +%% + +%% Examples: +{address, [192,168,0,100]}. +{port, 5000}. +{engine_id, "mgrEngine"}. +{max_message_size, 484}. diff --git a/lib/snmp/priv/conf/manager/users.conf b/lib/snmp/priv/conf/manager/users.conf new file mode 100644 index 0000000000..8f3abe74d2 --- /dev/null +++ b/lib/snmp/priv/conf/manager/users.conf @@ -0,0 +1,14 @@ +%% users.conf +%% +%% Configuration for each user the manager shall handle. +%% +%% {UserId, UserMod, UserData} +%% +%% UserId -> User identity of "manager entity" responsible for this +%% agent: term() +%% UserMod -> Module implementing the snmpm_user behaviour: atom() +%% UserData -> Generic data passed on to the user when calling any +%% of the callback functions: term() +%% +{user_id_1, snmpm_user_default, undefined}. +{"user_id_2", snmpm_user_default, []}. diff --git a/lib/snmp/priv/conf/manager/usm.conf b/lib/snmp/priv/conf/manager/usm.conf new file mode 100644 index 0000000000..5eb78791ca --- /dev/null +++ b/lib/snmp/priv/conf/manager/usm.conf @@ -0,0 +1,30 @@ +%% usm.conf +%% The data corresponds to the relevant parts of the usmUserTable +%% defined in SNMP-USER-BASED-SM-MIB. +%% +%% {EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}. +%% {EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey}. +%% +%% The first case is when we have the identity-function (SecName = UserName)! +%% +%% EngineID -> string() +%% UserName -> string() +%% SecName -> string() +%% AuthP -> usmNoAuthProtocol | usmHMACSHAAuthProtocol | +%% usmHMACMD5AuthProtocol +%% AuthKey -> string() (The user's secret localized authentication key) +%% length depends on AuthP: +%% usmNoAuthProtocol - any +%% usmHMACSHAAuthProtocol - 16 +%% usmHMACMD5AuthProtocol - 20 +%% PrivP -> usmNoPrivProtocol | usmDESPrivProtocol +%% PrivKey -> string() (The user's secret localized encryption key) +%% length depends on PrivP: +%% usmNoPrivProtocol - any +%% usmDESPrivProtocol - 16 +%% + +%% example +{"manager engine", "initial", "initial", + usmNoAuthProtocol, "", + usmNoPrivProtocol, ""}. |