RFC1155-SMI(7)
π RFC1155-SMI π (the MIB page, but make it a group chat)
okay so this is RFC1155-SMI(7) from the MIB manual β the ASN.1 module that lays out the SMI definitions. It's literally one big DEFINITIONS ::= BEGIN β¦ END block and every single line of it matters. No skimming bestie, we're reading the whole thing together π
β¨ SYNOPSIS β¨
RFC1155-SMI DEFINITIONS ::= BEGIN
π DESCRIPTION π
This is the module. It's an ASN.1 module. It drops a whole pile of definitions and it is very generous about what it shares β it exports everything (the comment literally says so, and I quote: -- EVERYTHING).
Inside you get:
- the object identifier tree bits π³
- the
OBJECT-TYPEmacro π - and the full cast of syntax types π
It ends with END. Obviously. Iconic behavior.
π¦ EXPORTS π¦
Here's the whole export list, no cap, no trimming, all of it:
EXPORTS -- EVERYTHING
internet, directory, mgmt,
experimental, private, enterprises,
OBJECT-TYPE, ObjectName, ObjectSyntax, SimpleSyntax,
ApplicationSyntax, NetworkAddress, IpAddress,
Counter, Gauge, TimeTicks, Opaque;
Not me getting emotional over a keyword that just gives away every single name π -- EVERYTHING is the most main character comment in this whole file.
πΈ THE OBJECT IDENTIFIER TREE πΈ
These are the OBJECT IDENTIFIER assignments, exactly as written:
internetβOBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }directoryβOBJECT IDENTIFIER ::= { internet 1 }mgmtβOBJECT IDENTIFIER ::= { internet 2 }experimentalβOBJECT IDENTIFIER ::= { internet 3 }privateβOBJECT IDENTIFIER ::= { internet 4 }enterprisesβOBJECT IDENTIFIER ::= { private 1 }
And in the original layout, all cozy together:
internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
directory OBJECT IDENTIFIER ::= { internet 1 }
mgmt OBJECT IDENTIFIER ::= { internet 2 }
experimental OBJECT IDENTIFIER ::= { internet 3 }
private OBJECT IDENTIFIER ::= { internet 4 }
enterprises OBJECT IDENTIFIER ::= { private 1 }
look at them. a whole little family tree π«Ά
π THE OBJECT-TYPE MACRO π
The macro, verbatim, every character:
OBJECT-TYPE MACRO ::=
BEGIN
TYPE NOTATION ::= "SYNTAX" type (TYPE ObjectSyntax)
"ACCESS" Access
"STATUS" Status
VALUE NOTATION ::= value (VALUE ObjectName)
Access ::= "read-only"
| "read-write"
| "write-only"
| "not-accessible"
Status ::= "mandatory"
| "optional"
| "obsolete"
END
So the TYPE NOTATION takes "SYNTAX", then a type (TYPE ObjectSyntax), then "ACCESS" Access, then "STATUS" Status. And the VALUE NOTATION is value (VALUE ObjectName).
The two little menus inside it:
Access can be one of:
"read-only""read-write""write-only""not-accessible"
Status can be one of:
"mandatory""optional""obsolete"
"obsolete" is giving retired-but-still-in-the-group-chat energy π
π THE TYPES π
ObjectName
ObjectName ::=
OBJECT IDENTIFIER
ObjectSyntax
-- syntax of objects in the MIB
ObjectSyntax ::=
CHOICE {
simple
SimpleSyntax,
-- note that simple SEQUENCEs are not directly
-- mentioned here to keep things simple (i.e.,
-- prevent mis-use). However, application-wide
-- types which are IMPLICITly encoded simple
-- SEQUENCEs may appear in the following CHOICE
application-wide
ApplicationSyntax
}
Read those comments, bestie, they're doing the explaining for me: simple SEQUENCEs are not directly mentioned here, on purpose, to keep things simple (i.e. prevent mis-use) β but application-wide types that are IMPLICITly encoded simple SEQUENCEs may show up in the following CHOICE π
SimpleSyntax
SimpleSyntax ::=
CHOICE {
number
INTEGER,
string
OCTET STRING,
object
OBJECT IDENTIFIER,
empty
NULL
}
ApplicationSyntax
ApplicationSyntax ::=
CHOICE {
address
NetworkAddress,
counter
Counter,
gauge
Gauge,
ticks
TimeTicks,
arbitrary
Opaque
-- other application-wide types, as they are
-- defined, will be added here
}
(note that closing brace indentation and the little note that other application-wide types will be added here as they get defined β they're leaving room in the group chat for future members π₯Ή)
NetworkAddress
-- application-wide types
NetworkAddress ::=
CHOICE {
internet
IpAddress
}
IpAddress
IpAddress ::=
[APPLICATION 0] -- in network-byte order
IMPLICIT OCTET STRING (SIZE (4))
SIZE (4). four. in network-byte order. locked in π
Counter
Counter ::=
[APPLICATION 1]
IMPLICIT INTEGER (0..4294967295)
Gauge
Gauge ::=
[APPLICATION 2]
IMPLICIT INTEGER (0..4294967295)
TimeTicks
TimeTicks ::=
[APPLICATION 3]
IMPLICIT INTEGER (0..4294967295)
three whole types that are all IMPLICIT INTEGER (0..4294967295) and honestly? consistency is a love language π
Opaque
Opaque ::=
[APPLICATION 4] -- arbitrary ASN.1 value,
IMPLICIT OCTET STRING -- "double-wrapped"
"double-wrapped" π the quotes in the comment are killing me. arbitrary ASN.1 value, double-wrapped, no further questions.
And then:
END
slay. that's the module. π
Heads up bestie: this page is all definitions β if you're copying these blocks anywhere, keep the tags, numbers, sizes and comments exactly as they're written here, because every single one of them is load-bearing π
ok that's literally the whole thing, you ate it π«Ά this page lives under Erlang/OTP in the SNMP corner of the manual, filed as RFC1155-SMI(7), and now you know it fr fr. go be iconic with your object identifiers β¨
π¦ where this page comes from
- alpine 3.24: erlang28-doc 28.5.0.8-r0 Β· Apache-2.0
- arch rolling: erlang-core 29.1.1-1 Β· Apache-2.0
- nixos 26.05: erlang 29.1.2
- nixpkgs unstable: erlang 29.1.2
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms