This is a summary of information regarding objects below the netSnmpExamples MIB object, which is defined within the NET-SNMP-EXAMPLES-MIB MIB document as .1.3.6.1.4.1.8072.2.
| Name | Type | Access | OID | Description |
|---|---|---|---|---|
|
1
netSnmpExampleInteger | INTEGER32 | ReadWrite | .1.3.6.1.4.1.8072.2.1.1 |
This is a simple object which merely houses a writable integer. It's only purposes is to hold the value of a single integer. Writing to it will simply change the value for subsequent GET/GETNEXT/GETBULK retrievals. This example object is implemented in the agent/mibgroup/examples/scalar_int.c file. |
|
2
netSnmpExampleSleeper | INTEGER32 | ReadWrite | .1.3.6.1.4.1.8072.2.1.2 |
This is a simple object which is a basic integer. It's value indicates the number of seconds that the agent will take in responding to requests of this object. This is implemented in a way which will allow the agent to keep responding to other requests while access to this object is blocked. It is writable, and changing it's value will change the amount of time the agent will effectively wait for before returning a response when this object is manipulated. Note that SET requests through this object will take longer, since the delay is applied to each internal transaction phase, which could result in delays of up to 4 times the value of this object. This example object is implemented in the agent/mibgroup/examples/delayed_instance.c file. |
|
3
netSnmpExampleString |
OCTETSTR
Legal Lengths: 0 .. 255 SnmpAdminString | ReadWrite | .1.3.6.1.4.1.8072.2.1.3 |
Note: this object is based on the SnmpAdminString TEXTUAL-CONVENTION. This is a simple object which merely houses a writable string. It's only purposes is to hold the value of a single string. Writing to it will simply change the value for subsequent GET/GETNEXT/GETBULK retrievals. This example object is implemented in the agent/mibgroup/examples/watched.c file. |
| Name | Type | Access | Description |
|---|---|---|---|
|
1
nsIETFWGName |
OCTETSTR
Legal Lengths: 1 .. 32 | NoAccess |
The name of the IETF Working Group this table describes. |
| Name | Type | Access | Description |
|---|---|---|---|
|
1
netSnmpHostName |
OCTETSTR
Legal Lengths: 0 .. 64 | NoAccess |
A host name that exists in the /etc/hosts (unix) file. |
| Name | Type | Access | Description |
|---|---|---|---|
|
2
netSnmpHostAddressType |
INTEGER
InetAddressType (ENUM list below) | Create |
Note: this object is based on the InetAddressType TEXTUAL-CONVENTION. The address type of then given host. |
|
3
netSnmpHostAddress |
OCTETSTR
Legal Lengths: 0 .. 255 InetAddress | Create |
Note: this object is based on the InetAddress TEXTUAL-CONVENTION. The address of then given host. |
|
4
netSnmpHostStorage |
INTEGER
StorageType (ENUM list below) | Create |
Note: this object is based on the StorageType TEXTUAL-CONVENTION. The storage type for this conceptual row. |
|
5
netSnmpHostRowStatus |
INTEGER
RowStatus (ENUM list below) | Create |
Note: this object is based on the RowStatus TEXTUAL-CONVENTION. The status of this conceptual row. |
SCALAR OBJECTS
TABLE OBJECTS |
| Notification Name | netSnmpExampleHeartbeatNotification | |
| In MIB | NET-SNMP-EXAMPLES-MIB | |
| Registered at OID | .1.3.6.1.4.1.8072.2.3.0.1 | |
| Notification Description |
An example notification, used to illustrate the
definition and generation of trap and inform PDUs
(including the use of both standard and additional
varbinds in the notification payload).
This notification will typically be sent every
30 seconds, using the code found in the example module
agent/mibgroup/examples/notification.c
|
|
| Mandatory Objects |
|
These TEXTUAL-CONVENTIONS are used in other parts of the document above. They are SNMP's way of defining a datatype that is used repeatedly by other MIB objects. Any implementation implementing objects that use one of these definitions must follow its DESCRIPTION clause as well as the DESCRIPTION clause of the object itself.
| Name | Type | Description | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| StorageType | INTEGER
| Describes the memory realization of a conceptual row. A row which is volatile(2) is lost upon reboot. A row which is either nonVolatile(3), permanent(4) or readOnly(5), is backed up by stable storage. A row which is permanent(4) can be changed but not deleted. A row which is readOnly(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 written. Conversely, if the value is either other(1), volatile(2) or nonVolatile(3), it cannot be modified to be permanent(4) or readOnly(5). (All illegal modifications result in a 'wrongValue' error.) 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. | ||||||||||||||
| InetAddress | OCTETSTR | Denotes a generic Internet address.
An InetAddress value is always interpreted within the context
of an InetAddressType value. Every usage of the InetAddress
textual convention is required to specify the InetAddressType
object that provides the context. It is suggested that the
InetAddressType object be logically registered before the
object(s) that use the InetAddress textual convention, if
they appear in the same logical row.
The value of an InetAddress object must always be
consistent with the value of the associated InetAddressType
object. Attempts to set an InetAddress object to a value
inconsistent with the associated InetAddressType
must fail with an inconsistentValue error.
When this textual convention is used as the syntax of an
index object, there may be issues with the limit of 128
sub-identifiers specified in SMIv2, STD 58. In this case,
the object definition MUST include a 'SIZE' clause to
limit the number of potential instance sub-identifiers;
otherwise the applicable constraints MUST be stated in
the appropriate conceptual row DESCRIPTION clauses, or
in the surrounding documentation if there is no single
DESCRIPTION clause that is appropriate. | ||||||||||||||
| InetAddressType | INTEGER
| A value that represents a type of Internet address.
unknown(0) An unknown address type. This value MUST
be used if the value of the corresponding
InetAddress object is a zero-length string.
It may also be used to indicate an IP address
that is not in one of the formats defined
below.
ipv4(1) An IPv4 address as defined by the
InetAddressIPv4 textual convention.
ipv6(2) An IPv6 address as defined by the
InetAddressIPv6 textual convention.
ipv4z(3) A non-global IPv4 address including a zone
index as defined by the InetAddressIPv4z
textual convention.
ipv6z(4) A non-global IPv6 address including a zone
index as defined by the InetAddressIPv6z
textual convention.
dns(16) A DNS domain name as defined by the
InetAddressDNS textual convention.
Each definition of a concrete InetAddressType value must be
accompanied by a definition of a textual convention for use
with that InetAddressType.
To support future extensions, the InetAddressType textual
convention SHOULD NOT be sub-typed in object type definitions.
It MAY be sub-typed in compliance statements in order to
require only a subset of these address types for a compliant
implementation.
Implementations must ensure that InetAddressType objects
and any dependent objects (e.g., InetAddress objects) are
consistent. An inconsistentValue error must be generated
if an attempt to change an InetAddressType object would,
for example, lead to an undefined InetAddress value. In
particular, InetAddressType/InetAddress pairs must be
changed together if the address type changes (e.g., from
ipv6(2) to ipv4(1)). | ||||||||||||||
| RowStatus | INTEGER
| 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); 'notInService' has
no implication regarding the internal consistency of
the row, availability of resources, or consistency with
the current state of the managed device;
- `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 (i.e., one or more required columns in
the conceptual row have not been instanciated);
- `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 attempt 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 | ||||||||||||||
| SnmpAdminString | OCTETSTR | An octet string containing administrative
information, preferably in human-readable form.
To facilitate internationalization, this
information is represented using the ISO/IEC
IS 10646-1 character set, encoded as an octet
string using the UTF-8 transformation format
described in [RFC2279].
Since additional code points are added by
amendments to the 10646 standard from time
to time, implementations must be prepared to
encounter any code point from 0x00000000 to
0x7fffffff. Byte sequences that do not
correspond to the valid UTF-8 encoding of a
code point or are outside this range are
prohibited.
The use of control codes should be avoided.
When it is necessary to represent a newline,
the control code sequence CR LF should be used.
The use of leading or trailing white space should
be avoided.
For code points not directly supported by user
interface hardware or software, an alternative
means of entry and display, such as hexadecimal,
may be provided.
For information encoded in 7-bit US-ASCII,
the UTF-8 encoding is identical to the
US-ASCII encoding.
UTF-8 may require multiple bytes to represent a
single character / code point; thus the length
of this object in octets may be different from
the number of characters encoded. Similarly,
size constraints refer to the number of encoded
octets, not the number of characters represented
by an encoding.
Note that when this TC is used for an object that
is used or envisioned to be used as an index, then
a SIZE restriction MUST be specified so that the
number of sub-identifiers for any object instance
does not exceed the limit of 128, as defined by
[RFC3416].
Note that the size of an SnmpAdminString object is
measured in octets, not characters.
|
Tree view generated by running: snmptranslate -Tp NET-SNMP-EXAMPLES-MIB::netSnmpExamples
+--netSnmpExamples(2) | +--netSnmpExampleScalars(1) | | | +-- -RW- Integer32 netSnmpExampleInteger(1) | +-- -RW- Integer32 netSnmpExampleSleeper(2) | +-- -RW- String netSnmpExampleString(3) | Textual Convention: SnmpAdminString | Size: 0..255 | +--netSnmpExampleTables(2) | | | +--netSnmpIETFWGTable(1) | | | | | +--netSnmpIETFWGEntry(1) | | | Index: nsIETFWGName | | | | | +-- ---- String nsIETFWGName(1) | | | Size: 1..32 | | +-- CR-- String nsIETFWGChair1(2) | | +-- CR-- String nsIETFWGChair2(3) | | | +--netSnmpHostsTable(2) | | | +--netSnmpHostsEntry(1) | | Index: netSnmpHostName | | | +-- ---- String netSnmpHostName(1) | | Size: 0..64 | +-- CR-- EnumVal netSnmpHostAddressType(2) | | Textual Convention: InetAddressType | | Values: unknown(0), ipv4(1), ipv6(2), ipv4z(3), ipv6z(4), dns(16) | +-- CR-- String netSnmpHostAddress(3) | | Textual Convention: InetAddress | | Size: 0..255 | +-- CR-- EnumVal netSnmpHostStorage(4) | | Textual Convention: StorageType | | Values: other(1), volatile(2), nonVolatile(3), permanent(4), readOnly(5) | +-- CR-- EnumVal netSnmpHostRowStatus(5) | Textual Convention: RowStatus | Values: active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6) | +--netSnmpExampleNotifications(3) | +--netSnmpExampleNotificationPrefix(0) | | | +--netSnmpExampleHeartbeatNotification(1) | +-- ---N String netSnmpExampleNotification(1) | Textual Convention: SnmpAdminString | Size: 0..255 | +--netSnmpExampleNotificationObjects(2) | +-- ---N Integer32 netSnmpExampleHeartbeatRate(1) +-- ---N String netSnmpExampleHeartbeatName(2) Textual Convention: SnmpAdminString Size: 0..255
Last modified: Wednesday, 01-Aug-2018 04:41:28 UTC
For questions regarding web content and site functionality, please write to the net-snmp-users mail list.