SNMPv2-TC(7)
โจ SNMPv2-TC(7) โจ
okay so bestie, welcome to the SNMPv2-TC(7) manual page! This is part 1 of 3, and it's giving major MIB energy. No cap, we're about to dive into the textual conventions that make SNMP go round. Let's get into it. ๐
๐ SNMPv2-TC DEFINITIONS ::= BEGIN ๐
Here's the opening vibe:
SNMPv2-TC DEFINITIONS ::= BEGIN
IMPORTS
ObjectSyntax, TimeTicks FROM SNMPv2-SMI;
So basically, this module is importing ObjectSyntax and TimeTicks from SNMPv2-SMI. That's the tea. โ๏ธ
๐ TEXTUAL-CONVENTION MACRO ๐
This is the macro that defines how textual conventions work. It's iconic, literally the blueprint.
TEXTUAL-CONVENTION MACRO ::=
BEGIN
TYPE NOTATION ::=
DisplayPart
"STATUS" Status
"DESCRIPTION" Text
ReferPart
"SYNTAX" Syntax
VALUE NOTATION ::=
value(VALUE Syntax)
DisplayPart ::=
"DISPLAY-HINT" Text
| empty
Status ::=
"current"
| "deprecated"
| "obsolete"
ReferPart ::=
"REFERENCE" Text
| empty
-- uses the NVT ASCII character set
Text ::= """" string """"
Syntax ::=
type(ObjectSyntax)
| "BITS" "{" Kibbles "}"
Kibbles ::=
Kibble
| Kibbles "," Kibble
Kibble ::=
identifier "(" nonNegativeNumber ")"
END
So that's the macro. It's got TYPE NOTATION, VALUE NOTATION, and all the parts. The Status can be "current", "deprecated", or "obsolete". Text uses the NVT ASCII character set. Syntax can be a type or BITS with kibbles. Periodt. ๐
๐ธ DisplayString ๐ธ
DisplayString ::= TEXTUAL-CONVENTION
DISPLAY-HINT "255a"
STATUS current
DESCRIPTION
"Represents textual information taken from the NVT ASCII
character set, as defined in pages 4, 10-11 of RFC 854.
To summarize RFC 854, the NVT ASCII repertoire specifies:
- the use of character codes 0-127 (decimal)
- the graphics characters (32-126) are interpreted as
US ASCII
- NUL, LF, CR, BEL, BS, HT, VT and FF have the special
meanings specified in RFC 854
- the other 25 codes have no standard interpretation
- the sequence 'CR LF' means newline
- the sequence 'CR NUL' means carriage-return
- an 'LF' not preceded by a 'CR' means moving to the
same column on the next line.
- the sequence 'CR x' for any x other than LF or NUL is
illegal. (Note that this also means that a string may
end with either 'CR LF' or 'CR NUL', but not with CR.)
Any object defined using this syntax may not exceed 255 characters in length."
SYNTAX OCTET STRING (SIZE (0..255))
So DisplayString is all about text from the NVT ASCII character set, as per RFC 854. It says character codes 0-127, graphics 32-126 are US ASCII, and special ones like NUL, LF, CR, BEL, BS, HT, VT, FF have meanings. The other 25 codes? No standard interpretation. 'CR LF' is newline, 'CR NUL' is carriage-return, 'LF' not preceded by 'CR' moves to same column next line. 'CR x' for any x other than LF or NUL is illegal, so a string can end with 'CR LF' or 'CR NUL' but not just CR. And any object using this syntax can't be longer than 255 characters. The SYNTAX is OCTET STRING (SIZE (0..255)). Slay. โจ
๐ PhysAddress ๐
PhysAddress ::= TEXTUAL-CONVENTION
DISPLAY-HINT "1x:"
STATUS current
DESCRIPTION
"Represents media- or physical-level addresses."
SYNTAX OCTET STRING
PhysAddress is for media- or physical-level addresses. Simple. DISPLAY-HINT is "1x:". SYNTAX is OCTET STRING. ๐
๐ฆ MacAddress ๐ฆ
MacAddress ::= TEXTUAL-CONVENTION
DISPLAY-HINT "1x:"
STATUS current
DESCRIPTION
"Represents an 802 MAC address represented in the
`canonical' order defined by IEEE 802.1a, i.e., as if it
were transmitted least significant bit first, even though
802.5 (in contrast to other 802.x protocols) requires MAC
addresses to be transmitted most significant bit first."
SYNTAX OCTET STRING (SIZE (6))
MacAddress is an 802 MAC address in canonical order as defined by IEEE 802.1a, like it was transmitted least significant bit first, even though 802.5 (unlike other 802.x) requires MAC addresses most significant bit first. SYNTAX is OCTET STRING (SIZE (6)). So six bytes, no more no less. ๐
โญ TruthValue โญ
TruthValue ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Represents a boolean value."
SYNTAX INTEGER { true(1), false(2) }
TruthValue is a boolean. SYNTAX is INTEGER { true(1), false(2) }. So true is 1, false is 2. Not 0 and 1, okay? Don't @ me. ๐
๐ฎ TestAndIncr ๐ฎ
TestAndIncr ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Represents integer-valued information used for atomic
operations. When the management protocol is used to specify
that an object instance having this syntax is to be
modified, the new value supplied via the management protocol
must precisely match the value presently held by the
instance. If not, the management protocol set operation
fails with an error of `inconsistentValue'. Otherwise, if
the current value is the maximum value of 2^31-1 (2147483647
decimal), then the value held by the instance is wrapped to
zero; otherwise, the value held by the instance is
incremented by one. (Note that regardless of whether the
management protocol set operation succeeds, the variable-
binding in the request and response PDUs are identical.)
The value of the ACCESS clause for objects having this syntax is either `read-write' or `read-create'. When an instance of a columnar object having this syntax is created, any value may be supplied via the management protocol.
When the network management portion of the system is re- initialized, the value of every object instance having this syntax must either be incremented from its value prior to the re-initialization, or (if the value prior to the re- initialization is unknown) be set to a pseudo-randomly generated value."
SYNTAX INTEGER (0..2147483647)
Okay so TestAndIncr is for atomic operations. When you set it, the new value must exactly match the current value, or you get inconsistentValue. If it matches, and the current value is the max 2^31-1 (which is 2147483647 decimal), it wraps to zero; otherwise it increments by one. And note: whether the set succeeds or not, the varbinds in request and response PDUs are identical. The ACCESS clause for objects with this syntax is either read-write or read-create. When you create a columnar object with this syntax, you can supply any value. On re-initialization, every instance must either be incremented from its prior value, or if unknown, set to a pseudo-randomly generated value. The SYNTAX is INTEGER (0..2147483647). Big brain energy. ๐ง
๐ AutonomousType ๐
AutonomousType ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Represents an independently extensible type identification
value. It may, for example, indicate a particular sub-tree
with further MIB definitions, or define a particular type of
protocol or hardware."
SYNTAX OBJECT IDENTIFIER
AutonomousType is an independently extensible type identification value. It could be a subtree with more MIB definitions, or a type of protocol or hardware. SYNTAX is OBJECT IDENTIFIER. It's giving flexibility. ๐
๐ InstancePointer ๐
InstancePointer ::= TEXTUAL-CONVENTION
STATUS obsolete
DESCRIPTION
"A pointer to either a specific instance of a MIB object or
a conceptual row of a MIB table in the managed device. In
the latter case, by convention, it is the name of the
particular instance of the first accessible columnar object
in the conceptual row.
The two uses of this textual convention are replaced by VariablePointer and RowPointer, respectively."
SYNTAX OBJECT IDENTIFIER
InstancePointer is obsolete! It's a pointer to either a specific instance of a MIB object or a conceptual row of a MIB table. For a row, by convention, it's the name of the instance of the first accessible columnar object in that row. But the two uses are replaced by VariablePointer and RowPointer. So don't use this, bestie. It's deprecated. SYNTAX is OBJECT IDENTIFIER.
โจ VariablePointer โจ
VariablePointer ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"A pointer to a specific object instance. For example,
sysContact.0 or ifInOctets.3."
SYNTAX OBJECT IDENTIFIER
VariablePointer is a pointer to a specific object instance. Examples: sysContact.0 or ifInOctets.3. SYNTAX is OBJECT IDENTIFIER. Got it. ๐ซถ
๐ฏ RowPointer ๐ฏ
RowPointer ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"Represents a pointer to a conceptual row. The value is the
name of the instance of the first accessible columnar object
in the conceptual row.
For example, ifIndex.3 would point to the 3rd row in the ifTable (note that if ifIndex were not-accessible, then ifDescr.3 would be used instead)."
SYNTAX OBJECT IDENTIFIER
RowPointer points to a conceptual row. The value is the name of the instance of the first accessible columnar object in that row. Example: ifIndex.3 points to the 3rd row in ifTable (but if ifIndex were not-accessible, then ifDescr.3 would be used instead). SYNTAX is OBJECT IDENTIFIER. Chef's kiss. ๐
๐ RowStatus ๐
This one is long, so buckle up.
RowStatus ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"The RowStatus textual convention is used to manage the
creation and deletion of conceptual rows, and is used as the value of the SYNTAX clause for the status column of a conceptual row (as described in Section 7.7.1 of [2].)
The status column has six defined values:
- `active', which indicates that the conceptual row is
available for use by the managed device;
- `notInService', which indicates that the conceptual
row exists in the agent, but is unavailable for use by
the managed device (see NOTE below);
- `notReady', which indicates that the conceptual row
exists in the agent, but is missing information
necessary in order to be available for use by the
managed device;
- `createAndGo', which is supplied by a management
station wishing to create a new instance of a
conceptual row and to have its status automatically set
to active, making it available for use by the managed
device;
- `createAndWait', which is supplied by a management
station wishing to create a new instance of a
conceptual row (but not make it available for use by
the managed device); and,
- `destroy', which is supplied by a management station
wishing to delete all of the instances associated with
an existing conceptual row.
Whereas five of the six values (all except `notReady') may be specified in a management protocol set operation, only three values will be returned in response to a management protocol retrieval operation: `notReady', `notInService' or `active'. That is, when queried, an existing conceptual row has only three states: it is either available for use by the managed device (the status column has value `active'); it is not available for use by the managed device, though the agent has sufficient information to make it so (the status column has value `notInService'); or, it is not available for use by the managed device, and an attempt to make it so would fail because the agent has insufficient information (the state column has value `notReady').
NOTE WELL
This textual convention may be used for a MIB table, irrespective of whether the values of that table's conceptual rows are able to be modified while it is active, or whether its conceptual rows must be taken out of service in order to be modified. That is, it is the responsibility of the DESCRIPTION clause of the status column to specify whether the status column must not be `active' in order for the value of some other column of the same conceptual row to be modified. If such a specification is made, affected columns may be changed by an SNMP set PDU if the RowStatus would not be equal to `active' either immediately before or after processing the PDU. In other words, if the PDU also contained a varbind that would change the RowStatus value, the column in question may be changed if the RowStatus was not equal to `active' as the PDU was received, or if the varbind sets the status to a value other than 'active'.
Also note that whenever any elements of a row exist, the RowStatus column must also exist.
To summarize the effect of having a conceptual row with a status column having a SYNTAX clause value of RowStatus, consider the following state diagram:
STATE
+--------------+-----------+-------------+-------------
| A | B | C | D
| |status col.|status column|
|status column | is | is |status column
ACTION |does not exist| notReady | notInService| is active
set status |noError ->D|inconsist- |inconsistent-|inconsistent-
column to | or | entValue| Value| Value
createAndGo |inconsistent- | | |
| Value| | |
set status |noError see 1|inconsist- |inconsistent-|inconsistent-
column to | or | entValue| Value| Value
createAndWait |wrongValue | | |
set status |inconsistent- |inconsist- |noError |noError
column to | Value| entValue| |
active | | | |
| | or | |
| | | |
| |see 2 ->D| ->D| ->D
set status |inconsistent- |inconsist- |noError |noError ->C
column to | Value| entValue| |
notInService | | | |
| | or | | or
| | | |
| |see 3 ->C| ->C|wrongValue
set status |noError |noError |noError |noError
column to | | | |
destroy | ->A| ->A| ->A| ->A
set any other |see 4 |noError |noError |see 5
column to some| | | |
value | | see 1| ->C| ->D
(1) goto B or C, depending on information available to the agent.
(2) if other variable bindings included in the same PDU, provide values for all columns which are missing but required, then return noError and goto D.
So RowStatus is the big one. It manages creation and deletion of conceptual rows. It's used as the SYNTAX for the status column of a conceptual row (see Section 7.7.1 of [2]). The status column has six values: active, notInService, notReady, createAndGo, createAndWait, and destroy. That's the list. Only five (all except notReady) can be set in a set operation, but only three will be returned on retrieval: notReady, notInService, or active. So when you query, a row has three states: available (active), not available but agent has info (notInService), or not available and agent lacks info (notReady). There's a NOTE WELL about how this can be used for a MIB table regardless of whether rows can be modified while active or must be taken out of service. The DESCRIPTION of the status column must specify whether it must not be active to modify other columns. If so, affected columns may be changed by an SNMP set PDU if the RowStatus would not equal active either immediately before or after processing the PDU. In other words, if the PDU also had a varbind changing RowStatus, the column in question may be changed if the RowStatus was not equal to active when the PDU was received, or if the varbind sets status to a value other than active. Also, whenever any elements of a row exist, the RowStatus column must also exist. Then the state diagram. That's the tea. And the first two notes: (1) goto B or C depending on info available to agent. (2) if other variable bindings in same PDU provide values for all missing but required columns, then return noError and goto D.
bestie, that state diagram is a whole mood. Study it, because it's important. ๐ฅ
- if other variable bindings are in the same PDU, you just provide values for all the columns that are missing but required, then return
noErrorand goto C. easy. - at the agent's discretion, the return value can be any of these three:
inconsistentNameโ because the agent does not choose to create such an instance when the correspondingRowStatusinstance does not exist, orinconsistentValueโ if the supplied value is inconsistent with the state of some other MIB object's value, ornoErrorโ because the agent chooses to create the instance.
If noError comes back, then the instance of the status column must also be created, and the new state is B or C, depending on what info the agent has. If inconsistentName or inconsistentValue comes back, the row just stays in state A. no drama, it just vibes there.
- depending on the MIB definition for the column/table, either
noErrororinconsistentValuemay be returned.
NOTE: other processing of the set request may result in a response other thannoErrorbeing returned, e.g.,wrongValue,noCreation, etc.
๐ฑ Conceptual Row Creation
There are four potential interactions when you're creating a conceptual row, bestie:
- selecting an instance-identifier which is not in use;
- creating the conceptual row;
- initializing any objects for which the agent does not supply a default; and
- making the conceptual row available for use by the managed device.
๐ฏ Interaction 1: Selecting an Instance-Identifier
The algorithm used to select an instance-identifier varies for each conceptual row. In some cases, the instance-identifier is semantically significant, e.g., the destination address of a route, and a management station selects the instance-identifier according to the semantics.
In other cases, the instance-identifier is used solely to distinguish conceptual rows, and a management station without specific knowledge of the conceptual row might examine the instances present in order to determine an unused instance-identifier. (This approach may be used, but it is often highly sub-optimal; however, it is also a questionable practice for a naive management station to attempt conceptual row creation. ๐)
Alternately, the MIB module which defines the conceptual row might provide one or more objects which provide assistance in determining an unused instance-identifier. For example, if the conceptual row is indexed by an integer-value, then an object having an integer-valued SYNTAX clause might be defined for such a purpose, allowing a management station to issue a management protocol retrieval operation. In order to avoid unnecessary collisions between competing management stations, adjacent retrievals of this object should be different.
Finally, the management station could select a pseudo-random number to use as the index. In the event that this index was already in use and an inconsistentValue was returned in response to the management protocol set operation, the management station should simply select a new pseudo-random number and retry the operation. just reroll, babe ๐ฒ
A MIB designer should choose between the two latter algorithms based on the size of the table (and therefore the efficiency of each algorithm). For tables in which a large number of entries are expected, it is recommended that a MIB object be defined that returns an acceptable index for creation. For tables with small numbers of entries, it is recommended that the latter pseudo-random index mechanism be used.
๐ ๏ธ Interaction 2: Creating the Conceptual Row
Once an unused instance-identifier has been selected, the management station determines if it wishes to create and activate the conceptual row in one transaction or in a negotiated set of interactions.
๐ฅ Interaction 2a: Creating and Activating the Conceptual Row
The management station must first determine the column requirements, i.e., it must determine those columns for which it must or must not provide values. Depending on the complexity of the table and the management station's knowledge of the agent's capabilities, this determination can be made locally by the management station. Alternately, the management station issues a management protocol get operation to examine all columns in the conceptual row that it wishes to create. In response, for each column, there are three possible outcomes:
- a value is returned, indicating that some other management station has already created this conceptual row. We return to interaction 1. ๐
- the exception
noSuchInstanceis returned, indicating that the agent implements the object-type associated with this column, and that this column in at least one conceptual row would be accessible in the MIB view used by the retrieval were it to exist. For those columns to which the agent provides read-create access, thenoSuchInstanceexception tells the management station that it should supply a value for this column when the conceptual row is to be created. - the exception
noSuchObjectis returned, indicating that the agent does not implement the object-type associated with this column or that there is no conceptual row for which this column would be accessible in the MIB view used by the retrieval. As such, the management station can not issue any management protocol set operations to create an instance of this column.
Once the column requirements have been determined, a management protocol set operation is accordingly issued. This operation also sets the new instance of the status column to createAndGo.
When the agent processes the set operation, it verifies that it has sufficient information to make the conceptual row available for use by the managed device. The information available to the agent is provided by two sources: the management protocol set operation which creates the conceptual row, and, implementation-specific defaults supplied by the agent (note that an agent must provide implementation-specific defaults for at least those objects which it implements as read-only). If there is sufficient information available, then the conceptual row is created, a noError response is returned, the status column is set to active, and no further interactions are necessary (i.e., interactions 3 and 4 are skipped. we love an efficient queen ๐). If there is insufficient information, then the conceptual row is not created, and the set operation fails with an error of inconsistentValue. On this error, the management station can issue a management protocol retrieval operation to determine if this was because it failed to specify a value for a required column, or, because the selected instance of the status column already existed. In the latter case, we return to interaction 1. In the former case, the management station can re-issue the set operation with the additional information, or begin interaction 2 again using createAndWait in order to negotiate creation of the conceptual row.
NOTE WELL ๐จ Regardless of the method used to determine the column requirements, it is possible that the management station might deem a column necessary when, in fact, the agent will not allow that particular columnar instance to be created or written. In this case, the management protocol set operation will fail with an error such asnoCreationornotWritable. In this case, the management station decides whether it needs to be able to set a value for that particular columnar instance. If not, the management station re-issues the management protocol set operation, but without setting a value for that particular columnar instance; otherwise, the management station aborts the row creation algorithm.
๐ค Interaction 2b: Negotiating the Creation of the Conceptual Row
The management station issues a management protocol set operation which sets the desired instance of the status column to createAndWait. If the agent is unwilling to process a request of this sort, the set operation fails with an error of wrongValue. (As a consequence, such an agent must be prepared to accept a single management protocol set operation, i.e., interaction 2a above, containing all of the columns indicated by its column requirements.) Otherwise, the conceptual row is created, a noError response is returned, and the status column is immediately set to either notInService or notReady, depending on whether it has sufficient information to make the conceptual row available for use by the managed device. If there is sufficient information available, then the status column is set to notInService; otherwise, if there is insufficient information, then the status column is set to notReady. Regardless, we proceed to interaction 3. โก๏ธ
โจ Interaction 3: Initializing non-defaulted Objects
The management station must now determine the column requirements. It issues a management protocol get operation to examine all columns in the created conceptual row. In the response, for each column, there are three possible outcomes:
- a value is returned, indicating that the agent implements the object-type associated with this column and had sufficient information to provide a value. For those columns to which the agent provides read-create access (and for which the agent allows their values to be changed after their creation), a value return tells the management station that it may issue additional management protocol set operations, if it desires, in order to change the value associated with this column.
- the exception
noSuchInstanceis returned, indicating that the agent implements the object-type associated with this column, and that this column in at least one conceptual row would be accessible in the MIB view used by the retrieval were it to exist. However, the agent does not have sufficient information to provide a value, and until a value is provided, the conceptual row may not be made available for use by the managed device. For those columns to which the agent provides read-create access, thenoSuchInstanceexception tells the management station that it must issue additional management protocol set operations, in order to provide a value associated with this column. - the exception
noSuchObjectis returned, indicating that the agent does not implement the object-type associated with this column or that there is no conceptual row for which this column would be accessible in the MIB view used by the retrieval. As such, the management station can not issue any management protocol set operations to create an instance of this column.
If the value associated with the status column is notReady, then the management station must first deal with all noSuchInstance columns, if any. Having done so, the value of the status column becomes notInService, and we proceed to interaction 4.
๐ Interaction 4: Making the Conceptual Row Available
Once the management station is like "okay bestie, these column values are everything, we're good", it fires off a management protocol set operation to set the status column to active. If the agent has enough info to make the conceptual row available for use by the managed device, that set op succeeds (and you get a noError response back ๐). If not? It fails with an error of inconsistentValue. Rude but fair.
๐จ NOTE WELL ๐จ
A conceptual row whose status column is notInService or notReady is unavailable to the managed device. Which means โ plot twist โ the managed device can absolutely create its own instances in that little window between the set operation that sets the status column to createAndWait and the set operation that sets it to active. And when that happens, and the set op to active finally lands, the values held in the agent supersede those used by the managed device. Agent ate, managed device is gagged, moving on ๐
.
If the management station gets prevented from setting the status column to active (say, management station or network failure โ a whole mess ๐ญ), the conceptual row just sits there in the notInService or notReady state, consuming resources indefinitely. Not iconic. So the agent must detect conceptual rows that have been in either state for an abnormally long period of time and remove them. Bestie, who decides what "abnormally long" means? It's the job of the DESCRIPTION clause of the status column to say so. That period should be long enough to allow for human response time (including think time, because humans are slow and we love them for it ๐ซถ) between the creation of the conceptual row and the setting of the status to active. And in the absense of such information in the DESCRIPTION clause (yes, that's the original's spelling, not mine, I'm just the messenger ๐), it's suggested that this period be approximately 5 minutes in length. Oh and heads up: this removal action applies not only to newly-created rows, but also to previously active rows which are set to, and left in, the notInService state for a prolonged period exceeding what's considered normal for that kind of conceptual row. So clean up your rows, girlies. ๐งน
๐ค Conceptual Row Suspension ๐ค
When a conceptual row is active, the management station may issue a management protocol set operation that sets the instance of the status column to notInService. If the agent is unwilling to do it, the set operation fails with an error of wrongValue. Otherwise, the conceptual row is taken out of service and a noError response comes back. And whose job is it to explain when the status column should be taken out of service? You guessed it, the DESCRIPTION clause of the status column again (e.g., so the value of some other column of the same conceptual row can be modified). Slay, documentation ๐
.
๐๏ธ Conceptual Row Deletion ๐๏ธ
For deletion of conceptual rows, you issue a management protocol set operation that sets the instance of the status column to destroy. And here's the gag: this request may be made regardless of the current value of the status column (e.g., it is possible to delete conceptual rows which are either notReady, notInService or active). If the operation succeeds, then all instances associated with the conceptual row are immediately removed. Gone. Poof. Periodt. ๐
And here's the SYNTAX for all of that, verbatim, because details are sacred:
SYNTAX INTEGER {
-- the following two values are states:
-- these values may be read or written
active(1),
notInService(2),
-- the following value is a state:
-- this value may be read, but not written
notReady(3),
-- the following three values are
-- actions: these values may be written,
-- but are never read
createAndGo(4),
createAndWait(5),
destroy(6)
}
๐ธ TimeStamp ::= TEXTUAL-CONVENTION ๐ธ
STATUSโcurrentโจDESCRIPTIONโ "The value of thesysUpTimeobject at which a specific occurrence happened. The specific occurrence must be defined in the description of any object defined using this type."SYNTAXโTimeTicks
It's giving "when did the thing happen, according to uptime". And which thing? Not this page's problem, define it yourself in your object's description, bestie ๐ซถ.
๐ TimeInterval ::= TEXTUAL-CONVENTION ๐
STATUSโcurrentโจDESCRIPTIONโ "A period of time, measured in units of 0.01 seconds."SYNTAXโINTEGER (0..2147483647)
That's 0.01 seconds per unit, so like, centiseconds, and the range goes all the way up to 2147483647. Do with that what you will ๐
.
๐ฆ DateAndTime ::= TEXTUAL-CONVENTION ๐ฆ
DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
STATUSโcurrentโจDESCRIPTIONโ "A date-time specification." And then, gorgeous, the layout:
field octets contents range
----- ------ -------- -----
1 1-2 year 0..65536
2 3 month 1..12
3 4 day 1..31
4 5 hour 0..23
5 6 minutes 0..59
6 7 seconds 0..60
(use 60 for leap-second)
7 8 deci-seconds 0..9
8 9 direction from UTC '+' / '-'
9 10 hours from UTC 0..11
10 11 minutes from UTC 0..59
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as:
1992-5-26,13:30:15.0,-4:0
Note that if only local time is known, then timezone information (fields 8-10) is not present. Local-only era, honestly kind of a vibe ๐.
SYNTAXโOCTET STRING (SIZE (8 | 11))
(8 when there's no timezone, 11 when there is โ we love a flexible octet string ๐)
๐ StorageType ::= TEXTUAL-CONVENTION ๐
STATUSโcurrentโจDESCRIPTIONโ "Describes the memory realization of a conceptual row. A row which isvolatile(2)is lost upon reboot. A row which is eithernonVolatile(3),permanent(4)orreadOnly(5), is backed up by stable storage. A row which ispermanent(4)can be changed but not deleted. A row which isreadOnly(5)cannot be changed nor deleted."
If the value of an object with this syntax is either permanent(4) or readOnly(5), it cannot be modified. Conversely, if the value is either other(1), volatile(2) or nonVolatile(3), it cannot be modified to be permanent(4) or readOnly(5).
And every usage of this textual convention is required to specify the columnar objects which a permanent(4) row must at a minimum allow to be writable. No skipping that, fr fr ๐
.
SYNTAXโ
SYNTAX INTEGER {
other(1), -- eh?
volatile(2), -- e.g., in RAM
nonVolatile(3), -- e.g., in NVRAM
permanent(4), -- e.g., partially in ROM
readOnly(5) -- e.g., completely in ROM
}
(the -- eh? on other(1) is in the original and honestly? mood. ๐)
๐ TDomain ::= TEXTUAL-CONVENTION ๐
STATUSโcurrentโจDESCRIPTIONโ "Denotes a kind of transport service."
Some possible values, such as snmpUDPDomain, are defined in 'Transport Mappings for Version 2 of the Simple Network Management Protocol (SNMPv2)'.
SYNTAXโOBJECT IDENTIFIER
๐ง TAddress ::= TEXTUAL-CONVENTION ๐ง
STATUSโcurrentโจDESCRIPTIONโ "Denotes a transport service address."
For snmpUDPDomain, a TAddress is 6 octets long, the initial 4 octets containing the IP-address in network-byte order and the last 2 containing the UDP port in network-byte order. Consult 'Transport Mappings for Version 2 of the Simple Network Management Protocol (SNMPv2)' for further information on snmpUDPDomain.
SYNTAXโOCTET STRING (SIZE (1..255))
And that, bestie, closes the module:
END
END ๐ the most satisfying line in the whole ASN.1 game. Three parts, one page, every last textual convention accounted for, no notes, we ate. ๐ โจ
This whole thing came courtesy of the Erlang/OTP crew, chilling in section SNMP, page SNMPv2-TC(7) โ so if your config is giving immaculate, thank them ๐ซถ. Now go set some status columns responsibly. destroy(6) when you mean it, okay? ๐๏ธ๐
๐ฆ 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