---
name: "snmpm_conf"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:25.2.3+dfsg-1+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/snmpm_conf"
---

# snmpm\_conf(3erl)

Utility functions for handling the manager config files.

## NAME

snmpm\_conf - Utility functions for handling the manager config files.

## DESCRIPTION

The module *snmpm\_conf* contains various utility functions to used for manipulating (write/append/read) the config files of the SNMP manager.

## EXPORTS

**manager\_entry(Tag, Val) -\> manager\_entry()**\

Types:

Tag = address \| port \| engine\_id \| max\_message\_size\
 Val = term()\
 manager\_entry() = term()\

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.

**write\_manager\_config(Dir, Conf) -\> ok**\
 **write\_manager\_config(Dir, Hdr, Conf) -\> ok**\

Types:

Dir = string()\
 Hdr = string()\
 Conf = \[manager\_entry()\]\

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.

**append\_manager\_config(Dir, Conf) -\> ok**\

Types:

Dir = string()\
 Conf = \[manager\_entry()\]\

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.

**read\_manager\_config(Dir) -\> Conf**\

Types:

Dir = string()\
 Conf = \[manager\_entry()\]\

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.

**users\_entry(UserId) -\> users\_entry()**\
 **users\_entry(UserId, UserMod) -\> users\_entry()**\
 **users\_entry(UserId, UserMod, UserData) -\> users\_entry()**\

Types:

UserId = term()\
 UserMod = atom()\
 UserData = term()\
 standard\_entry() = term()\

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.

**write\_users\_config(Dir, Conf) -\> ok**\
 **write\_users\_config(Dir, Hdr, Conf) -\> ok**\

Types:

Dir = string()\
 Hdr = string()\
 Conf = \[users\_entry()\]\

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.

**append\_users\_config(Dir, Conf) -\> ok**\

Types:

Dir = string()\
 Conf = \[users\_entry()\]\

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.

**read\_users\_config(Dir) -\> Conf**\

Types:

Dir = string()\
 Conf = \[users\_entry()\]\

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.

**agents\_entry(UserId, TargetName, Comm, Domain, Addr, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel) -\> agents\_entry()**\

Types:

UserId = term()\
 TargetName = string()\
 Comm = string()\
 Domain = transportDomain()\
 Addr = transportAddress()\
 EngineID = string()\
 Timeout = integer()\
 MaxMessageSize = integer()\
 Version = v1 \| v2 \| v3\
 SecModel = v1 \| v2c \| usm\
 SecName = string()\
 SecLevel = noAuthNoPriv \| authNoPriv \| authPriv\
 agents\_entry() = term()\

Create an entry for the manager agents config file, *agents.conf*.

See Agents for more info.

**write\_agents\_config(Dir, Conf) -\> ok**\
 **write\_agents\_config(Dir, Hdr, Conf) -\> ok**\

Types:

Dir = string()\
 Hdr = string()\
 Conf = \[\_entry()\]\

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.

**append\_agents\_config(Dir, Conf) -\> ok**\

Types:

Dir = string()\
 Conf = \[agents\_entry()\]\

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.

**read\_agents\_config(Dir) -\> Conf**\

Types:

Dir = string()\
 Conf = \[agents\_entry()\]\

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.

**usm\_entry(EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey) -\> usm\_entry()**\
 **usm\_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey) -\> usm\_entry()**\

Types:

EngineID = string()\
 UserName = string()\
 SecName = string()\
 AuthP = usmNoAuthProtocol \| usmHMACMD5AuthProtocol \| usmHMACSHAAuthProtocol \| usmHMAC128SHA224AuthProtocol \| usmHMAC192SH256AuthProtocol \| usmHMAC256SHA384AuthProtocol \| usmHMAC384SHA512AuthProtocol\
 AuthKey = \[integer()\]\
 PrivP = usmNoPrivProtocol \| usmDESPrivProtocol \| usmAesCfb128Protocol\
 PrivKey = \[integer()\]\
 usm\_entry() = term()\

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

See Security data for USM for more info.

**write\_usm\_config(Dir, Conf) -\> ok**\
 **write\_usm\_config(Dir, Hdr, Conf) -\> ok**\

Types:

Dir = string()\
 Hdr = string()\
 Conf = \[usm\_entry()\]\

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.

**append\_usm\_config(Dir, Conf) -\> ok**\

Types:

Dir = string()\
 Conf = \[usm\_entry()\]\

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.

**read\_usm\_config(Dir) -\> Conf**\

Types:

Dir = string()\
 Conf = \[usm\_entry()\]\

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.
