Search documentation of snmp

# snmpa_conf (snmp v5.19.1)

View Source

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

agent_entry()

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

community_entry()

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

context_entry()

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

extended_transport_address()
intAgentTransport()
ip_address()
notify_entry()

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

port_info()

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

range()

`Min < Max`

ranges()
snmp_ip_address()
standard_entry()

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

target_addr_entry()

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

target_params_entry()

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

transport_address()
transport_opts()
transportAddress()
transportAddressIPv4()
transportAddressIPv4WithoutPort()

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

transportAddressIPv4WithPort()

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

transportAddressIPv6()
transportAddressIPv6WithoutPort()

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

transportAddressIPv6WithPort()

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

transportAddressMask()
transportAddressWithoutPort()
transportAddressWithPort()
transportDomain()
usm_entry()

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

vacm_acc_entry()

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

vacm_entry()

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

vacm_s2g_entry()

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

vacm_vtf_entry()

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

word()

## Functions

agent_entry(Tag, Val)

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

append_agent_config(Dir, Conf)

Append the config to the current agent config file.

append_community_config(Dir, Conf)

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

append_context_config(Dir, Conf)

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

append_notify_config(Dir, Conf)

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

append_standard_config(Dir, Conf)

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

append_target_addr_config(Dir, Conf)

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

append_target_params_config(Dir, Conf)

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

append_usm_config(Dir, Conf)

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

append_vacm_config(Dir, Conf)

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

community_entry(CommIndex)

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

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

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

context_entry(Ctx)

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

notify_entry(Name, Tag, Type)

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

read_agent_config(Dir)

Read the current agent config file.

read_community_config(Dir)

Read the current agent community config file.

read_context_config(Dir)

Read the current agent context config file.

read_notify_config(Dir)

Read the current agent notify config file.

read_standard_config(Dir)

Read the current agent standard config file.

read_target_addr_config(Dir)

Read the current agent target_addr config file.

read_target_params_config(Dir)

Read the current agent target_params config file.

read_usm_config(Dir)

Read the current agent usm config file.

read_vacm_config(Dir)

Read the current agent vacm config file.

standard_entry(Tag, Val)

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

target_addr_entry/6

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

target_addr_entry/7

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

target_addr_entry/8

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

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

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

target_params_entry(Name, Vsn)

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

target_params_entry(Name, Vsn, SecName, SecLevel)

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

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

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

usm_entry(EngineID)

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

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

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

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

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

vacm_s2g_entry(SecModel, SecName, GroupName)

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

vacm_vtf_entry(ViewName, ViewSubtree)

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

vacm_vtf_entry(ViewName, ViewSubtree, ViewType, ViewMask)

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

write_agent_config(Dir, Conf)

Equivalent to `write_agent_config/3`.

write_agent_config(Dir, Hdr, Conf)

Write the agent config to the agent config file.

write_community_config(Dir, Conf)

Equivalent to `write_community_config/3`.

write_community_config(Dir, Hdr, Conf)

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

write_context_config(Dir, Conf)

Equivalent to `write_context_config/3`.

write_context_config(Dir, Hdr, Conf)

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

write_notify_config(Dir, Conf)

Equivalent to `write_notify_config/3`.

write_notify_config(Dir, Hdr, Conf)

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

write_standard_config(Dir, Conf)

Equivalent to `write_standard_config/3`.

write_standard_config(Dir, Hdr, Conf)

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

write_target_addr_config(Dir, Conf)

Equivalent to `write_target_addr_config/3`.

write_target_addr_config(Dir, Hdr, Conf)

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

write_target_params_config(Dir, Conf)

Equivalent to `write_target_params_config/3`.

write_target_params_config(Dir, Hdr, Conf)

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

write_usm_config(Dir, Conf)

Equivalent to `write_usm_config/3`.

write_usm_config(Dir, Hdr, Conf)

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

write_vacm_config(Dir, Conf)

Equivalent to `write_vacm_config/3`.

write_vacm_config(Dir, Hdr, Conf)

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

# Types

# agent_entry()

    -opaque agent_entry()

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

# community_entry()

    -opaque community_entry()

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

# context_entry()

    -opaque context_entry()

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

# extended_transport_address()

    -type extended_transport_address() :: {inet:ip_address(), port_info()}.

# intAgentTransport()

    -type intAgentTransport() ::
              {transportDomain(), transport_address()} |
              {transportDomain(), extended_transport_address(), snmpa:transport_kind()} |
              {transportDomain(), extended_transport_address(), transport_opts()} |
              {transportDomain(), extended_transport_address(), snmpa:transport_kind(), transport_opts()}.

# ip_address()

(not exported)

    -type ip_address() :: inet:ip_address() | snmp_ip_address().

# notify_entry()

    -opaque notify_entry()

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

# port_info()

    -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.

# range()

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

`Min < Max`

# ranges()

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

# snmp_ip_address()

(not exported)

    -type snmp_ip_address() :: [non_neg_integer()].

# standard_entry()

    -opaque standard_entry()

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

# target_addr_entry()

    -opaque target_addr_entry()

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

# target_params_entry()

    -opaque target_params_entry()

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

# transport_address()

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

# transport_opts()

(not exported)

    -type transport_opts() :: list().

# transportAddress()

    -type transportAddress() :: transportAddressIPv4() | transportAddressIPv6().

# transportAddressIPv4()

(not exported)

    -type transportAddressIPv4() :: transportAddressIPv4WithPort() | transportAddressIPv4WithoutPort().

# transportAddressIPv4WithoutPort()

(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]`

# transportAddressIPv4WithPort()

(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]`

# transportAddressIPv6()

(not exported)

    -type transportAddressIPv6() :: transportAddressIPv6WithPort() | transportAddressIPv6WithoutPort().

# transportAddressIPv6WithoutPort()

(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]`

# transportAddressIPv6WithPort()

(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]`

# transportAddressMask()

    -type transportAddressMask() :: [] | transportAddressWithPort().

# transportAddressWithoutPort()

    -type transportAddressWithoutPort() ::
              transportAddressIPv4WithoutPort() | transportAddressIPv6WithoutPort().

# transportAddressWithPort()

    -type transportAddressWithPort() :: transportAddressIPv4WithPort() | transportAddressIPv6WithPort().

# transportDomain()

    -type transportDomain() :: snmp:tdomain().

# usm_entry()

    -opaque usm_entry()

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

# vacm_acc_entry()

    -opaque vacm_acc_entry()

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

# vacm_entry()

    -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.

# vacm_s2g_entry()

    -opaque vacm_s2g_entry()

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

# vacm_vtf_entry()

    -opaque vacm_vtf_entry()

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

# word()

(not exported)

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

# Functions

# agent_entry(Tag, Val)

    -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`:

- `intAgentTransports: [``snmpa_conf:intAgentTransport()` ] `<mandatory>`

- `intAgentUDPPort:``inet:port_number()` `<optional>`

- `snmpEngineMaxMessageSize:``snmp_framework_mib:max_message_size()` `<mandatory>`

- `snmpEngineID:``snmp_framework_mib:engine_id()` `<mandatory>`

See Agent Information for more info.

# append_agent_config(Dir, Conf)

    -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.

# append_community_config(Dir, Conf)

    -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.

# append_context_config(Dir, Conf)

    -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.

# append_notify_config(Dir, Conf)

    -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.

# append_standard_config(Dir, Conf)

    -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.

# append_target_addr_config(Dir, Conf)

    -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.

# append_target_params_config(Dir, Conf)

    -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.

# append_usm_config(Dir, Conf)

    -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.

# append_vacm_config(Dir, Conf)

    -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.

# community_entry(CommIndex)

    -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`:

- `"public"` - Translates to the following call:

  `community_entry(CommunityIndex, CommunityIndex, "initial", "", "")`.

- `"all-rights"` - Translates to the following call:

  `community_entry(CommunityIndex, CommunityIndex, CommunityIndex, "", "")`.

See Community for more info.

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

    -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.

# context_entry(Ctx)

    -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.

# notify_entry(Name, Tag, Type)

    -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.

# read_agent_config(Dir)

    -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.

# read_community_config(Dir)

    -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.

# read_context_config(Dir)

    -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.

# read_notify_config(Dir)

    -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.

# read_standard_config(Dir)

    -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.

# read_target_addr_config(Dir)

    -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.

# read_target_params_config(Dir)

    -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.

# read_usm_config(Dir)

    -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.

# read_vacm_config(Dir)

    -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.

# standard_entry(Tag, Val)

    -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.

# target_addr_entry/6

    -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.

# target_addr_entry/7

(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.

# target_addr_entry/8

    -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.

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

    -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.

# target_params_entry(Name, Vsn)

    -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.

# target_params_entry(Name, Vsn, SecName, SecLevel)

    -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.

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

    -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.

# usm_entry(EngineID)

    -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.

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

    -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.

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

    -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.

# vacm_s2g_entry(SecModel, SecName, GroupName)

    -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.

# vacm_vtf_entry(ViewName, ViewSubtree)

    -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.

# vacm_vtf_entry(ViewName, ViewSubtree, ViewType, ViewMask)

    -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.

# write_agent_config(Dir, Conf)

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

Equivalent to `write_agent_config/3`.

# write_agent_config(Dir, Hdr, Conf)

    -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.

# write_community_config(Dir, Conf)

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

Equivalent to `write_community_config/3`.

# write_community_config(Dir, Hdr, Conf)

    -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.

# write_context_config(Dir, Conf)

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

Equivalent to `write_context_config/3`.

# write_context_config(Dir, Hdr, Conf)

    -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.

# write_notify_config(Dir, Conf)

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

Equivalent to `write_notify_config/3`.

# write_notify_config(Dir, Hdr, Conf)

    -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.

# write_standard_config(Dir, Conf)

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

Equivalent to `write_standard_config/3`.

# write_standard_config(Dir, Hdr, Conf)

    -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.

# write_target_addr_config(Dir, Conf)

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

Equivalent to `write_target_addr_config/3`.

# write_target_addr_config(Dir, Hdr, Conf)

    -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.

# write_target_params_config(Dir, Conf)

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

Equivalent to `write_target_params_config/3`.

# write_target_params_config(Dir, Hdr, Conf)

    -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.

# write_usm_config(Dir, Conf)

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

Equivalent to `write_usm_config/3`.

# write_usm_config(Dir, Hdr, Conf)

    -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.

# write_vacm_config(Dir, Conf)

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

Equivalent to `write_vacm_config/3`.

# write_vacm_config(Dir, Hdr, Conf)

    -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.