View Source snmpm_conf (snmp v5.15)
Utility functions for handling the manager config files.
The module snmpm_conf
contains various utility functions to used for
manipulating (write/append/read) the config files of the SNMP manager.
Summary
Functions
agents_entry(UserId, TargetName, Comm, Domain, Addr, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel) -> agents_entry()
append_agents_config(Dir, Conf) -> ok
append_manager_config(Dir, Conf) -> ok
append_users_config(Dir, Conf) -> ok
append_usm_config(Dir, Conf) -> ok
manager_entry(Tag, Val) -> manager_entry()
read_agents_config(Dir) -> Conf
read_manager_config(Dir) -> Conf
read_users_config(Dir) -> Conf
read_usm_config(Dir) -> Conf
Equivalent to users_entry/3
Equivalent to users_entry/3
users_entry(UserId, UserMod, UserData) -> users_entry()
usm_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry()
Equivalent to write_agents_config/3
write_agents_config(Dir, Hdr, Conf) -> ok
Equivalent to write_manager_config/3
write_manager_config(Dir, Hdr, Conf) -> ok
Equivalent to write_users_config/3
write_users_config(Dir, Hdr, Conf) -> ok
Equivalent to write_usm_config/3
write_usm_config(Dir, Hdr, Conf) -> ok
Functions
agents_entry(UserId, TargetName, Comm, Domain_or_Ip, Addr_or_Port, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel)
View Sourceagents_entry(UserId, TargetName, Comm, Domain, Addr, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel) -> agents_entry()
Create an entry for the manager agents config file, agents.conf
.
See Agents for more info.
append_agents_config(Dir, Conf) -> ok
Append the agents config to the current manager agents config file.
Dir
is the path to the directory where to store the config file.
See Agents for more info.
append_manager_config(Dir, Conf) -> ok
Append the config to the current manager config file.
Dir
is the path to the directory where to store the config file.
See Manager Information for more info.
append_users_config(Dir, Conf) -> ok
Append the users config to the current manager users config file.
Dir
is the path to the directory where to store the config file.
See Users for more info.
append_usm_config(Dir, Conf) -> ok
Append the usm config to the current manager usm config file.
Dir
is the path to the directory where to store the config file.
See Security data for USM for more info.
manager_entry(Tag, Val) -> manager_entry()
Create an entry for the manager config file, manager.conf
.
The type of Val
depends on the value of Tag
, see
Manager Information for more
info.
read_agents_config(Dir) -> Conf
Read the current manager agents config file.
Dir
is the path to the directory where to store the config file.
See Agents for more info.
read_manager_config(Dir) -> Conf
Read the current manager config file.
Dir
is the path to the directory where to store the config file.
See Manager Information for more info.
read_users_config(Dir) -> Conf
Read the current manager users config file.
Dir
is the path to the directory where to store the config file.
See Users for more info.
read_usm_config(Dir) -> Conf
Read the current manager usm config file.
Dir
is the path to the directory where to store the config file.
See Security data for USM for more info.
Equivalent to users_entry/3
Equivalent to users_entry/3
users_entry(UserId, UserMod, UserData) -> users_entry()
Create an entry for the manager users config file, users.conf
.
users_entry(UserId)
translates to the following call:
users_entry(UserId, snmpm_user_default)
.
users_entry(UserId, UserMod)
translates to the following
call: users_entry(UserId, UserMod, undefined)
.
See Users for more info.
Equivalent to usm_entry/7
usm_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey)
View Sourceusm_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry()
Create an entry for the agent community config file, community.conf
.
See Security data for USM for more info.
Equivalent to write_agents_config/3
write_agents_config(Dir, Hdr, Conf) -> ok
Write the manager agents config to the manager agents 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 Agents for more info.
Equivalent to write_manager_config/3
write_manager_config(Dir, Hdr, Conf) -> ok
Write the manager config to the manager 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 Manager Information for more info.
Equivalent to write_users_config/3
write_users_config(Dir, Hdr, Conf) -> ok
Write the manager users config to the manager users 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 Users for more info.
Equivalent to write_usm_config/3
write_usm_config(Dir, Hdr, Conf) -> ok
Write the manager usm config to the manager 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.