snmpa_conf(3erl)
πΈ NAME πΈ
okay bestie, meet snmpa_conf β yes, thatβs snmpa_conf(3erl) in Erlang Module Definition land π
. Itβs the module with utility functions for handling the SNMP agent config files, and weβre gonna read this whole thing together, no skipped lore.
π DESCRIPTION π
The module snmpa_conf contains various utility functions to be used for manipulating (write/append/read) the config files of the SNMP agent. Thatβs the whole vibe: write it, append it, read it, slay π.
π¦ DATA TYPES π¦
okay so these are the type aliases, no cap β copy them exactly, because they are literally the map of the whole config-file situation πΊοΈβ¨.
transportDomain() = transportDomainUdpIpv4 | transportDomainUdpIpv6
transportAddress() =
transportAddressIPv4() | transportAddressIPv6()
transportAddressWithPort() =
transportAddressIPv4WithPort() | transportAddressIPv6WithPort()
transportAddressWithoutPort() =
transportAddressIPv4WithoutPort() | transportAddressIPv6WithoutPort()
transportAddressIPv4() =
transportAddressIPv4WithPort() | transportAddressIPv4WithoutPort()
transportAddressIPv4WithPort =
{transportAddressIPv4WithoutPort(), inet:port_number()} |
[byte() x 4, byte() x 2]
transportAddressIPv4WithoutPort =
inet:ip4_address() | [byte() x 4]
transportAddressIPv6() =
transportAddressIPv6WithPort() | transportAddressIPv6WithoutPort()
transportAddressIPv6WithPort =
{transportAddressIPv6WithoutPort(), inet:port_number()} |
[word() x 8, inet:port_number()] |
[word() x 8, byte() x 2] |
{byte() x 16, byte() x 2}
transportAddressIPv6WithoutPort =
inet:ip6_address() | [word() x 8] | [byte() x 16]
transportAddressMask() =
[] | transportAddressWithPort()
byte() = 0..255
word() = 0..65535
For inet:ip4_address(), inet:ip6_address() and inet:port_number(), see also inet:ip_address().
β¨ EXPORTS β¨
π agent_entry/2 π
agent_entry(Tag, Val) -> agent_entry()
Types:
Tag = intAgentTransports | intAgentUDPPort |
intAgentMaxPacketSize | snmpEngineMaxMessageSize |
snmpEngineID
Val = term()
agent_entry() = term()
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. iykyk π«Ά
π write_agent_config/2, write_agent_config/3 π
write_agent_config(Dir, Conf) -> ok
write_agent_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
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). Literally as-is, bestie β no glow-up on the way in π
.
See Agent Information for more info.
π append_agent_config/2 π
append_agent_config(Dir, Conf) -> ok
Types:
Dir = string()
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.
π read_agent_config/1 π
read_agent_config(Dir) -> Conf
Types:
Dir = string()
Conf = [agent_entry()]
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.
π standard_entry/2 π
standard_entry(Tag, Val) -> standard_entry()
Types:
Tag = sysDescr | sysObjectID | sysContact | sysName |
sysLocation | sysServices | snmpEnableAuthenTraps
Val = term()
standard_entry() = term()
Create an entry for the agent standard config file, standard.conf.
The type of Val depends on the value of Tag, see System Information for more info. π
π write_standard_config/2, write_standard_config/3 π
write_standard_config(Dir, Conf) -> ok
write_standard_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
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.
π append_standard_config/2 π
append_standard_config(Dir, Conf) -> ok
Types:
Dir = string()
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.
π read_standard_config/1 π
read_standard_config(Dir) -> Conf
Types:
Dir = string()
Conf = [standard_entry()]
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.
π context_entry/1 π
context_entry(Context) -> context_entry()
Types:
Context = string()
context_entry() = term()
Create an entry for the agent context config file, context.conf.
See Contexts for more info. π¦
π write_context_config/2, write_context_config/3 π
write_context_config(Dir, Conf) -> ok
write_context_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
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.
π append_context_config/2 π
append_context_config(Dir, Conf) -> ok
Types:
Dir = string()
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.
π read_context_config/1 π
read_context_config(Dir) -> Conf
Types:
Dir = string()
Conf = [context_entry()]
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.
π community_entry/1, community_entry/5 π
community_entry(CommunityIndex) -> community_entry()
community_entry(CommunityIndex, CommunityName, SecName, ContextName, TransportTag) -> community_entry()
Types:
CommunityIndex = string()
CommunityName = string()
SecName = string()
CtxName = string()
TransportTag = string()
community_entry() = term()
Create an entry for the agent community config file, community.conf.
CommunityIndex must be a non-empty string. like, mandatory, no empty-string nonsense π.
community_entry("public") translates to the following call:
community_entry(CommunityIndex, CommunityIndex, "initial", "", "").
community_entry("all-rights") translates to the following call:
community_entry(CommunityIndex, CommunityIndex, CommunityIndex, "", "").
See Community for more info.
π write_community_config/2, write_community_config/3 π
write_community_config(Dir, Conf) -> ok
write_community_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
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.
π append_community_config/2 π
append_community_config(Dir, Conf) -> ok
Types:
Dir = string()
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.
π read_community_config/1 π
read_community_config(Dir) -> Conf
Types:
Dir = string()
Conf = [community_entry()]
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. yes, plural there β keep that detail, bestie π«Ά
π target_addr_entry/6, target_addr_entry/7, target_addr_entry/8, target_addr_entry/10 π
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId) ->
target_addr_entry()
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId,
TMask) -> target_addr_entry()
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId,
TMask, MaxMessageSize) -> target_addr_entry()
target_addr_entry(Name, Domain, Addr, Timeout, RetryCount, TagList,
ParamsName, EngineId, TMask, MaxMessageSize) -> target_addr_entry()
Types:
Name = string()
Domain = transportDomain()
Ip = transportAddress() (depends on Domain)
Timeout = integer()
RetryCount = integer()
TagList = string()
ParamsName = string()
EngineId = string()
TMask = transportAddressMask() (depends on Domain)
MaxMessageSize = integer()
target_addr_entry() = term()
Create an entry for the agent target_addr config file, target_addr.conf.
Name must be a non-empty string. mandatory, bestie β no empty-string main character energy π
.
target_addr_entry/6 translates to the following call:
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, []).
target_addr_entry/7 translates to the following call:
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, 2048).
target_addr_entry/8 translates to the following call:
target_addr_entry(Name, Domain, Addr, 1500, 3, TagList, ParamsName, EngineId, TMask, MaxMessageSize).
See Target Address Definitions for more info. π₯
π write_target_addr_config/2, write_target_addr_config/3 π
write_target_addr_config(Dir, Conf) -> ok
write_target_addr_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
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.
π append_target_addr_config/2 π
append_target_addr_config(Dir, Conf) -> ok
Types:
Dir = string()
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.
π read_target_addr_config/1 π
read_target_addr_config(Dir) -> Conf
Types:
Dir = string()
Conf = [target_addr_entry()]
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.
β¨ target_params_entry crew β¨
target_params_entry(Name, Vsn) -> target_params_entry() target_params_entry(Name, Vsn, SecName, SecLevel) -> target_params_entry() target_params_entry(Name, MPModel, SecModel, SecName, SecLevel) -> target_params_entry()
Types:
Name = string()
Vsn = v1 | v2 | v3
MPModel = v1 | v2c | v3
SecModel = v1 | v2c | usm
SecName = string()
SecLevel = noAuthNoPriv | authNoPriv | authPriv
target_params_entry() = term()
These create an entry for the agent target_params config file, target_params.conf. Name must be a non-empty string β no empty-string nonsense, bestie π
.
Vsn translates into MPModel and SecModel as follows:
\011 Vsn = v1 => MPModel = v1, SecModel = v1
\011 Vsn = v2 => MPModel = v2c, SecModel = v2c
\011 Vsn = v3 => MPModel = v3, SecModel = usm
target_params_entry/2 translates to the following call:
target_params_entry(Name, Vsn, "initial", noAuthNoPriv).
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.
β¨ write_target_params_config crew β¨
write_target_params_config(Dir, Conf) -> ok write_target_params_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
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.
β¨ append_target_params_config era β¨
append_target_params_config(Dir, Conf) -> ok
Types:
Dir = string()
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.
β¨ read_target_params_config moment β¨
read_target_params_config(Dir) -> Conf
Types:
Dir = string()
Conf = [target_params_entry()]
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.
π¦ vacm entry besties π¦
vacm_s2g_entry(SecModel, SecName, GroupName) -> vacm_s2g_entry() vacm_acc_entry(GroupName, Prefix, SecModel, SecLevel, Match, ReadView, WriteView, NotifyView) -> vacm_acc_entry() vacm_vtf_entry(ViewIndex, ViewSubtree) -> vacm_vtf_entry() vacm_vtf_entry(ViewIndex, ViewSubtree, ViewStatus, ViewMask) -> vacm_vtf_entry()
Types:
SecModel = v1 | v2c | usm
SecName = string()
GroupName = string()
Prefix = string()
SecLevel = noAuthNoPriv | authNoPriv | authPriv
Match = prefix | exact
ReadView = string()
WriteView = string()
NotifyView = string()
ViewIndex = integer()
ViewSubtree = [integer()]
ViewStatus = included | excluded
ViewMask = null | [zero_or_one()]
zero_or_one() = 0 | 1
vacm_s2g_entry() = term()
vacm_acc_entry() = term()
vacm_vtf_entry() = term()
Create an 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.
π write_vacm_config squad π
write_vacm_config(Dir, Conf) -> ok write_vacm_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
Hdr = string()
Conf = [vacm_entry()]
vacm_entry() = vacm_sg2_entry() | vacm_acc_entry() | vacm_vtf_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.
πΈ append_vacm_config vibes πΈ
append_vacm_config(Dir, Conf) -> ok
Types:
Dir = string()
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.
β read_vacm_config energy β
read_vacm_config(Dir) -> Conf
Types:
Dir = string()
Conf = [vacm_entry()]
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.
π§ usm_entry icons π§
usm_entry(EngineId) -> usm_entry() usm_entry(EngineID, UserName, SecName, Clone, AuthP, AuthKeyC, OwnAuthKeyC, PrivP, PrivKeyC, OwnPrivKeyC, Public, AuthKey, PrivKey) -> usm_entry()
Types:
EngineId = string()
UserName = string()
SecName = string()
Clone = zeroDotZero | [integer()]
AuthP = usmNoAuthProtocol | usmHMACMD5AuthProtocol |
usmHMACSHAAuthProtocol | usmHMAC128SHA224AuthProtocol |
usmHMAC192SH256AuthProtocol | usmHMAC256SHA384AuthProtocol |
usmHMAC384SHA512AuthProtocol
AuthKeyC = string()
OwnAuthKeyC = string()
PrivP = usmNoPrivProtocol | usmDESPrivProtocol |
usmAesCfb128Protocol
PrivKeyC = string()
OwnPrivKeyC = string()
Public = string()
AuthKey = [integer()]
PrivKey = [integer()]
usm_entry() = term()
Create an entry for the agent vacm config file, vacm.conf. Yes, bestie, the original really says vacm.conf here β Iβm not fixing it, Iβm just preserving the lore π.
usm_entry/1 translates to the following call:
usm_entry("initial", "initial", zeroDotZero, usmNoAuthProtocol, "", "", usmNoPrivProtocol, "", "", "", "", "")
See Security data for USM for more info.
π write_usm_config time π
write_usm_config(Dir, Conf) -> ok write_usm_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
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.
π«§ append_usm_config moment π«§
append_usm_config(Dir, Conf) -> ok
Types:
Dir = string()
Conf = [usm_entry()]
Append the usm config to the current agent vacm config file. Yes, the original says vacm right there β keeping it exactly, no cap π«Ά.
Dir is the path to the directory where to store the config file.
See Security data for USM for more info.
π read_usm_config glow π
read_usm_config(Dir) -> Conf
Types:
Dir = string()
Conf = [usm_entry()]
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.
π notify_entry cuties π
notify_entry(Name, Tag, Type) -> notify_entry()
Types:
Name = string()
Tag = string()
Type = trap | inform
community_entry() = term()
Create an entry for the agent notify config file, notify.conf. Name must be a non-empty string.
See Notify Definitions for more info.
π write_notify_config pack π
write_notify_config(Dir, Conf) -> ok write_notify_config(Dir, Hdr, Conf) -> ok
Types:
Dir = string()
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.
π append_notify_config bestie π
append_notify_config(Dir, Conf) -> ok
Types:
Dir = string()
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.
πΈ read_notify_config finale πΈ
read_notify_config(Dir) -> Conf
Types:
Dir = string()
Conf = [community_entry()]
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.
okay bestie, thatβs the whole snmpa_conf part 2 config-file saga. Footer shoutout, exactly as written: Ericsson AB, snmp 5.13.5, snmpa_conf(3erl) β source/version/date sign-off, slay π
β¨π«Ά
π¦ where this page comes from
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4 Β· Apache-2.0
- ubuntu noble: erlang-manpages 1:25.3.2.8+dfsg-1ubuntu4.8 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms