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

users_entry(UserId, UserMod, UserData) -> users_entry()

usm_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry()

write_agents_config(Dir, Hdr, Conf) -> ok

write_manager_config(Dir, Hdr, Conf) -> ok

write_users_config(Dir, Hdr, Conf) -> ok

write_usm_config(Dir, Hdr, Conf) -> ok

Functions

Link to this function

agents_entry(UserId, TargetName, Comm, Domain_or_Ip, Addr_or_Port, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel)

View Source

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

Link to this function

append_agents_config(Dir, Conf)

View Source

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.

Link to this function

append_manager_config(Dir, Conf)

View Source

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.

Link to this function

append_users_config(Dir, Conf)

View Source

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.

Link to this function

append_usm_config(Dir, Conf)

View Source

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.

Link to this function

read_manager_config(Dir)

View Source

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

Link to this function

users_entry(UserId, UserMod)

View Source

Equivalent to users_entry/3

Link to this function

users_entry(UserId, UserMod, UserData)

View Source

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.

Link to this function

usm_entry(EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey)

View Source

Equivalent to usm_entry/7

Link to this function

usm_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey)

View Source

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

Link to this function

write_agents_config(Dir, Conf)

View Source

Equivalent to write_agents_config/3

Link to this function

write_agents_config(Dir, Hdr, Conf)

View Source

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.

Link to this function

write_manager_config(Dir, Conf)

View Source

Equivalent to write_manager_config/3

Link to this function

write_manager_config(Dir, Hdr, Conf)

View Source

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.

Link to this function

write_users_config(Dir, Conf)

View Source

Equivalent to write_users_config/3

Link to this function

write_users_config(Dir, Hdr, Conf)

View Source

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.

Link to this function

write_usm_config(Dir, Conf)

View Source

Equivalent to write_usm_config/3

Link to this function

write_usm_config(Dir, Hdr, Conf)

View Source

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.