View Source snmpa_conf (snmp v5.17)

Utility functions for handling the agent config files.

The module snmpa_conf contains various utility functions to use for manipulating (write/read/append) the config files of the SNMP agent.

Summary

Types

An opaque term that represents an entry in the 'agent' config.

An opaque term that represents an entry in the 'community' (agent) config.

An opaque term that represents an entry in the 'context' (agent) config.

An opaque term that represents an entry in the 'notify' (agent) config.

Port number 0 (zero) cannot be specified directly (it is used internally). Instead the atom 'system' should be used.

Min < Max

An opaque term that represents an entry in the 'standard' (agent) config.

An opaque term that represents an entry in the 'target address' (agent) config.

An opaque term that represents an entry in the 'target parameters' (agent) config.

Because of limitations of the Erlang type language we cannot define this type in detail. Instead, we describe it here.

Because of limitations of the Erlang type language we cannot define this type in detail. Instead, we describe it here.

Because of limitations of the Erlang type language we cannot define this type in detail. Instead, we describe it here.

Because of limitations of the Erlang type language we cannot define this type in detail. Instead, we describe it here.

An opaque term that represents an entry in the 'user based sm' (agent) config.

An opaque term that represents an (access) entry in the 'vacm access' (agent) config.

An basically opaque term that represents an entry in the 'view based acm' (agent) config.

An opaque term that represents an (security to group) entry in the 'vacm security to group' (agent) config.

An opaque term that represents an (tree family) entry in the 'vacm tree family' (agent) config.

Functions

Create an entry for the agent config file, agent.conf.

Append the config to the current agent config file.

Append the community config to the current agent community config file.

Append the context config to the current agent context config file.

Append the notify config to the current agent notify config file.

Append the standard config to the current agent standard config file.

Append the target_addr config to the current agent target_addr config file.

Append the target_params config to the current agent target_params config file.

Append the usm config to the current agent usm config file.

Append the vacm config to the current agent vacm config file.

Create an entry for the agent community config file, community.conf.

Create an entry for the agent community config file, community.conf.

Create an entry for the agent context config file, context.conf.

Create an entry for the agent notify config file, notify.conf.

Read the current agent config file.

Read the current agent community config file.

Read the current agent context config file.

Read the current agent notify config file.

Read the current agent standard config file.

Read the current agent target_addr config file.

Read the current agent target_params config file.

Read the current agent usm config file.

Read the current agent vacm config file.

Create an entry for the agent standard config file, standard.conf.

Create an entry for the agent target_addr config file, target_addr.conf.

Create an entry for the agent target_addr config file, target_addr.conf.

Create an entry for the agent target_addr config file, target_addr.conf.

Create an entry for the agent target_addr config file, target_addr.conf.

Create an entry for the agent target_params config file, target_params.conf.

Create an entry for the agent target_params config file, target_params.conf.

Create an entry for the agent target_params config file, target_params.conf.

Create an entry for the agent usm config file, usm.conf.

Create an (access) entry for the agent vacm config file, vacm.conf.

Create an (security to group) entry for the agent vacm config file, vacm.conf.

Create an (view tree family) entry for the agent vacm config file, vacm.conf.

Create an (view tree family) entry for the agent vacm config file, vacm.conf.

Write the agent config to the agent config file.

Write the agent community config to the agent community config file.

Write the agent context config to the agent context config file.

Write the agent notify config to the agent notify config file.

Write the agent standard config to the agent standard config file.

Write the agent target_addr config to the agent target_addr config file.

Write the agent target_params config to the agent target_params config file.

Write the agent usm config to the agent usm config file.

Write the agent vacm config to the agent vacm config file.

Types

-opaque agent_entry()

An opaque term that represents an entry in the 'agent' config.

-opaque community_entry()

An opaque term that represents an entry in the 'community' (agent) config.

-opaque context_entry()

An opaque term that represents an entry in the 'context' (agent) config.

Link to this type

extended_transport_address()

View Source
-type extended_transport_address() :: {inet:ip_address(), port_info()}.
Link to this type

ip_address()

View Source (not exported)
-type ip_address() :: inet:ip_address() | snmp_ip_address().
-opaque notify_entry()

An opaque term that represents an entry in the 'notify' (agent) config.

-type port_info() :: inet:port_number() | system | range() | ranges().

Port number 0 (zero) cannot be specified directly (it is used internally). Instead the atom 'system' should be used.

-type range() :: {Min :: inet:port_number(), Max :: inet:port_number()}.

Min < Max

-type ranges() :: [inet:port_number() | range()].
Link to this type

snmp_ip_address()

View Source (not exported)
-type snmp_ip_address() :: [non_neg_integer()].
-opaque standard_entry()

An opaque term that represents an entry in the 'standard' (agent) config.

-opaque target_addr_entry()

An opaque term that represents an entry in the 'target address' (agent) config.

-opaque target_params_entry()

An opaque term that represents an entry in the 'target parameters' (agent) config.

-type transport_address() :: {ip_address(), inet:port_number()} | ip_address().
Link to this type

transport_opts()

View Source (not exported)
-type transport_opts() :: list().
-type transportAddress() :: transportAddressIPv4() | transportAddressIPv6().
Link to this type

transportAddressIPv4()

View Source (not exported)
-type transportAddressIPv4() :: transportAddressIPv4WithPort() | transportAddressIPv4WithoutPort().
Link to this type

transportAddressIPv4WithoutPort()

View Source (not exported)
-type transportAddressIPv4WithoutPort() :: inet:ip4_address() | [byte()].

Because of limitations of the Erlang type language we cannot define this type in detail. Instead, we describe it here.

The list variant, 4 bytes for address:

[byte() x 4]

Link to this type

transportAddressIPv4WithPort()

View Source (not exported)
-type transportAddressIPv4WithPort() ::
          {transportAddressIPv4WithoutPort(), inet:port_number()} | [byte()].

Because of limitations of the Erlang type language we cannot define this type in detail. Instead, we describe it here.

The list variant, 4 bytes for address + 2 bytes for port:

[byte() x 4, byte() x 2]

Link to this type

transportAddressIPv6()

View Source (not exported)
-type transportAddressIPv6() :: transportAddressIPv6WithPort() | transportAddressIPv6WithoutPort().
Link to this type

transportAddressIPv6WithoutPort()

View Source (not exported)
-type transportAddressIPv6WithoutPort() :: inet:ip6_address() | [word()] | [byte()].

Because of limitations of the Erlang type language we cannot define this type in detail. Instead, we describe it here.

First list variant, 8 words for address:

[word() x 8]

Second list variant, 16 bytes for address:

[byte() x 16]

Link to this type

transportAddressIPv6WithPort()

View Source (not exported)
-type transportAddressIPv6WithPort() ::
          {transportAddressIPv6WithoutPort(), inet:port_number()} |
          [word() | inet:port_number()] |
          [word() | byte()] |
          [byte()].

Because of limitations of the Erlang type language we cannot define this type in detail. Instead, we describe it here.

First list variant, 8 words for address + 1 word for port:

[word() x 8, inet:port_number()]

Second list variant, 8 words for address + 2 bytes for port:

[word() x 8, byte() x 2]

Third list variant, 16 bytes for address + 2 bytes for port:

[byte() x 16, byte() x 2]

Link to this type

transportAddressMask()

View Source
-type transportAddressMask() :: [] | transportAddressWithPort().
Link to this type

transportAddressWithoutPort()

View Source
-type transportAddressWithoutPort() ::
          transportAddressIPv4WithoutPort() | transportAddressIPv6WithoutPort().
Link to this type

transportAddressWithPort()

View Source
-type transportAddressWithPort() :: transportAddressIPv4WithPort() | transportAddressIPv6WithPort().
-type transportDomain() :: snmp:tdomain().
-opaque usm_entry()

An opaque term that represents an entry in the 'user based sm' (agent) config.

-opaque vacm_acc_entry()

An opaque term that represents an (access) entry in the 'vacm access' (agent) config.

-type vacm_entry() :: vacm_s2g_entry() | vacm_acc_entry() | vacm_vtf_entry().

An basically opaque term that represents an entry in the 'view based acm' (agent) config.

-opaque vacm_s2g_entry()

An opaque term that represents an (security to group) entry in the 'vacm security to group' (agent) config.

-opaque vacm_vtf_entry()

An opaque term that represents an (tree family) entry in the 'vacm tree family' (agent) config.

-type word() :: 0..65535.

Functions

-spec agent_entry(Tag, Val) -> AgentEntry
                     when
                         Tag ::
                             intAgentTransports | intAgentUDPPort | snmpEngineMaxMessageSize |
                             snmpEngineID,
                         Val :: term(),
                         AgentEntry :: agent_entry().

Create an entry for the agent config file, agent.conf.

The type of Val depends on the value of Tag:

See Agent Information for more info.

Link to this function

append_agent_config(Dir, Conf)

View Source
-spec append_agent_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [agent_entry()].

Append the config to the current agent config file.

Dir is the path to the directory where to store the config file.

See Agent Information for more info.

Link to this function

append_community_config(Dir, Conf)

View Source
-spec append_community_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [community_entry()].

Append the community config to the current agent community config file.

Dir is the path to the directory where to store the config file.

See Community for more info.

Link to this function

append_context_config(Dir, Conf)

View Source
-spec append_context_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [context_entry()].

Append the context config to the current agent context config file.

Dir is the path to the directory where to store the config file.

See Contexts for more info.

Link to this function

append_notify_config(Dir, Conf)

View Source
-spec append_notify_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [notify_entry()].

Append the notify config to the current agent notify config file.

Dir is the path to the directory where to store the config file.

See Notify Definitions for more info.

Link to this function

append_standard_config(Dir, Conf)

View Source
-spec append_standard_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [standard_entry()].

Append the standard config to the current agent standard config file.

Dir is the path to the directory where to store the config file.

See System Information for more info.

Link to this function

append_target_addr_config(Dir, Conf)

View Source
-spec append_target_addr_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [target_addr_entry()].

Append the target_addr config to the current agent target_addr config file.

Dir is the path to the directory where to store the config file.

See Target Address Definitions for more info.

Link to this function

append_target_params_config(Dir, Conf)

View Source
-spec append_target_params_config(Dir, Conf) -> ok
                                     when Dir :: snmp:dir(), Conf :: [target_params_entry()].

Append the target_params config to the current agent target_params config file.

Dir is the path to the directory where to store the config file.

See Target Parameters Definitions for more info.

Link to this function

append_usm_config(Dir, Conf)

View Source
-spec append_usm_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [usm_entry()].

Append the usm config to the current agent usm config file.

Dir is the path to the directory where to store the config file.

See Security data for USM for more info.

Link to this function

append_vacm_config(Dir, Conf)

View Source
-spec append_vacm_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [vacm_entry()].

Append the vacm config to the current agent vacm config file.

Dir is the path to the directory where to store the config file.

See MIB Views for VACM for more info.

Link to this function

community_entry(CommIndex)

View Source
-spec community_entry(CommIndex) -> CommunityEntry
                         when
                             CommIndex :: snmp_framework_mib:admin_string(),
                             CommunityEntry :: community_entry().

Create an entry for the agent community config file, community.conf.

CommunityIndex must be a non-empty string.

This function only accepts the following values of CommIndex:

See Community for more info.

Link to this function

community_entry(CommIndex, CommName, SecName, CtxName, TransportTag)

View Source
-spec community_entry(CommIndex, CommName, SecName, CtxName, TransportTag) -> CommunityEntry
                         when
                             CommIndex :: snmp_community_mib:index(),
                             CommName :: snmp_community_mib:name(),
                             SecName :: snmp_community_mib:security_name(),
                             CtxName :: snmp_community_mib:context_name(),
                             TransportTag :: snmp_community_mib:transport_tag(),
                             CommunityEntry :: community_entry().

Create an entry for the agent community config file, community.conf.

CommunityIndex must be a non-empty string.

See Community for more info.

-spec context_entry(Ctx) -> ContextEntry
                       when Ctx :: snmp_community_mib:context_name(), ContextEntry :: context_entry().

Create an entry for the agent context config file, context.conf.

See Contexts for more info.

Link to this function

notify_entry(Name, Tag, Type)

View Source
-spec notify_entry(Name, Tag, Type) -> NotifyEntry
                      when
                          Name :: snmp_notification_mib:notify_name(),
                          Tag :: snmp_notification_mib:notify_tag(),
                          Type :: snmp_notification_mib:notify_type(),
                          NotifyEntry :: notify_entry().

Create an entry for the agent notify config file, notify.conf.

Name must be a non-empty string.

See Notify Definitions for more info.

-spec read_agent_config(Dir) -> {ok, Conf} | {error, Reason}
                           when Dir :: snmp:dir(), Conf :: [agent_entry()], Reason :: term().

Read the current agent config file.

Dir is the path to the directory where to store the config file.

See Agent Information for more info.

Link to this function

read_community_config(Dir)

View Source
-spec read_community_config(Dir) -> {ok, Conf} | {error, Reason}
                               when Dir :: snmp:dir(), Conf :: [community_entry()], Reason :: term().

Read the current agent community config file.

Dir is the path to the directory where to store the config file.

See Communities for more info.

Link to this function

read_context_config(Dir)

View Source
-spec read_context_config(Dir) -> {ok, Conf} | {error, Reason}
                             when Dir :: snmp:dir(), Conf :: [context_entry()], Reason :: term().

Read the current agent context config file.

Dir is the path to the directory where to store the config file.

See Contexts for more info.

-spec read_notify_config(Dir) -> {ok, Conf} | {error, Reason}
                            when Dir :: snmp:dir(), Conf :: [notify_entry()], Reason :: term().

Read the current agent notify config file.

Dir is the path to the directory where to store the config file.

See Notify Definitions for more info.

Link to this function

read_standard_config(Dir)

View Source
-spec read_standard_config(Dir) -> {ok, Conf} | {error, Reason}
                              when Dir :: snmp:dir(), Conf :: [standard_entry()], Reason :: term().

Read the current agent standard config file.

Dir is the path to the directory where to store the config file.

See System Information for more info.

Link to this function

read_target_addr_config(Dir)

View Source
-spec read_target_addr_config(Dir) -> {ok, Conf} | {error, Reason}
                                 when Dir :: snmp:dir(), Conf :: [target_addr_entry()], Reason :: term().

Read the current agent target_addr config file.

Dir is the path to the directory where to store the config file.

See Target Address Definitions for more info.

Link to this function

read_target_params_config(Dir)

View Source
-spec read_target_params_config(Dir) -> {ok, Conf} | {error, Reason}
                                   when
                                       Dir :: snmp:dir(),
                                       Conf :: [target_params_entry()],
                                       Reason :: term().

Read the current agent target_params config file.

Dir is the path to the directory where to store the config file.

See Target Parameters Definitions for more info.

-spec read_usm_config(Dir) -> {ok, Conf} | {error, Reason}
                         when Dir :: snmp:dir(), Conf :: [usm_entry()], Reason :: term().

Read the current agent usm config file.

Dir is the path to the directory where to store the config file.

See Security data for USM for more info.

-spec read_vacm_config(Dir) -> {ok, Conf} | {error, Reason}
                          when Dir :: snmp:dir(), Conf :: [vacm_entry()], Reason :: term().

Read the current agent vacm config file.

Dir is the path to the directory where to store the config file.

See MIB Views for VACM for more info.

Link to this function

standard_entry(Tag, Val)

View Source
-spec standard_entry(Tag, Val) -> StandardEntry
                        when
                            Tag ::
                                sysDescr | sysObjectID | sysContact | sysName | sysLocation |
                                sysServices | snmpEnableAuthenTraps,
                            Val :: term(),
                            StandardEntry :: standard_entry().

Create an entry for the agent standard config file, standard.conf.

The type of Val depends on the value of Tag:

  • sysDescr:string() <mandatory> - DisplayString (SIZE(0..255))

  • sysObjectID:snmp:oid() <mandatory> - OBJECT IDENTIFIER

  • sysContact:string() <mandatory> - DisplayString (SIZE(0..255))

  • sysName:string() <mandatory> - DisplayString (SIZE(0..255))

  • sysLocation:string() <mandatory> - DisplayString (SIZE(0..255))

  • sysLocation:non_neg_integer() <mandatory> - "A value which indicates the set of services that this entity primarily offers."

    INTEGER (0..127)

  • snmpEnableAuthenTraps:enabled | disabled <mandatory> - INTEGER { enabled(1), disabled(2) }

See System Information for more info.

-spec target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId) -> TargetAddrEntry
                           when
                               Name :: snmp_target_mib:name(),
                               Domain :: transportDomain(),
                               Addr :: transportAddress(),
                               TagList :: snmp_target_mib:tag_list(),
                               ParamsName :: snmp_target_mib:params(),
                               EngineId :: snmp_framework_mib:engine_id(),
                               TargetAddrEntry :: target_addr_entry();
                       (Name, IP, TagList, ParamsName, EngineId, TMask) -> TargetAddrEntry
                           when
                               Name :: snmp_target_mib:name(),
                               IP :: inet:ip_address(),
                               TagList :: snmp_target_mib:tag_list(),
                               ParamsName :: snmp_target_mib:params(),
                               EngineId :: snmp_framework_mib:engine_id(),
                               TMask :: snmp_target_mib:tmask(),
                               TargetAddrEntry :: target_addr_entry().

Create an entry for the agent target_addr config file, target_addr.conf.

Name must be a non-empty string.

target_addr_entry/6 (1) translates to the following call: target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, []).

target_addr_entry/6 (2) translates to the following call (with Domain and Addr built from IP and the default port number): target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, 2048).

See Target Address Definitions for more info.

Link to this function

target_addr_entry/7

View Source (since OTP 17.3)
-spec target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask) -> TargetAddrEntry
                           when
                               Name :: snmp_target_mib:name(),
                               Domain :: transportDomain(),
                               Addr :: transportAddress(),
                               TagList :: snmp_target_mib:tag_list(),
                               ParamsName :: snmp_target_mib:params(),
                               EngineId :: snmp_framework_mib:engine_id(),
                               TMask :: snmp_target_mib:tmask(),
                               TargetAddrEntry :: target_addr_entry();
                       (Name, IP, Port, TagList, ParamsName, EngineId, TMask) -> TargetAddrEntry
                           when
                               Name :: snmp_target_mib:name(),
                               IP :: inet:ip_address(),
                               Port :: inet:port_number(),
                               TagList :: snmp_target_mib:tag_list(),
                               ParamsName :: snmp_target_mib:params(),
                               EngineId :: snmp_framework_mib:engine_id(),
                               TMask :: snmp_target_mib:tmask(),
                               TargetAddrEntry :: target_addr_entry().

Create an entry for the agent target_addr config file, target_addr.conf.

Name must be a non-empty string.

target_addr_entry/7 (1) translates to the following call: target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, 2048).

target_addr_entry/7 (2) translates to the following call (with Domain and Addr built from IP and Port): target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, 2048).

See Target Address Definitions for more info.

-spec target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, MaxMessageSize) ->
                           TargetAddrEntry
                           when
                               Name :: snmp_target_mib:name(),
                               Domain :: transportDomain(),
                               Addr :: transportAddress(),
                               TagList :: snmp_target_mib:tag_list(),
                               ParamsName :: snmp_target_mib:params(),
                               EngineId :: snmp_framework_mib:engine_id(),
                               TMask :: snmp_target_mib:tmask(),
                               MaxMessageSize :: snmp_target_mib:mms(),
                               TargetAddrEntry :: target_addr_entry();
                       (Name, IP, Port, TagList, ParamsName, EngineId, TMask, MaxMessageSize) ->
                           TargetAddrEntry
                           when
                               Name :: snmp_target_mib:name(),
                               IP :: inet:ip_address(),
                               Port :: inet:port_number(),
                               TagList :: snmp_target_mib:tag_list(),
                               ParamsName :: snmp_target_mib:params(),
                               EngineId :: snmp_framework_mib:engine_id(),
                               TMask :: snmp_target_mib:tmask(),
                               MaxMessageSize :: snmp_target_mib:mms(),
                               TargetAddrEntry :: target_addr_entry().

Create an entry for the agent target_addr config file, target_addr.conf.

Name must be a non-empty string.

target_addr_entry/8 (1) translates to the following call: target_addr_entry(Name, Domain, Addr, 1500, 3, TagList, ParamsName, EngineId, TMask, MaxMessageSize).

target_addr_entry/8 (2) translates to the following call (with Domain and Addr built from IP and Port): target_addr_entry(Name, Domain, Addr, 1500, 3, TagList, ParamsName, EngineId, TMask, MaxMessageSize).

See Target Address Definitions for more info.

Link to this function

target_addr_entry(Name, Domain, Addr, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask, MaxMessageSize)

View Source
-spec target_addr_entry(Name, Domain, Addr, Timeout, RetryCount, TagList, ParamsName, EngineId, TMask,
                        MaxMessageSize) ->
                           TargetAddrEntry
                           when
                               Name :: snmp_target_mib:name(),
                               Domain :: transportDomain(),
                               Addr :: transportAddress(),
                               Timeout :: snmp:time_interval(),
                               RetryCount :: snmp_target_mib:retry_count(),
                               TagList :: snmp_target_mib:tag_list(),
                               ParamsName :: snmp_framework_mib:admin_string(),
                               EngineId :: snmp_framework_mib:engine_id(),
                               TMask :: snmp_target_mib:tmask(),
                               MaxMessageSize :: snmp_target_mib:mms(),
                               TargetAddrEntry :: target_addr_entry().

Create an entry for the agent target_addr config file, target_addr.conf.

Name must be a non-empty string.

See Target Address Definitions for more info.

Link to this function

target_params_entry(Name, Vsn)

View Source
-spec target_params_entry(Name, Vsn) -> TargetParamsEntry
                             when
                                 Name :: snmp_target_mib:name(),
                                 Vsn :: snmp:version(),
                                 TargetParamsEntry :: target_params_entry().

Create an entry for the agent target_params config file, target_params.conf.

Name must be a non-empty string.

target_params_entry/2 translates to the following call:

	  target_params_entry(Name, Vsn, "initial", noAuthNoPriv)

See Target Parameters Definitions for more info.

Link to this function

target_params_entry(Name, Vsn, SecName, SecLevel)

View Source
-spec target_params_entry(Name, Vsn, SecName, SecLevel) -> TargetParamsEntry
                             when
                                 Name :: snmp_target_mib:name(),
                                 Vsn :: snmp:version(),
                                 SecName :: snmp_framework_mib:admin_string(),
                                 SecLevel :: snmp_framework_mib:security_level(),
                                 TargetParamsEntry :: target_params_entry().

Create an entry for the agent target_params config file, target_params.conf.

Name must be a non-empty string.

Vsn translates into MPModel and SecModel as follows:

	  Vsn = v1 => MPModel = v1,  SecModel = v1
	  Vsn = v2 => MPModel = v2c, SecModel = v2c
	  Vsn = v3 => MPModel = v3,  SecModel = usm

target_params_entry/4 translates to the following call:

	  target_params_entry(Name, MPModel, SecModel, SecName, SecLevel)

Where MPModel and SecModel is mapped from Vsn, see above.

See Target Parameters Definitions for more info.

Link to this function

target_params_entry(Name, MPModel, SecModel, SecName, SecLevel)

View Source
-spec target_params_entry(Name, MPModel, SecModel, SecName, SecLevel) -> TargetParamsEntry
                             when
                                 Name :: snmp_target_mib:name(),
                                 MPModel :: snmp_framework_mib:message_processing_model(),
                                 SecModel :: snmp_framework_mib:security_model(),
                                 SecName :: snmp_framework_mib:admin_string(),
                                 SecLevel :: snmp_framework_mib:security_level(),
                                 TargetParamsEntry :: target_params_entry().

Create an entry for the agent target_params config file, target_params.conf.

Name must be a non-empty string.

See Target Parameters Definitions for more info.

-spec usm_entry(EngineID) -> UsmEntry
                   when EngineID :: snmp_framework_mib:engine_id(), UsmEntry :: usm_entry().

Create an entry for the agent usm config file, usm.conf.

usm_entry/1 translates to the following call:

	  usm_entry(EngineID,
	            "initial", "initial", zeroDotZero,
		    usmNoAuthProtocol, "", "",
		    usmNoPrivProtocol, "", "",
		    "", "", "").

See Security data for USM for more info.

Link to this function

usm_entry(EngineID, UserName, SecName, Clone, AuthP, AuthKeyC, OwnAuthKeyC, PrivP, PrivKeyC, OwnPrivKeyC, Public, AuthKey, PrivKey)

View Source
-spec usm_entry(EngineID, UserName, SecName, Clone, AuthP, AuthKeyC, OwnAuthKeyC, PrivP, PrivKeyC,
                OwnPrivKeyC, Public, AuthKey, PrivKey) ->
                   UsmEntry
                   when
                       EngineID :: snmp_framework_mib:engine_id(),
                       UserName :: snmp_user_based_sm_mib:name(),
                       SecName :: snmp_framework_mib:admin_string(),
                       Clone :: snmp_user_based_sm_mib:clone_from(),
                       AuthP :: snmp_user_based_sm_mib:auth_protocol(),
                       AuthKeyC :: snmp_user_based_sm_mib:key_change(),
                       OwnAuthKeyC :: snmp_user_based_sm_mib:key_change(),
                       PrivP :: snmp_user_based_sm_mib:priv_protocol(),
                       PrivKeyC :: snmp_user_based_sm_mib:key_change(),
                       OwnPrivKeyC :: snmp_user_based_sm_mib:key_change(),
                       Public :: snmp_user_based_sm_mib:public(),
                       AuthKey :: snmp_user_based_sm_mib:auth_key(),
                       PrivKey :: snmp_user_based_sm_mib:priv_key(),
                       UsmEntry :: usm_entry().

Create an entry for the agent usm config file, usm.conf.

See Security data for USM for more info.

Link to this function

vacm_acc_entry(GroupName, Prefix, SecModel, SecLevel, Match, RV, WV, NV)

View Source
-spec vacm_acc_entry(GroupName, Prefix, SecModel, SecLevel, Match, RV, WV, NV) -> VacmAccEntry
                        when
                            GroupName :: snmp_framework_mib:admin_string(),
                            Prefix :: snmp_view_based_acm_mib:context_prefix(),
                            SecModel :: snmp_framework_mib:security_model(),
                            SecLevel :: snmp_framework_mib:security_level(),
                            Match :: snmp_view_based_acm_mib:context_match(),
                            RV :: snmp_framework_mib:admin_string(),
                            WV :: snmp_framework_mib:admin_string(),
                            NV :: snmp_framework_mib:admin_string(),
                            VacmAccEntry :: vacm_acc_entry().

Create an (access) entry for the agent vacm config file, vacm.conf.

See MIB Views for VACM for more info.

Link to this function

vacm_s2g_entry(SecModel, SecName, GroupName)

View Source
-spec vacm_s2g_entry(SecModel, SecName, GroupName) -> VacmS2GEntry
                        when
                            SecModel :: snmp_framework_mib:security_model(),
                            SecName :: snmp_view_based_acm_mib:security_name(),
                            GroupName :: snmp_framework_mib:admin_string(),
                            VacmS2GEntry :: vacm_s2g_entry().

Create an (security to group) entry for the agent vacm config file, vacm.conf.

See MIB Views for VACM for more info.

Link to this function

vacm_vtf_entry(ViewName, ViewSubtree)

View Source
-spec vacm_vtf_entry(ViewName, ViewSubtree) -> VacmVtfEntry
                        when
                            ViewName :: snmp_framework_mib:admin_string(),
                            ViewSubtree :: snmp:oid(),
                            VacmVtfEntry :: VacmVtfEntry.

Create an (view tree family) entry for the agent vacm config file, vacm.conf.

vacm_vtf_entry/2 translates to the following call:

	  vacm_vtf_entry(ViewIndex, ViewSubtree, included, null).

See MIB Views for VACM for more info.

Link to this function

vacm_vtf_entry(ViewName, ViewSubtree, ViewType, ViewMask)

View Source
-spec vacm_vtf_entry(ViewName, ViewSubtree, ViewType, ViewMask) -> VacmVtfEntry
                        when
                            ViewName :: snmp_framework_mib:admin_string(),
                            ViewSubtree :: snmp:oid(),
                            ViewType :: snmp_view_based_acm_mib:view_type(),
                            ViewMask :: null | snmp_view_based_acm_mib:view_mask(),
                            VacmVtfEntry :: VacmVtfEntry.

Create an (view tree family) entry for the agent vacm config file, vacm.conf.

See MIB Views for VACM for more info.

Link to this function

write_agent_config(Dir, Conf)

View Source
-spec write_agent_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [agent_entry()].

Equivalent to write_agent_config/3.

Link to this function

write_agent_config(Dir, Hdr, Conf)

View Source
-spec write_agent_config(Dir, Hdr, Conf) -> ok
                            when Dir :: snmp:dir(), Hdr :: string(), Conf :: [agent_entry()].

Write the agent config to the agent config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Agent Information for more info.

Link to this function

write_community_config(Dir, Conf)

View Source
-spec write_community_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [community_entry()].

Equivalent to write_community_config/3.

Link to this function

write_community_config(Dir, Hdr, Conf)

View Source
-spec write_community_config(Dir, Hdr, Conf) -> ok
                                when Dir :: snmp:dir(), Hdr :: string(), Conf :: [community_entry()].

Write the agent community config to the agent community config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Community for more info.

Link to this function

write_context_config(Dir, Conf)

View Source
-spec write_context_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [context_entry()].

Equivalent to write_context_config/3.

Link to this function

write_context_config(Dir, Hdr, Conf)

View Source
-spec write_context_config(Dir, Hdr, Conf) -> ok
                              when Dir :: snmp:dir(), Hdr :: string(), Conf :: [context_entry()].

Write the agent context config to the agent context config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Contexts for more info.

Link to this function

write_notify_config(Dir, Conf)

View Source
-spec write_notify_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [notify_entry()].

Equivalent to write_notify_config/3.

Link to this function

write_notify_config(Dir, Hdr, Conf)

View Source
-spec write_notify_config(Dir, Hdr, Conf) -> ok
                             when Dir :: snmp:dir(), Hdr :: string(), Conf :: [notify_entry()].

Write the agent notify config to the agent notify config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Notify Definitions for more info.

Link to this function

write_standard_config(Dir, Conf)

View Source
-spec write_standard_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [standard_entry()].

Equivalent to write_standard_config/3.

Link to this function

write_standard_config(Dir, Hdr, Conf)

View Source
-spec write_standard_config(Dir, Hdr, Conf) -> ok
                               when Dir :: snmp:dir(), Hdr :: string(), Conf :: [standard_entry()].

Write the agent standard config to the agent standard config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See System Information for more info.

Link to this function

write_target_addr_config(Dir, Conf)

View Source
-spec write_target_addr_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [target_addr_entry()].

Equivalent to write_target_addr_config/3.

Link to this function

write_target_addr_config(Dir, Hdr, Conf)

View Source
-spec write_target_addr_config(Dir, Hdr, Conf) -> ok
                                  when Dir :: snmp:dir(), Hdr :: string(), Conf :: [target_addr_entry()].

Write the agent target_addr config to the agent target_addr config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Target Address Definitions for more info.

Link to this function

write_target_params_config(Dir, Conf)

View Source
-spec write_target_params_config(Dir, Conf) -> ok
                                    when Dir :: snmp:dir(), Conf :: [target_params_entry()].

Equivalent to write_target_params_config/3.

Link to this function

write_target_params_config(Dir, Hdr, Conf)

View Source
-spec write_target_params_config(Dir, Hdr, Conf) -> ok
                                    when
                                        Dir :: snmp:dir(),
                                        Hdr :: string(),
                                        Conf :: [target_params_entry()].

Write the agent target_params config to the agent target_params config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Target Parameters Definitions for more info.

Link to this function

write_usm_config(Dir, Conf)

View Source
-spec write_usm_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [usm_entry()].

Equivalent to write_usm_config/3.

Link to this function

write_usm_config(Dir, Hdr, Conf)

View Source
-spec write_usm_config(Dir, Hdr, Conf) -> ok
                          when Dir :: snmp:dir(), Hdr :: string(), Conf :: [usm_entry()].

Write the agent usm config to the agent usm config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Security data for USM for more info.

Link to this function

write_vacm_config(Dir, Conf)

View Source
-spec write_vacm_config(Dir, Conf) -> ok when Dir :: snmp:dir(), Conf :: [vacm_entry()].

Equivalent to write_vacm_config/3.

Link to this function

write_vacm_config(Dir, Hdr, Conf)

View Source
-spec write_vacm_config(Dir, Hdr, Conf) -> ok
                           when Dir :: snmp:dir(), Hdr :: string(), Conf :: [vacm_entry()].

Write the agent vacm config to the agent vacm config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See MIB Views for VACM for more info.