Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
1467
internal/snmp/testdata/gosmi/bridgeMib
vendored
Normal file
1467
internal/snmp/testdata/gosmi/bridgeMib
vendored
Normal file
File diff suppressed because it is too large
Load diff
554
internal/snmp/testdata/gosmi/bridgeMibImports
vendored
Normal file
554
internal/snmp/testdata/gosmi/bridgeMibImports
vendored
Normal file
|
@ -0,0 +1,554 @@
|
|||
SNMPv2-SMI DEFINITIONS ::= BEGIN
|
||||
|
||||
-- the path to the root
|
||||
|
||||
org OBJECT IDENTIFIER ::= { iso 3 } -- "iso" = 1
|
||||
dod OBJECT IDENTIFIER ::= { org 6 }
|
||||
internet OBJECT IDENTIFIER ::= { dod 1 }
|
||||
|
||||
directory OBJECT IDENTIFIER ::= { internet 1 }
|
||||
|
||||
mgmt OBJECT IDENTIFIER ::= { internet 2 }
|
||||
mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
|
||||
transmission OBJECT IDENTIFIER ::= { mib-2 10 }
|
||||
|
||||
experimental OBJECT IDENTIFIER ::= { internet 3 }
|
||||
|
||||
private OBJECT IDENTIFIER ::= { internet 4 }
|
||||
enterprises OBJECT IDENTIFIER ::= { private 1 }
|
||||
|
||||
security OBJECT IDENTIFIER ::= { internet 5 }
|
||||
|
||||
snmpV2 OBJECT IDENTIFIER ::= { internet 6 }
|
||||
|
||||
-- transport domains
|
||||
snmpDomains OBJECT IDENTIFIER ::= { snmpV2 1 }
|
||||
|
||||
-- transport proxies
|
||||
snmpProxys OBJECT IDENTIFIER ::= { snmpV2 2 }
|
||||
|
||||
-- module identities
|
||||
snmpModules OBJECT IDENTIFIER ::= { snmpV2 3 }
|
||||
|
||||
-- Extended UTCTime, to allow dates with four-digit years
|
||||
-- (Note that this definition of ExtUTCTime is not to be IMPORTed
|
||||
-- by MIB modules.)
|
||||
ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
|
||||
-- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ
|
||||
|
||||
-- where: YY - last two digits of year (only years
|
||||
-- between 1900-1999)
|
||||
-- YYYY - last four digits of the year (any year)
|
||||
-- MM - month (01 through 12)
|
||||
-- DD - day of month (01 through 31)
|
||||
-- HH - hours (00 through 23)
|
||||
-- MM - minutes (00 through 59)
|
||||
-- Z - denotes GMT (the ASCII character Z)
|
||||
--
|
||||
-- For example, "9502192015Z" and "199502192015Z" represent
|
||||
-- 8:15pm GMT on 19 February 1995. Years after 1999 must use
|
||||
-- the four digit year format. Years 1900-1999 may use the
|
||||
-- two or four digit format.
|
||||
|
||||
-- definitions for information modules
|
||||
|
||||
MODULE-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"LAST-UPDATED" value(Update ExtUTCTime)
|
||||
"ORGANIZATION" Text
|
||||
"CONTACT-INFO" Text
|
||||
"DESCRIPTION" Text
|
||||
RevisionPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
RevisionPart ::=
|
||||
Revisions
|
||||
| empty
|
||||
Revisions ::=
|
||||
Revision
|
||||
| Revisions Revision
|
||||
Revision ::=
|
||||
"REVISION" value(Update ExtUTCTime)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
OBJECT-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- names of objects
|
||||
-- (Note that these definitions of ObjectName and NotificationName
|
||||
-- are not to be IMPORTed by MIB modules.)
|
||||
|
||||
ObjectName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
NotificationName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
-- syntax of objects
|
||||
|
||||
-- the "base types" defined here are:
|
||||
-- 3 built-in ASN.1 types: INTEGER, OCTET STRING, OBJECT IDENTIFIER
|
||||
-- 8 application-defined types: Integer32, IpAddress, Counter32,
|
||||
-- Gauge32, Unsigned32, TimeTicks, Opaque, and Counter64
|
||||
|
||||
ObjectSyntax ::=
|
||||
CHOICE {
|
||||
simple
|
||||
SimpleSyntax,
|
||||
-- note that SEQUENCEs for conceptual tables and
|
||||
-- rows are not mentioned here...
|
||||
|
||||
application-wide
|
||||
ApplicationSyntax
|
||||
}
|
||||
|
||||
-- built-in ASN.1 types
|
||||
|
||||
SimpleSyntax ::=
|
||||
CHOICE {
|
||||
-- INTEGERs with a more restrictive range
|
||||
-- may also be used
|
||||
integer-value -- includes Integer32
|
||||
INTEGER (-2147483648..2147483647),
|
||||
-- OCTET STRINGs with a more restrictive size
|
||||
-- may also be used
|
||||
string-value
|
||||
OCTET STRING (SIZE (0..65535)),
|
||||
objectID-value
|
||||
OBJECT IDENTIFIER
|
||||
}
|
||||
|
||||
-- indistinguishable from INTEGER, but never needs more than
|
||||
-- 32-bits for a two's complement representation
|
||||
Integer32 ::=
|
||||
INTEGER (-2147483648..2147483647)
|
||||
|
||||
-- application-wide types
|
||||
|
||||
ApplicationSyntax ::=
|
||||
CHOICE {
|
||||
ipAddress-value
|
||||
IpAddress,
|
||||
counter-value
|
||||
Counter32,
|
||||
timeticks-value
|
||||
TimeTicks,
|
||||
arbitrary-value
|
||||
Opaque,
|
||||
big-counter-value
|
||||
Counter64,
|
||||
unsigned-integer-value -- includes Gauge32
|
||||
Unsigned32
|
||||
}
|
||||
|
||||
-- in network-byte order
|
||||
|
||||
-- (this is a tagged type for historical reasons)
|
||||
IpAddress ::=
|
||||
[APPLICATION 0]
|
||||
IMPLICIT OCTET STRING (SIZE (4))
|
||||
|
||||
-- this wraps
|
||||
Counter32 ::=
|
||||
[APPLICATION 1]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- this doesn't wrap
|
||||
Gauge32 ::=
|
||||
[APPLICATION 2]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- an unsigned 32-bit quantity
|
||||
-- indistinguishable from Gauge32
|
||||
Unsigned32 ::=
|
||||
[APPLICATION 2]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- hundredths of seconds since an epoch
|
||||
TimeTicks ::=
|
||||
[APPLICATION 3]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- for backward-compatibility only
|
||||
Opaque ::=
|
||||
[APPLICATION 4]
|
||||
IMPLICIT OCTET STRING
|
||||
|
||||
-- for counters that wrap in less than one hour with only 32 bits
|
||||
Counter64 ::=
|
||||
[APPLICATION 6]
|
||||
IMPLICIT INTEGER (0..18446744073709551615)
|
||||
|
||||
-- definition for objects
|
||||
|
||||
OBJECT-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"SYNTAX" Syntax
|
||||
UnitsPart
|
||||
"MAX-ACCESS" Access
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
IndexPart
|
||||
DefValPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE ObjectName)
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement),
|
||||
-- a textual convention (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
UnitsPart ::=
|
||||
"UNITS" Text
|
||||
| empty
|
||||
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
IndexPart ::=
|
||||
"INDEX" "{" IndexTypes "}"
|
||||
| "AUGMENTS" "{" Entry "}"
|
||||
| empty
|
||||
IndexTypes ::=
|
||||
IndexType
|
||||
| IndexTypes "," IndexType
|
||||
IndexType ::=
|
||||
"IMPLIED" Index
|
||||
| Index
|
||||
|
||||
Index ::=
|
||||
-- use the SYNTAX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
Entry ::=
|
||||
-- use the INDEX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
|
||||
DefValPart ::= "DEFVAL" "{" Defvalue "}"
|
||||
| empty
|
||||
|
||||
Defvalue ::= -- must be valid for the type specified in
|
||||
-- SYNTAX clause of same OBJECT-TYPE macro
|
||||
value(ObjectSyntax)
|
||||
| "{" BitsValue "}"
|
||||
|
||||
BitsValue ::= BitNames
|
||||
| empty
|
||||
|
||||
BitNames ::= BitName
|
||||
| BitNames "," BitName
|
||||
|
||||
BitName ::= identifier
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- definitions for notifications
|
||||
|
||||
NOTIFICATION-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
ObjectsPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE NotificationName)
|
||||
|
||||
ObjectsPart ::=
|
||||
"OBJECTS" "{" Objects "}"
|
||||
| empty
|
||||
Objects ::=
|
||||
Object
|
||||
|
||||
| Objects "," Object
|
||||
Object ::=
|
||||
value(ObjectName)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- definitions of administrative identifiers
|
||||
|
||||
zeroDotZero OBJECT-IDENTITY
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A value used for null identifiers."
|
||||
::= { 0 0 }
|
||||
|
||||
|
||||
|
||||
TEXTUAL-CONVENTION MACRO ::=
|
||||
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
DisplayPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
"SYNTAX" Syntax
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE Syntax) -- adapted ASN.1
|
||||
|
||||
DisplayPart ::=
|
||||
"DISPLAY-HINT" Text
|
||||
| empty
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
END
|
||||
|
||||
MODULE-COMPLIANCE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
ModulePart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
ModulePart ::=
|
||||
Modules
|
||||
Modules ::=
|
||||
Module
|
||||
| Modules Module
|
||||
Module ::=
|
||||
-- name of module --
|
||||
"MODULE" ModuleName
|
||||
MandatoryPart
|
||||
CompliancePart
|
||||
|
||||
ModuleName ::=
|
||||
-- identifier must start with uppercase letter
|
||||
identifier ModuleIdentifier
|
||||
-- must not be empty unless contained
|
||||
-- in MIB Module
|
||||
| empty
|
||||
ModuleIdentifier ::=
|
||||
value(OBJECT IDENTIFIER)
|
||||
| empty
|
||||
|
||||
MandatoryPart ::=
|
||||
"MANDATORY-GROUPS" "{" Groups "}"
|
||||
| empty
|
||||
|
||||
Groups ::=
|
||||
|
||||
Group
|
||||
| Groups "," Group
|
||||
Group ::=
|
||||
value(OBJECT IDENTIFIER)
|
||||
|
||||
CompliancePart ::=
|
||||
Compliances
|
||||
| empty
|
||||
|
||||
Compliances ::=
|
||||
Compliance
|
||||
| Compliances Compliance
|
||||
Compliance ::=
|
||||
ComplianceGroup
|
||||
| Object
|
||||
|
||||
ComplianceGroup ::=
|
||||
"GROUP" value(OBJECT IDENTIFIER)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
Object ::=
|
||||
"OBJECT" value(ObjectName)
|
||||
SyntaxPart
|
||||
WriteSyntaxPart
|
||||
AccessPart
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- must be a refinement for object's SYNTAX clause
|
||||
SyntaxPart ::= "SYNTAX" Syntax
|
||||
| empty
|
||||
|
||||
-- must be a refinement for object's SYNTAX clause
|
||||
WriteSyntaxPart ::= "WRITE-SYNTAX" Syntax
|
||||
| empty
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement),
|
||||
-- a textual convention (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
AccessPart ::=
|
||||
"MIN-ACCESS" Access
|
||||
| empty
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
OBJECT-GROUP MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
ObjectsPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
ObjectsPart ::=
|
||||
"OBJECTS" "{" Objects "}"
|
||||
Objects ::=
|
||||
Object
|
||||
| Objects "," Object
|
||||
Object ::=
|
||||
|
||||
value(ObjectName)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
InterfaceIndex ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A unique value, greater than zero, for each interface or
|
||||
interface sub-layer in the managed system. It is
|
||||
recommended that values are assigned contiguously starting
|
||||
from 1. The value for each interface sub-layer must remain
|
||||
constant at least from one re-initialization of the entity's
|
||||
network management system to the next re-initialization."
|
||||
SYNTAX Integer32 (1..2147483647)
|
||||
|
||||
|
||||
|
||||
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))
|
||||
|
||||
END
|
30
internal/snmp/testdata/gosmi/foo
vendored
Normal file
30
internal/snmp/testdata/gosmi/foo
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
FOOTEST-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Integer32 FROM fooImports;
|
||||
|
||||
fooTestMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "2021090800Z"
|
||||
ORGANIZATION "influx"
|
||||
CONTACT-INFO
|
||||
"EMail: influx@email.com"
|
||||
DESCRIPTION
|
||||
"MIB module for testing snmp plugin
|
||||
for telegraf
|
||||
"
|
||||
::= { iso 1 }
|
||||
|
||||
fooMIBObjects OBJECT IDENTIFIER ::= { iso 2 }
|
||||
fooOne OBJECT IDENTIFIER ::= { iso 1 }
|
||||
six OBJECT IDENTIFIER ::= { fooOne 1 }
|
||||
three OBJECT IDENTIFIER ::= { six 3 }
|
||||
|
||||
foo OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"foo mib for testing"
|
||||
::= { fooMIBObjects 3 }
|
||||
|
||||
END
|
169
internal/snmp/testdata/gosmi/fooImports
vendored
Normal file
169
internal/snmp/testdata/gosmi/fooImports
vendored
Normal file
|
@ -0,0 +1,169 @@
|
|||
fooImports DEFINITIONS ::= BEGIN
|
||||
|
||||
-- the path to the root
|
||||
|
||||
org OBJECT IDENTIFIER ::= { iso 1 } -- "iso" = 1
|
||||
dod OBJECT IDENTIFIER ::= { org 2 }
|
||||
internet OBJECT IDENTIFIER ::= { dod 3 }
|
||||
|
||||
ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
|
||||
-- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ
|
||||
|
||||
-- where: YY - last two digits of year (only years
|
||||
-- between 1900-1999)
|
||||
-- YYYY - last four digits of the year (any year)
|
||||
-- MM - month (01 through 12)
|
||||
-- DD - day of month (01 through 31)
|
||||
-- HH - hours (00 through 23)
|
||||
-- MM - minutes (00 through 59)
|
||||
-- Z - denotes GMT (the ASCII character Z)
|
||||
--
|
||||
-- For example, "9502192015Z" and "199502192015Z" represent
|
||||
-- 8:15pm GMT on 19 February 1995. Years after 1999 must use
|
||||
-- the four digit year format. Years 1900-1999 may use the
|
||||
-- two or four digit format.
|
||||
|
||||
-- definitions for information modules
|
||||
|
||||
MODULE-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"LAST-UPDATED" value(Update ExtUTCTime)
|
||||
"ORGANIZATION" Text
|
||||
"CONTACT-INFO" Text
|
||||
"DESCRIPTION" Text
|
||||
RevisionPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
RevisionPart ::=
|
||||
Revisions
|
||||
| empty
|
||||
Revisions ::=
|
||||
Revision
|
||||
| Revisions Revision
|
||||
Revision ::=
|
||||
"REVISION" value(Update ExtUTCTime)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
OBJECT-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- names of objects
|
||||
-- (Note that these definitions of ObjectName and NotificationName
|
||||
-- are not to be IMPORTed by MIB modules.)
|
||||
|
||||
ObjectName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
NotificationName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
|
||||
-- indistinguishable from INTEGER, but never needs more than
|
||||
-- 32-bits for a two's complement representation
|
||||
Integer32 ::=
|
||||
INTEGER (-2147483648..2147483647)
|
||||
|
||||
|
||||
|
||||
-- definition for objects
|
||||
|
||||
OBJECT-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
UnitsPart
|
||||
"MAX-ACCESS" Access
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
IndexPart
|
||||
DefValPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE ObjectName)
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
UnitsPart ::=
|
||||
"UNITS" Text
|
||||
| empty
|
||||
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
IndexPart ::=
|
||||
"INDEX" "{" IndexTypes "}"
|
||||
| "AUGMENTS" "{" Entry "}"
|
||||
| empty
|
||||
IndexTypes ::=
|
||||
IndexType
|
||||
| IndexTypes "," IndexType
|
||||
IndexType ::=
|
||||
"IMPLIED" Index
|
||||
| Index
|
||||
|
||||
Entry ::=
|
||||
-- use the INDEX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
|
||||
DefValPart ::= "DEFVAL" "{" Defvalue "}"
|
||||
| empty
|
||||
|
||||
BitsValue ::= BitNames
|
||||
| empty
|
||||
|
||||
BitNames ::= BitName
|
||||
| BitNames "," BitName
|
||||
|
||||
BitName ::= identifier
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
END
|
84
internal/snmp/testdata/gosmi/ifPhysAddress
vendored
Normal file
84
internal/snmp/testdata/gosmi/ifPhysAddress
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
IF-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Integer32, mib-2,
|
||||
PhysAddress FROM ifPhysAddressImports;
|
||||
|
||||
ifMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "200006140000Z"
|
||||
ORGANIZATION "IETF Interfaces MIB Working Group"
|
||||
CONTACT-INFO
|
||||
" Keith McCloghrie
|
||||
Cisco Systems, Inc.
|
||||
170 West Tasman Drive
|
||||
San Jose, CA 95134-1706
|
||||
US
|
||||
|
||||
408-526-5260
|
||||
kzm@cisco.com"
|
||||
DESCRIPTION
|
||||
"The MIB module to describe generic objects for network
|
||||
interface sub-layers. This MIB is an updated version of
|
||||
MIB-II's ifTable, and incorporates the extensions defined in
|
||||
RFC 1229."
|
||||
|
||||
REVISION "200006140000Z"
|
||||
DESCRIPTION
|
||||
"Clarifications agreed upon by the Interfaces MIB WG, and
|
||||
published as RFC 2863."
|
||||
REVISION "199602282155Z"
|
||||
DESCRIPTION
|
||||
"Revisions made by the Interfaces MIB WG, and published in
|
||||
RFC 2233."
|
||||
REVISION "199311082155Z"
|
||||
DESCRIPTION
|
||||
"Initial revision, published as part of RFC 1573."
|
||||
::= { mib-2 31 }
|
||||
|
||||
ifMIBObjects OBJECT IDENTIFIER ::= { ifMIB 1 }
|
||||
|
||||
interfaces OBJECT IDENTIFIER ::= { mib-2 2 }
|
||||
|
||||
|
||||
ifTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF IfEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of interface entries. The number of entries is
|
||||
given by the value of ifNumber."
|
||||
::= { interfaces 2 }
|
||||
|
||||
ifEntry OBJECT-TYPE
|
||||
SYNTAX IfEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry containing management information applicable to a
|
||||
particular interface."
|
||||
INDEX { ifIndex }
|
||||
::= { ifTable 1 }
|
||||
|
||||
|
||||
|
||||
ifPhysAddress OBJECT-TYPE
|
||||
SYNTAX PhysAddress
|
||||
ACCESS read-only
|
||||
STATUS mandatory
|
||||
DESCRIPTION
|
||||
"The interface's address at the protocol layer
|
||||
immediately `below' the network layer in the
|
||||
protocol stack. For interfaces which do not have
|
||||
such an address (e.g., a serial line), this object
|
||||
should contain an octet string of zero length."
|
||||
::= { ifEntry 6 }
|
||||
|
||||
foo OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"foo mib for testing"
|
||||
::= { ifEntry 9 }
|
||||
|
||||
END
|
254
internal/snmp/testdata/gosmi/ifPhysAddressImports
vendored
Normal file
254
internal/snmp/testdata/gosmi/ifPhysAddressImports
vendored
Normal file
|
@ -0,0 +1,254 @@
|
|||
SNMPv2-SMI DEFINITIONS ::= BEGIN
|
||||
|
||||
-- the path to the root
|
||||
|
||||
org OBJECT IDENTIFIER ::= { iso 3 } -- "iso" = 1
|
||||
dod OBJECT IDENTIFIER ::= { org 6 }
|
||||
internet OBJECT IDENTIFIER ::= { dod 1 }
|
||||
|
||||
directory OBJECT IDENTIFIER ::= { internet 1 }
|
||||
|
||||
mgmt OBJECT IDENTIFIER ::= { internet 2 }
|
||||
mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
|
||||
transmission OBJECT IDENTIFIER ::= { mib-2 10 }
|
||||
|
||||
experimental OBJECT IDENTIFIER ::= { internet 3 }
|
||||
|
||||
private OBJECT IDENTIFIER ::= { internet 4 }
|
||||
enterprises OBJECT IDENTIFIER ::= { private 1 }
|
||||
|
||||
security OBJECT IDENTIFIER ::= { internet 5 }
|
||||
|
||||
snmpV2 OBJECT IDENTIFIER ::= { internet 6 }
|
||||
|
||||
-- transport domains
|
||||
snmpDomains OBJECT IDENTIFIER ::= { snmpV2 1 }
|
||||
|
||||
-- transport proxies
|
||||
snmpProxys OBJECT IDENTIFIER ::= { snmpV2 2 }
|
||||
|
||||
-- module identities
|
||||
snmpModules OBJECT IDENTIFIER ::= { snmpV2 3 }
|
||||
|
||||
-- Extended UTCTime, to allow dates with four-digit years
|
||||
-- (Note that this definition of ExtUTCTime is not to be IMPORTed
|
||||
-- by MIB modules.)
|
||||
ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
|
||||
-- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ
|
||||
|
||||
-- where: YY - last two digits of year (only years
|
||||
-- between 1900-1999)
|
||||
-- YYYY - last four digits of the year (any year)
|
||||
-- MM - month (01 through 12)
|
||||
-- DD - day of month (01 through 31)
|
||||
-- HH - hours (00 through 23)
|
||||
-- MM - minutes (00 through 59)
|
||||
-- Z - denotes GMT (the ASCII character Z)
|
||||
--
|
||||
-- For example, "9502192015Z" and "199502192015Z" represent
|
||||
-- 8:15pm GMT on 19 February 1995. Years after 1999 must use
|
||||
-- the four digit year format. Years 1900-1999 may use the
|
||||
-- two or four digit format.
|
||||
|
||||
-- definitions for information modules
|
||||
|
||||
MODULE-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"LAST-UPDATED" value(Update ExtUTCTime)
|
||||
"ORGANIZATION" Text
|
||||
"CONTACT-INFO" Text
|
||||
"DESCRIPTION" Text
|
||||
RevisionPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
RevisionPart ::=
|
||||
Revisions
|
||||
| empty
|
||||
Revisions ::=
|
||||
Revision
|
||||
| Revisions Revision
|
||||
Revision ::=
|
||||
"REVISION" value(Update ExtUTCTime)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
OBJECT-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- names of objects
|
||||
-- (Note that these definitions of ObjectName and NotificationName
|
||||
-- are not to be IMPORTed by MIB modules.)
|
||||
|
||||
ObjectName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
NotificationName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
-- syntax of objects
|
||||
|
||||
-- the "base types" defined here are:
|
||||
-- 3 built-in ASN.1 types: INTEGER, OCTET STRING, OBJECT IDENTIFIER
|
||||
-- 8 application-defined types: Integer32, IpAddress, Counter32,
|
||||
-- Gauge32, Unsigned32, TimeTicks, Opaque, and Counter64
|
||||
|
||||
ObjectSyntax ::=
|
||||
CHOICE {
|
||||
simple
|
||||
SimpleSyntax,
|
||||
-- note that SEQUENCEs for conceptual tables and
|
||||
-- rows are not mentioned here...
|
||||
|
||||
application-wide
|
||||
ApplicationSyntax
|
||||
}
|
||||
|
||||
-- built-in ASN.1 types
|
||||
|
||||
SimpleSyntax ::=
|
||||
CHOICE {
|
||||
-- INTEGERs with a more restrictive range
|
||||
-- may also be used
|
||||
integer-value -- includes Integer32
|
||||
INTEGER (-2147483648..2147483647),
|
||||
-- OCTET STRINGs with a more restrictive size
|
||||
-- may also be used
|
||||
string-value
|
||||
OCTET STRING (SIZE (0..65535)),
|
||||
objectID-value
|
||||
OBJECT IDENTIFIER
|
||||
}
|
||||
|
||||
-- indistinguishable from INTEGER, but never needs more than
|
||||
-- 32-bits for a two's complement representation
|
||||
Integer32 ::=
|
||||
INTEGER (-2147483648..2147483647)
|
||||
|
||||
|
||||
|
||||
-- definition for objects
|
||||
|
||||
OBJECT-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"SYNTAX" Syntax
|
||||
UnitsPart
|
||||
"MAX-ACCESS" Access
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
IndexPart
|
||||
DefValPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE ObjectName)
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement),
|
||||
-- a textual convention (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
UnitsPart ::=
|
||||
"UNITS" Text
|
||||
| empty
|
||||
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
IndexPart ::=
|
||||
"INDEX" "{" IndexTypes "}"
|
||||
| "AUGMENTS" "{" Entry "}"
|
||||
| empty
|
||||
IndexTypes ::=
|
||||
IndexType
|
||||
| IndexTypes "," IndexType
|
||||
IndexType ::=
|
||||
"IMPLIED" Index
|
||||
| Index
|
||||
|
||||
Index ::=
|
||||
-- use the SYNTAX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
Entry ::=
|
||||
-- use the INDEX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
|
||||
DefValPart ::= "DEFVAL" "{" Defvalue "}"
|
||||
| empty
|
||||
|
||||
Defvalue ::= -- must be valid for the type specified in
|
||||
-- SYNTAX clause of same OBJECT-TYPE macro
|
||||
value(ObjectSyntax)
|
||||
| "{" BitsValue "}"
|
||||
|
||||
BitsValue ::= BitNames
|
||||
| empty
|
||||
|
||||
BitNames ::= BitName
|
||||
| BitNames "," BitName
|
||||
|
||||
BitName ::= identifier
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
PhysAddress ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "1x:"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents media- or physical-level addresses."
|
||||
SYNTAX OCTET STRING
|
||||
|
||||
|
||||
END
|
98
internal/snmp/testdata/gosmi/server
vendored
Normal file
98
internal/snmp/testdata/gosmi/server
vendored
Normal file
|
@ -0,0 +1,98 @@
|
|||
TEST DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Integer32 FROM fooImports;
|
||||
|
||||
TestMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "2021090800Z"
|
||||
ORGANIZATION "influx"
|
||||
CONTACT-INFO
|
||||
"EMail: influx@email.com"
|
||||
DESCRIPTION
|
||||
"MIB module for testing snmp plugin
|
||||
for telegraf
|
||||
"
|
||||
::= { iso 1 }
|
||||
|
||||
DateAndTime ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A date-time specification.
|
||||
|
||||
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..13
|
||||
10 11 minutes from UTC 0..59
|
||||
|
||||
* Notes:
|
||||
- the value of year is in network-byte order
|
||||
- daylight saving time in New Zealand is +13
|
||||
|
||||
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."
|
||||
SYNTAX OCTET STRING (SIZE (8 | 11))
|
||||
|
||||
testingObjects OBJECT IDENTIFIER ::= { iso 0 }
|
||||
testObjects OBJECT IDENTIFIER ::= { testingObjects 0 }
|
||||
hostnameone OBJECT IDENTIFIER ::= {testObjects 1 }
|
||||
hostname OBJECT IDENTIFIER ::= { hostnameone 1 }
|
||||
testTable OBJECT IDENTIFIER ::= { testObjects 0 }
|
||||
testMIBObjects OBJECT IDENTIFIER ::= { testTable 1 }
|
||||
|
||||
|
||||
server OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"server mib for testing"
|
||||
::= { testMIBObjects 1 }
|
||||
|
||||
connections OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"server mib for testing"
|
||||
::= { testMIBObjects 2 }
|
||||
|
||||
latency OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"server mib for testing"
|
||||
::= { testMIBObjects 3 }
|
||||
|
||||
description OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"server mib for testing"
|
||||
::= { testMIBObjects 4 }
|
||||
|
||||
dateAndTime OBJECT-TYPE
|
||||
SYNTAX DateAndTime
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A date-time specification."
|
||||
::= { testMIBObjects 5 }
|
||||
|
||||
END
|
174
internal/snmp/testdata/gosmi/serverImports
vendored
Normal file
174
internal/snmp/testdata/gosmi/serverImports
vendored
Normal file
|
@ -0,0 +1,174 @@
|
|||
fooImports DEFINITIONS ::= BEGIN
|
||||
|
||||
-- the path to the root
|
||||
|
||||
org OBJECT IDENTIFIER ::= { iso 1 } -- "iso" = 1
|
||||
dod OBJECT IDENTIFIER ::= { org 1 }
|
||||
internet OBJECT IDENTIFIER ::= { dod 1 }
|
||||
|
||||
directory OBJECT IDENTIFIER ::= { internet 1 }
|
||||
|
||||
mgmt OBJECT IDENTIFIER ::= { internet 1 }
|
||||
mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
|
||||
|
||||
ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
|
||||
-- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ
|
||||
|
||||
-- where: YY - last two digits of year (only years
|
||||
-- between 1900-1999)
|
||||
-- YYYY - last four digits of the year (any year)
|
||||
-- MM - month (01 through 12)
|
||||
-- DD - day of month (01 through 31)
|
||||
-- HH - hours (00 through 23)
|
||||
-- MM - minutes (00 through 59)
|
||||
-- Z - denotes GMT (the ASCII character Z)
|
||||
--
|
||||
-- For example, "9502192015Z" and "199502192015Z" represent
|
||||
-- 8:15pm GMT on 19 February 1995. Years after 1999 must use
|
||||
-- the four digit year format. Years 1900-1999 may use the
|
||||
-- two or four digit format.
|
||||
|
||||
-- definitions for information modules
|
||||
|
||||
MODULE-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"LAST-UPDATED" value(Update ExtUTCTime)
|
||||
"ORGANIZATION" Text
|
||||
"CONTACT-INFO" Text
|
||||
"DESCRIPTION" Text
|
||||
RevisionPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
RevisionPart ::=
|
||||
Revisions
|
||||
| empty
|
||||
Revisions ::=
|
||||
Revision
|
||||
| Revisions Revision
|
||||
Revision ::=
|
||||
"REVISION" value(Update ExtUTCTime)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
OBJECT-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- names of objects
|
||||
-- (Note that these definitions of ObjectName and NotificationName
|
||||
-- are not to be IMPORTed by MIB modules.)
|
||||
|
||||
ObjectName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
NotificationName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
|
||||
-- indistinguishable from INTEGER, but never needs more than
|
||||
-- 32-bits for a two's complement representation
|
||||
Integer32 ::=
|
||||
INTEGER (-2147483648..2147483647)
|
||||
|
||||
|
||||
|
||||
-- definition for objects
|
||||
|
||||
OBJECT-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
UnitsPart
|
||||
"MAX-ACCESS" Access
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
IndexPart
|
||||
DefValPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE ObjectName)
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
UnitsPart ::=
|
||||
"UNITS" Text
|
||||
| empty
|
||||
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
IndexPart ::=
|
||||
"INDEX" "{" IndexTypes "}"
|
||||
| "AUGMENTS" "{" Entry "}"
|
||||
| empty
|
||||
IndexTypes ::=
|
||||
IndexType
|
||||
| IndexTypes "," IndexType
|
||||
IndexType ::=
|
||||
"IMPLIED" Index
|
||||
| Index
|
||||
|
||||
Entry ::=
|
||||
-- use the INDEX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
|
||||
DefValPart ::= "DEFVAL" "{" Defvalue "}"
|
||||
| empty
|
||||
|
||||
BitsValue ::= BitNames
|
||||
| empty
|
||||
|
||||
BitNames ::= BitName
|
||||
| BitNames "," BitName
|
||||
|
||||
BitName ::= identifier
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
END
|
57
internal/snmp/testdata/gosmi/tableBuild
vendored
Normal file
57
internal/snmp/testdata/gosmi/tableBuild
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
TEST DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Integer32 FROM fooImports;
|
||||
|
||||
TestMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "2021090800Z"
|
||||
ORGANIZATION "influx"
|
||||
CONTACT-INFO
|
||||
"EMail: influx@email.com"
|
||||
DESCRIPTION
|
||||
"MIB module for testing snmp plugin
|
||||
for telegraf
|
||||
"
|
||||
::= { iso 1 }
|
||||
|
||||
testingObjects OBJECT IDENTIFIER ::= { iso 0 }
|
||||
testObjects OBJECT IDENTIFIER ::= { testingObjects 0 }
|
||||
hostnameone OBJECT IDENTIFIER ::= {testObjects 1 }
|
||||
hostname OBJECT IDENTIFIER ::= { hostnameone 1 }
|
||||
testTable OBJECT IDENTIFIER ::= { testObjects 0 }
|
||||
testMIBObjects OBJECT IDENTIFIER ::= { testTable 1 }
|
||||
|
||||
|
||||
myfield1 OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"server mib for testing"
|
||||
::= { testMIBObjects 1 }
|
||||
|
||||
myfield2 OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"server mib for testing"
|
||||
::= { testMIBObjects 2 }
|
||||
|
||||
myfield3 OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"server mib for testing"
|
||||
::= { testMIBObjects 3 }
|
||||
|
||||
myfield4 OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"server mib for testing"
|
||||
::= { testMIBObjects 4 }
|
||||
|
||||
END
|
2613
internal/snmp/testdata/gosmi/tableMib
vendored
Normal file
2613
internal/snmp/testdata/gosmi/tableMib
vendored
Normal file
File diff suppressed because it is too large
Load diff
119
internal/snmp/testdata/gosmi/tableMibImports
vendored
Normal file
119
internal/snmp/testdata/gosmi/tableMibImports
vendored
Normal file
|
@ -0,0 +1,119 @@
|
|||
RFC1155-SMI DEFINITIONS ::= BEGIN
|
||||
|
||||
EXPORTS -- EVERYTHING
|
||||
internet, directory, mgmt,
|
||||
experimental, private, enterprises,
|
||||
OBJECT-TYPE, ObjectName, ObjectSyntax, SimpleSyntax,
|
||||
ApplicationSyntax, NetworkAddress, IpAddress,
|
||||
Counter, Gauge, TimeTicks, Opaque;
|
||||
|
||||
-- the path to the root
|
||||
|
||||
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 }
|
||||
|
||||
-- definition of object types
|
||||
|
||||
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
|
||||
|
||||
-- names of objects in the MIB
|
||||
|
||||
ObjectName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
-- 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
|
||||
}
|
||||
|
||||
SimpleSyntax ::=
|
||||
CHOICE {
|
||||
number
|
||||
INTEGER,
|
||||
string
|
||||
OCTET STRING,
|
||||
object
|
||||
OBJECT IDENTIFIER,
|
||||
empty
|
||||
NULL
|
||||
}
|
||||
|
||||
ApplicationSyntax ::=
|
||||
CHOICE {
|
||||
address
|
||||
NetworkAddress,
|
||||
counter
|
||||
Counter,
|
||||
gauge
|
||||
Gauge,
|
||||
ticks
|
||||
TimeTicks,
|
||||
arbitrary
|
||||
Opaque
|
||||
|
||||
-- other application-wide types, as they are
|
||||
-- defined, will be added here
|
||||
}
|
||||
|
||||
-- application-wide types
|
||||
|
||||
NetworkAddress ::=
|
||||
CHOICE {
|
||||
internet
|
||||
IpAddress
|
||||
}
|
||||
|
||||
IpAddress ::=
|
||||
[APPLICATION 0] -- in network-byte order
|
||||
IMPLICIT OCTET STRING (SIZE (4))
|
||||
|
||||
Counter ::=
|
||||
[APPLICATION 1]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
Gauge ::=
|
||||
[APPLICATION 2]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
TimeTicks ::=
|
||||
[APPLICATION 3]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
Opaque ::=
|
||||
[APPLICATION 4] -- arbitrary ASN.1 value,
|
||||
IMPLICIT OCTET STRING -- "double-wrapped"
|
||||
|
||||
END
|
786
internal/snmp/testdata/gosmi/tcpMib
vendored
Normal file
786
internal/snmp/testdata/gosmi/tcpMib
vendored
Normal file
|
@ -0,0 +1,786 @@
|
|||
TCP-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Integer32, Unsigned32,
|
||||
Gauge32, Counter32, Counter64, IpAddress, mib-2,
|
||||
MODULE-COMPLIANCE, OBJECT-GROUP, InetAddress,
|
||||
InetAddressType, InetPortNumber
|
||||
FROM tcpMibImports;
|
||||
|
||||
|
||||
|
||||
tcpMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "200502180000Z" -- 18 February 2005
|
||||
ORGANIZATION
|
||||
"IETF IPv6 MIB Revision Team
|
||||
http://www.ietf.org/html.charters/ipv6-charter.html"
|
||||
CONTACT-INFO
|
||||
"Rajiv Raghunarayan (editor)
|
||||
|
||||
Cisco Systems Inc.
|
||||
170 West Tasman Drive
|
||||
San Jose, CA 95134
|
||||
|
||||
Phone: +1 408 853 9612
|
||||
Email: <raraghun@cisco.com>
|
||||
|
||||
Send comments to <ipv6@ietf.org>"
|
||||
DESCRIPTION
|
||||
"The MIB module for managing TCP implementations.
|
||||
|
||||
Copyright (C) The Internet Society (2005). This version
|
||||
of this MIB module is a part of RFC 4022; see the RFC
|
||||
itself for full legal notices."
|
||||
REVISION "200502180000Z" -- 18 February 2005
|
||||
DESCRIPTION
|
||||
"IP version neutral revision, published as RFC 4022."
|
||||
REVISION "9411010000Z"
|
||||
DESCRIPTION
|
||||
"Initial SMIv2 version, published as RFC 2012."
|
||||
REVISION "9103310000Z"
|
||||
DESCRIPTION
|
||||
"The initial revision of this MIB module was part of
|
||||
MIB-II."
|
||||
::= { mib-2 49 }
|
||||
|
||||
-- the TCP base variables group
|
||||
|
||||
tcp OBJECT IDENTIFIER ::= { mib-2 6 }
|
||||
|
||||
-- Scalars
|
||||
|
||||
tcpRtoAlgorithm OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
other(1), -- none of the following
|
||||
constant(2), -- a constant rto
|
||||
rsre(3), -- MIL-STD-1778, Appendix B
|
||||
vanj(4), -- Van Jacobson's algorithm
|
||||
rfc2988(5) -- RFC 2988
|
||||
}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The algorithm used to determine the timeout value used for
|
||||
retransmitting unacknowledged octets."
|
||||
::= { tcp 1 }
|
||||
|
||||
tcpRtoMin OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..2147483647)
|
||||
UNITS "milliseconds"
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The minimum value permitted by a TCP implementation for
|
||||
the retransmission timeout, measured in milliseconds.
|
||||
More refined semantics for objects of this type depend
|
||||
on the algorithm used to determine the retransmission
|
||||
timeout; in particular, the IETF standard algorithm
|
||||
rfc2988(5) provides a minimum value."
|
||||
::= { tcp 2 }
|
||||
|
||||
tcpRtoMax OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..2147483647)
|
||||
UNITS "milliseconds"
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The maximum value permitted by a TCP implementation for
|
||||
the retransmission timeout, measured in milliseconds.
|
||||
More refined semantics for objects of this type depend
|
||||
on the algorithm used to determine the retransmission
|
||||
timeout; in particular, the IETF standard algorithm
|
||||
rfc2988(5) provides an upper bound (as part of an
|
||||
adaptive backoff algorithm)."
|
||||
::= { tcp 3 }
|
||||
|
||||
tcpMaxConn OBJECT-TYPE
|
||||
SYNTAX Integer32 (-1 | 0..2147483647)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The limit on the total number of TCP connections the entity
|
||||
can support. In entities where the maximum number of
|
||||
connections is dynamic, this object should contain the
|
||||
value -1."
|
||||
::= { tcp 4 }
|
||||
|
||||
tcpActiveOpens OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of times that TCP connections have made a direct
|
||||
transition to the SYN-SENT state from the CLOSED state.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 5 }
|
||||
|
||||
tcpPassiveOpens OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of times TCP connections have made a direct
|
||||
transition to the SYN-RCVD state from the LISTEN state.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 6 }
|
||||
|
||||
tcpAttemptFails OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of times that TCP connections have made a direct
|
||||
transition to the CLOSED state from either the SYN-SENT
|
||||
state or the SYN-RCVD state, plus the number of times that
|
||||
TCP connections have made a direct transition to the
|
||||
LISTEN state from the SYN-RCVD state.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 7 }
|
||||
|
||||
tcpEstabResets OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of times that TCP connections have made a direct
|
||||
transition to the CLOSED state from either the ESTABLISHED
|
||||
state or the CLOSE-WAIT state.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 8 }
|
||||
|
||||
tcpCurrEstab OBJECT-TYPE
|
||||
SYNTAX Gauge32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of TCP connections for which the current state
|
||||
is either ESTABLISHED or CLOSE-WAIT."
|
||||
::= { tcp 9 }
|
||||
|
||||
tcpInSegs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments received, including those
|
||||
received in error. This count includes segments received
|
||||
on currently established connections.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 10 }
|
||||
|
||||
tcpOutSegs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments sent, including those on
|
||||
current connections but excluding those containing only
|
||||
retransmitted octets.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 11 }
|
||||
|
||||
tcpRetransSegs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments retransmitted; that is, the
|
||||
number of TCP segments transmitted containing one or more
|
||||
previously transmitted octets.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 12 }
|
||||
|
||||
tcpInErrs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments received in error (e.g., bad
|
||||
TCP checksums).
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 14 }
|
||||
|
||||
tcpOutRsts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of TCP segments sent containing the RST flag.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 15 }
|
||||
|
||||
-- { tcp 16 } was used to represent the ipv6TcpConnTable in RFC 2452,
|
||||
-- which has since been obsoleted. It MUST not be used.
|
||||
|
||||
tcpHCInSegs OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments received, including those
|
||||
received in error. This count includes segments received
|
||||
|
||||
on currently established connections. This object is
|
||||
the 64-bit equivalent of tcpInSegs.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 17 }
|
||||
|
||||
tcpHCOutSegs OBJECT-TYPE
|
||||
SYNTAX Counter64
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments sent, including those on
|
||||
current connections but excluding those containing only
|
||||
retransmitted octets. This object is the 64-bit
|
||||
equivalent of tcpOutSegs.
|
||||
|
||||
Discontinuities in the value of this counter are
|
||||
indicated via discontinuities in the value of sysUpTime."
|
||||
::= { tcp 18 }
|
||||
|
||||
-- The TCP Connection table
|
||||
|
||||
tcpConnectionTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF TcpConnectionEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table containing information about existing TCP
|
||||
connections. Note that unlike earlier TCP MIBs, there
|
||||
is a separate table for connections in the LISTEN state."
|
||||
::= { tcp 19 }
|
||||
|
||||
tcpConnectionEntry OBJECT-TYPE
|
||||
SYNTAX TcpConnectionEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A conceptual row of the tcpConnectionTable containing
|
||||
information about a particular current TCP connection.
|
||||
Each row of this table is transient in that it ceases to
|
||||
exist when (or soon after) the connection makes the
|
||||
transition to the CLOSED state."
|
||||
INDEX { tcpConnectionLocalAddressType,
|
||||
tcpConnectionLocalAddress,
|
||||
tcpConnectionLocalPort,
|
||||
tcpConnectionRemAddressType,
|
||||
tcpConnectionRemAddress,
|
||||
tcpConnectionRemPort }
|
||||
::= { tcpConnectionTable 1 }
|
||||
|
||||
TcpConnectionEntry ::= SEQUENCE {
|
||||
tcpConnectionLocalAddressType InetAddressType,
|
||||
tcpConnectionLocalAddress InetAddress,
|
||||
tcpConnectionLocalPort InetPortNumber,
|
||||
tcpConnectionRemAddressType InetAddressType,
|
||||
tcpConnectionRemAddress InetAddress,
|
||||
tcpConnectionRemPort InetPortNumber,
|
||||
tcpConnectionState INTEGER,
|
||||
tcpConnectionProcess Unsigned32
|
||||
}
|
||||
|
||||
tcpConnectionLocalAddressType OBJECT-TYPE
|
||||
SYNTAX InetAddressType
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The address type of tcpConnectionLocalAddress."
|
||||
::= { tcpConnectionEntry 1 }
|
||||
|
||||
tcpConnectionLocalAddress OBJECT-TYPE
|
||||
SYNTAX InetAddress
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The local IP address for this TCP connection. The type
|
||||
of this address is determined by the value of
|
||||
tcpConnectionLocalAddressType.
|
||||
|
||||
As this object is used in the index for the
|
||||
tcpConnectionTable, implementors should be
|
||||
careful not to create entries that would result in OIDs
|
||||
with more than 128 subidentifiers; otherwise the information
|
||||
cannot be accessed by using SNMPv1, SNMPv2c, or SNMPv3."
|
||||
::= { tcpConnectionEntry 2 }
|
||||
|
||||
tcpConnectionLocalPort OBJECT-TYPE
|
||||
SYNTAX InetPortNumber
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The local port number for this TCP connection."
|
||||
::= { tcpConnectionEntry 3 }
|
||||
|
||||
tcpConnectionRemAddressType OBJECT-TYPE
|
||||
SYNTAX InetAddressType
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The address type of tcpConnectionRemAddress."
|
||||
::= { tcpConnectionEntry 4 }
|
||||
|
||||
tcpConnectionRemAddress OBJECT-TYPE
|
||||
SYNTAX InetAddress
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The remote IP address for this TCP connection. The type
|
||||
of this address is determined by the value of
|
||||
tcpConnectionRemAddressType.
|
||||
|
||||
As this object is used in the index for the
|
||||
tcpConnectionTable, implementors should be
|
||||
careful not to create entries that would result in OIDs
|
||||
with more than 128 subidentifiers; otherwise the information
|
||||
cannot be accessed by using SNMPv1, SNMPv2c, or SNMPv3."
|
||||
::= { tcpConnectionEntry 5 }
|
||||
|
||||
tcpConnectionRemPort OBJECT-TYPE
|
||||
SYNTAX InetPortNumber
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The remote port number for this TCP connection."
|
||||
::= { tcpConnectionEntry 6 }
|
||||
|
||||
tcpConnectionState OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
closed(1),
|
||||
listen(2),
|
||||
synSent(3),
|
||||
synReceived(4),
|
||||
established(5),
|
||||
finWait1(6),
|
||||
finWait2(7),
|
||||
closeWait(8),
|
||||
lastAck(9),
|
||||
closing(10),
|
||||
timeWait(11),
|
||||
deleteTCB(12)
|
||||
}
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The state of this TCP connection.
|
||||
|
||||
The value listen(2) is included only for parallelism to the
|
||||
old tcpConnTable and should not be used. A connection in
|
||||
LISTEN state should be present in the tcpListenerTable.
|
||||
|
||||
The only value that may be set by a management station is
|
||||
deleteTCB(12). Accordingly, it is appropriate for an agent
|
||||
to return a `badValue' response if a management station
|
||||
attempts to set this object to any other value.
|
||||
|
||||
If a management station sets this object to the value
|
||||
deleteTCB(12), then the TCB (as defined in [RFC793]) of
|
||||
the corresponding connection on the managed node is
|
||||
deleted, resulting in immediate termination of the
|
||||
connection.
|
||||
|
||||
As an implementation-specific option, a RST segment may be
|
||||
sent from the managed node to the other TCP endpoint (note,
|
||||
however, that RST segments are not sent reliably)."
|
||||
::= { tcpConnectionEntry 7 }
|
||||
|
||||
tcpConnectionProcess OBJECT-TYPE
|
||||
SYNTAX Unsigned32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The system's process ID for the process associated with
|
||||
this connection, or zero if there is no such process. This
|
||||
value is expected to be the same as HOST-RESOURCES-MIB::
|
||||
hrSWRunIndex or SYSAPPL-MIB::sysApplElmtRunIndex for some
|
||||
row in the appropriate tables."
|
||||
::= { tcpConnectionEntry 8 }
|
||||
|
||||
-- The TCP Listener table
|
||||
|
||||
tcpListenerTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF TcpListenerEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table containing information about TCP listeners. A
|
||||
listening application can be represented in three
|
||||
possible ways:
|
||||
|
||||
1. An application that is willing to accept both IPv4 and
|
||||
IPv6 datagrams is represented by
|
||||
|
||||
a tcpListenerLocalAddressType of unknown (0) and
|
||||
a tcpListenerLocalAddress of ''h (a zero-length
|
||||
octet-string).
|
||||
|
||||
2. An application that is willing to accept only IPv4 or
|
||||
IPv6 datagrams is represented by a
|
||||
tcpListenerLocalAddressType of the appropriate address
|
||||
type and a tcpListenerLocalAddress of '0.0.0.0' or '::'
|
||||
respectively.
|
||||
|
||||
3. An application that is listening for data destined
|
||||
only to a specific IP address, but from any remote
|
||||
system, is represented by a tcpListenerLocalAddressType
|
||||
of an appropriate address type, with
|
||||
tcpListenerLocalAddress as the specific local address.
|
||||
|
||||
NOTE: The address type in this table represents the
|
||||
address type used for the communication, irrespective
|
||||
of the higher-layer abstraction. For example, an
|
||||
application using IPv6 'sockets' to communicate via
|
||||
IPv4 between ::ffff:10.0.0.1 and ::ffff:10.0.0.2 would
|
||||
use InetAddressType ipv4(1))."
|
||||
::= { tcp 20 }
|
||||
|
||||
tcpListenerEntry OBJECT-TYPE
|
||||
SYNTAX TcpListenerEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A conceptual row of the tcpListenerTable containing
|
||||
information about a particular TCP listener."
|
||||
INDEX { tcpListenerLocalAddressType,
|
||||
tcpListenerLocalAddress,
|
||||
tcpListenerLocalPort }
|
||||
::= { tcpListenerTable 1 }
|
||||
|
||||
TcpListenerEntry ::= SEQUENCE {
|
||||
tcpListenerLocalAddressType InetAddressType,
|
||||
tcpListenerLocalAddress InetAddress,
|
||||
tcpListenerLocalPort InetPortNumber,
|
||||
tcpListenerProcess Unsigned32
|
||||
}
|
||||
|
||||
tcpListenerLocalAddressType OBJECT-TYPE
|
||||
SYNTAX InetAddressType
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The address type of tcpListenerLocalAddress. The value
|
||||
should be unknown (0) if connection initiations to all
|
||||
local IP addresses are accepted."
|
||||
::= { tcpListenerEntry 1 }
|
||||
|
||||
tcpListenerLocalAddress OBJECT-TYPE
|
||||
SYNTAX InetAddress
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The local IP address for this TCP connection.
|
||||
|
||||
The value of this object can be represented in three
|
||||
possible ways, depending on the characteristics of the
|
||||
listening application:
|
||||
|
||||
1. For an application willing to accept both IPv4 and
|
||||
IPv6 datagrams, the value of this object must be
|
||||
''h (a zero-length octet-string), with the value
|
||||
of the corresponding tcpListenerLocalAddressType
|
||||
object being unknown (0).
|
||||
|
||||
2. For an application willing to accept only IPv4 or
|
||||
IPv6 datagrams, the value of this object must be
|
||||
'0.0.0.0' or '::' respectively, with
|
||||
tcpListenerLocalAddressType representing the
|
||||
appropriate address type.
|
||||
|
||||
3. For an application which is listening for data
|
||||
destined only to a specific IP address, the value
|
||||
of this object is the specific local address, with
|
||||
tcpListenerLocalAddressType representing the
|
||||
appropriate address type.
|
||||
|
||||
As this object is used in the index for the
|
||||
tcpListenerTable, implementors should be
|
||||
careful not to create entries that would result in OIDs
|
||||
with more than 128 subidentifiers; otherwise the information
|
||||
cannot be accessed, using SNMPv1, SNMPv2c, or SNMPv3."
|
||||
::= { tcpListenerEntry 2 }
|
||||
|
||||
tcpListenerLocalPort OBJECT-TYPE
|
||||
SYNTAX InetPortNumber
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The local port number for this TCP connection."
|
||||
::= { tcpListenerEntry 3 }
|
||||
|
||||
tcpListenerProcess OBJECT-TYPE
|
||||
SYNTAX Unsigned32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The system's process ID for the process associated with
|
||||
this listener, or zero if there is no such process. This
|
||||
value is expected to be the same as HOST-RESOURCES-MIB::
|
||||
hrSWRunIndex or SYSAPPL-MIB::sysApplElmtRunIndex for some
|
||||
row in the appropriate tables."
|
||||
::= { tcpListenerEntry 4 }
|
||||
|
||||
-- The deprecated TCP Connection table
|
||||
|
||||
tcpConnTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF TcpConnEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"A table containing information about existing IPv4-specific
|
||||
TCP connections or listeners. This table has been
|
||||
deprecated in favor of the version neutral
|
||||
tcpConnectionTable."
|
||||
::= { tcp 13 }
|
||||
|
||||
tcpConnEntry OBJECT-TYPE
|
||||
SYNTAX TcpConnEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"A conceptual row of the tcpConnTable containing information
|
||||
about a particular current IPv4 TCP connection. Each row
|
||||
of this table is transient in that it ceases to exist when
|
||||
(or soon after) the connection makes the transition to the
|
||||
CLOSED state."
|
||||
INDEX { tcpConnLocalAddress,
|
||||
tcpConnLocalPort,
|
||||
tcpConnRemAddress,
|
||||
tcpConnRemPort }
|
||||
::= { tcpConnTable 1 }
|
||||
|
||||
TcpConnEntry ::= SEQUENCE {
|
||||
tcpConnState INTEGER,
|
||||
tcpConnLocalAddress IpAddress,
|
||||
tcpConnLocalPort Integer32,
|
||||
tcpConnRemAddress IpAddress,
|
||||
tcpConnRemPort Integer32
|
||||
|
||||
}
|
||||
|
||||
tcpConnState OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
closed(1),
|
||||
listen(2),
|
||||
synSent(3),
|
||||
synReceived(4),
|
||||
established(5),
|
||||
finWait1(6),
|
||||
finWait2(7),
|
||||
closeWait(8),
|
||||
lastAck(9),
|
||||
closing(10),
|
||||
timeWait(11),
|
||||
deleteTCB(12)
|
||||
}
|
||||
MAX-ACCESS read-write
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"The state of this TCP connection.
|
||||
|
||||
The only value that may be set by a management station is
|
||||
deleteTCB(12). Accordingly, it is appropriate for an agent
|
||||
to return a `badValue' response if a management station
|
||||
attempts to set this object to any other value.
|
||||
|
||||
If a management station sets this object to the value
|
||||
deleteTCB(12), then the TCB (as defined in [RFC793]) of
|
||||
the corresponding connection on the managed node is
|
||||
deleted, resulting in immediate termination of the
|
||||
connection.
|
||||
|
||||
As an implementation-specific option, a RST segment may be
|
||||
sent from the managed node to the other TCP endpoint (note,
|
||||
however, that RST segments are not sent reliably)."
|
||||
::= { tcpConnEntry 1 }
|
||||
|
||||
tcpConnLocalAddress OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"The local IP address for this TCP connection. In the case
|
||||
of a connection in the listen state willing to
|
||||
accept connections for any IP interface associated with the
|
||||
node, the value 0.0.0.0 is used."
|
||||
::= { tcpConnEntry 2 }
|
||||
|
||||
tcpConnLocalPort OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..65535)
|
||||
MAX-ACCESS read-only
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"The local port number for this TCP connection."
|
||||
::= { tcpConnEntry 3 }
|
||||
|
||||
tcpConnRemAddress OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"The remote IP address for this TCP connection."
|
||||
::= { tcpConnEntry 4 }
|
||||
|
||||
tcpConnRemPort OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..65535)
|
||||
MAX-ACCESS read-only
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"The remote port number for this TCP connection."
|
||||
::= { tcpConnEntry 5 }
|
||||
|
||||
-- conformance information
|
||||
|
||||
tcpMIBConformance OBJECT IDENTIFIER ::= { tcpMIB 2 }
|
||||
|
||||
tcpMIBCompliances OBJECT IDENTIFIER ::= { tcpMIBConformance 1 }
|
||||
tcpMIBGroups OBJECT IDENTIFIER ::= { tcpMIBConformance 2 }
|
||||
|
||||
-- compliance statements
|
||||
|
||||
tcpMIBCompliance2 MODULE-COMPLIANCE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The compliance statement for systems that implement TCP.
|
||||
|
||||
A number of INDEX objects cannot be
|
||||
represented in the form of OBJECT clauses in SMIv2 but
|
||||
have the following compliance requirements,
|
||||
expressed in OBJECT clause form in this description
|
||||
clause:
|
||||
|
||||
-- OBJECT tcpConnectionLocalAddressType
|
||||
-- SYNTAX InetAddressType { ipv4(1), ipv6(2) }
|
||||
-- DESCRIPTION
|
||||
-- This MIB requires support for only global IPv4
|
||||
|
||||
-- and IPv6 address types.
|
||||
--
|
||||
-- OBJECT tcpConnectionRemAddressType
|
||||
-- SYNTAX InetAddressType { ipv4(1), ipv6(2) }
|
||||
-- DESCRIPTION
|
||||
-- This MIB requires support for only global IPv4
|
||||
-- and IPv6 address types.
|
||||
--
|
||||
-- OBJECT tcpListenerLocalAddressType
|
||||
-- SYNTAX InetAddressType { unknown(0), ipv4(1),
|
||||
-- ipv6(2) }
|
||||
-- DESCRIPTION
|
||||
-- This MIB requires support for only global IPv4
|
||||
-- and IPv6 address types. The type unknown also
|
||||
-- needs to be supported to identify a special
|
||||
-- case in the listener table: a listen using
|
||||
-- both IPv4 and IPv6 addresses on the device.
|
||||
--
|
||||
"
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS { tcpBaseGroup, tcpConnectionGroup,
|
||||
tcpListenerGroup }
|
||||
GROUP tcpHCGroup
|
||||
DESCRIPTION
|
||||
"This group is mandatory for systems that are capable
|
||||
of receiving or transmitting more than 1 million TCP
|
||||
segments per second. 1 million segments per second will
|
||||
cause a Counter32 to wrap in just over an hour."
|
||||
OBJECT tcpConnectionState
|
||||
SYNTAX INTEGER { closed(1), listen(2), synSent(3),
|
||||
synReceived(4), established(5),
|
||||
finWait1(6), finWait2(7), closeWait(8),
|
||||
lastAck(9), closing(10), timeWait(11) }
|
||||
MIN-ACCESS read-only
|
||||
DESCRIPTION
|
||||
"Write access is not required, nor is support for the value
|
||||
deleteTCB (12)."
|
||||
::= { tcpMIBCompliances 2 }
|
||||
|
||||
tcpMIBCompliance MODULE-COMPLIANCE
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"The compliance statement for IPv4-only systems that
|
||||
implement TCP. In order to be IP version independent, this
|
||||
compliance statement is deprecated in favor of
|
||||
tcpMIBCompliance2. However, agents are still encouraged
|
||||
to implement these objects in order to interoperate with
|
||||
the deployed base of managers."
|
||||
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS { tcpGroup }
|
||||
OBJECT tcpConnState
|
||||
MIN-ACCESS read-only
|
||||
DESCRIPTION
|
||||
"Write access is not required."
|
||||
::= { tcpMIBCompliances 1 }
|
||||
|
||||
-- units of conformance
|
||||
|
||||
tcpGroup OBJECT-GROUP
|
||||
OBJECTS { tcpRtoAlgorithm, tcpRtoMin, tcpRtoMax,
|
||||
tcpMaxConn, tcpActiveOpens,
|
||||
tcpPassiveOpens, tcpAttemptFails,
|
||||
tcpEstabResets, tcpCurrEstab, tcpInSegs,
|
||||
tcpOutSegs, tcpRetransSegs, tcpConnState,
|
||||
tcpConnLocalAddress, tcpConnLocalPort,
|
||||
tcpConnRemAddress, tcpConnRemPort,
|
||||
tcpInErrs, tcpOutRsts }
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"The tcp group of objects providing for management of TCP
|
||||
entities."
|
||||
::= { tcpMIBGroups 1 }
|
||||
|
||||
tcpBaseGroup OBJECT-GROUP
|
||||
OBJECTS { tcpRtoAlgorithm, tcpRtoMin, tcpRtoMax,
|
||||
tcpMaxConn, tcpActiveOpens,
|
||||
tcpPassiveOpens, tcpAttemptFails,
|
||||
tcpEstabResets, tcpCurrEstab, tcpInSegs,
|
||||
tcpOutSegs, tcpRetransSegs,
|
||||
tcpInErrs, tcpOutRsts }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The group of counters common to TCP entities."
|
||||
::= { tcpMIBGroups 2 }
|
||||
|
||||
tcpConnectionGroup OBJECT-GROUP
|
||||
OBJECTS { tcpConnectionState, tcpConnectionProcess }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The group provides general information about TCP
|
||||
connections."
|
||||
::= { tcpMIBGroups 3 }
|
||||
|
||||
tcpListenerGroup OBJECT-GROUP
|
||||
OBJECTS { tcpListenerProcess }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This group has objects providing general information about
|
||||
TCP listeners."
|
||||
::= { tcpMIBGroups 4 }
|
||||
|
||||
tcpHCGroup OBJECT-GROUP
|
||||
OBJECTS { tcpHCInSegs, tcpHCOutSegs }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The group of objects providing for counters of high speed
|
||||
TCP implementations."
|
||||
::= { tcpMIBGroups 5 }
|
||||
|
||||
END
|
639
internal/snmp/testdata/gosmi/tcpMibImports
vendored
Normal file
639
internal/snmp/testdata/gosmi/tcpMibImports
vendored
Normal file
|
@ -0,0 +1,639 @@
|
|||
SNMPv2-SMI DEFINITIONS ::= BEGIN
|
||||
|
||||
-- the path to the root
|
||||
|
||||
org OBJECT IDENTIFIER ::= { iso 3 } -- "iso" = 1
|
||||
dod OBJECT IDENTIFIER ::= { org 6 }
|
||||
internet OBJECT IDENTIFIER ::= { dod 1 }
|
||||
|
||||
directory OBJECT IDENTIFIER ::= { internet 1 }
|
||||
|
||||
mgmt OBJECT IDENTIFIER ::= { internet 2 }
|
||||
mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
|
||||
transmission OBJECT IDENTIFIER ::= { mib-2 10 }
|
||||
|
||||
experimental OBJECT IDENTIFIER ::= { internet 3 }
|
||||
|
||||
private OBJECT IDENTIFIER ::= { internet 4 }
|
||||
enterprises OBJECT IDENTIFIER ::= { private 1 }
|
||||
|
||||
security OBJECT IDENTIFIER ::= { internet 5 }
|
||||
|
||||
snmpV2 OBJECT IDENTIFIER ::= { internet 6 }
|
||||
|
||||
-- transport domains
|
||||
snmpDomains OBJECT IDENTIFIER ::= { snmpV2 1 }
|
||||
|
||||
-- transport proxies
|
||||
snmpProxys OBJECT IDENTIFIER ::= { snmpV2 2 }
|
||||
|
||||
-- module identities
|
||||
snmpModules OBJECT IDENTIFIER ::= { snmpV2 3 }
|
||||
|
||||
-- Extended UTCTime, to allow dates with four-digit years
|
||||
-- (Note that this definition of ExtUTCTime is not to be IMPORTed
|
||||
-- by MIB modules.)
|
||||
ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
|
||||
-- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ
|
||||
|
||||
-- where: YY - last two digits of year (only years
|
||||
-- between 1900-1999)
|
||||
-- YYYY - last four digits of the year (any year)
|
||||
-- MM - month (01 through 12)
|
||||
-- DD - day of month (01 through 31)
|
||||
-- HH - hours (00 through 23)
|
||||
-- MM - minutes (00 through 59)
|
||||
-- Z - denotes GMT (the ASCII character Z)
|
||||
--
|
||||
-- For example, "9502192015Z" and "199502192015Z" represent
|
||||
-- 8:15pm GMT on 19 February 1995. Years after 1999 must use
|
||||
-- the four digit year format. Years 1900-1999 may use the
|
||||
-- two or four digit format.
|
||||
|
||||
-- definitions for information modules
|
||||
|
||||
MODULE-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"LAST-UPDATED" value(Update ExtUTCTime)
|
||||
"ORGANIZATION" Text
|
||||
"CONTACT-INFO" Text
|
||||
"DESCRIPTION" Text
|
||||
RevisionPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
RevisionPart ::=
|
||||
Revisions
|
||||
| empty
|
||||
Revisions ::=
|
||||
Revision
|
||||
| Revisions Revision
|
||||
Revision ::=
|
||||
"REVISION" value(Update ExtUTCTime)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
OBJECT-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- names of objects
|
||||
-- (Note that these definitions of ObjectName and NotificationName
|
||||
-- are not to be IMPORTed by MIB modules.)
|
||||
|
||||
ObjectName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
NotificationName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
-- syntax of objects
|
||||
|
||||
-- the "base types" defined here are:
|
||||
-- 3 built-in ASN.1 types: INTEGER, OCTET STRING, OBJECT IDENTIFIER
|
||||
-- 8 application-defined types: Integer32, IpAddress, Counter32,
|
||||
-- Gauge32, Unsigned32, TimeTicks, Opaque, and Counter64
|
||||
|
||||
ObjectSyntax ::=
|
||||
CHOICE {
|
||||
simple
|
||||
SimpleSyntax,
|
||||
-- note that SEQUENCEs for conceptual tables and
|
||||
-- rows are not mentioned here...
|
||||
|
||||
application-wide
|
||||
ApplicationSyntax
|
||||
}
|
||||
|
||||
-- built-in ASN.1 types
|
||||
|
||||
SimpleSyntax ::=
|
||||
CHOICE {
|
||||
-- INTEGERs with a more restrictive range
|
||||
-- may also be used
|
||||
integer-value -- includes Integer32
|
||||
INTEGER (-2147483648..2147483647),
|
||||
-- OCTET STRINGs with a more restrictive size
|
||||
-- may also be used
|
||||
string-value
|
||||
OCTET STRING (SIZE (0..65535)),
|
||||
objectID-value
|
||||
OBJECT IDENTIFIER
|
||||
}
|
||||
|
||||
-- indistinguishable from INTEGER, but never needs more than
|
||||
-- 32-bits for a two's complement representation
|
||||
Integer32 ::=
|
||||
INTEGER (-2147483648..2147483647)
|
||||
|
||||
-- application-wide types
|
||||
|
||||
ApplicationSyntax ::=
|
||||
CHOICE {
|
||||
ipAddress-value
|
||||
IpAddress,
|
||||
counter-value
|
||||
Counter32,
|
||||
timeticks-value
|
||||
TimeTicks,
|
||||
arbitrary-value
|
||||
Opaque,
|
||||
big-counter-value
|
||||
Counter64,
|
||||
unsigned-integer-value -- includes Gauge32
|
||||
Unsigned32
|
||||
}
|
||||
|
||||
-- in network-byte order
|
||||
|
||||
-- (this is a tagged type for historical reasons)
|
||||
IpAddress ::=
|
||||
[APPLICATION 0]
|
||||
IMPLICIT OCTET STRING (SIZE (4))
|
||||
|
||||
-- this wraps
|
||||
Counter32 ::=
|
||||
[APPLICATION 1]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- this doesn't wrap
|
||||
Gauge32 ::=
|
||||
[APPLICATION 2]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- an unsigned 32-bit quantity
|
||||
-- indistinguishable from Gauge32
|
||||
Unsigned32 ::=
|
||||
[APPLICATION 2]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- hundredths of seconds since an epoch
|
||||
TimeTicks ::=
|
||||
[APPLICATION 3]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- for backward-compatibility only
|
||||
Opaque ::=
|
||||
[APPLICATION 4]
|
||||
IMPLICIT OCTET STRING
|
||||
|
||||
-- for counters that wrap in less than one hour with only 32 bits
|
||||
Counter64 ::=
|
||||
[APPLICATION 6]
|
||||
IMPLICIT INTEGER (0..18446744073709551615)
|
||||
|
||||
-- definition for objects
|
||||
|
||||
OBJECT-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"SYNTAX" Syntax
|
||||
UnitsPart
|
||||
"MAX-ACCESS" Access
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
IndexPart
|
||||
DefValPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE ObjectName)
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement),
|
||||
-- a textual convention (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
UnitsPart ::=
|
||||
"UNITS" Text
|
||||
| empty
|
||||
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
IndexPart ::=
|
||||
"INDEX" "{" IndexTypes "}"
|
||||
| "AUGMENTS" "{" Entry "}"
|
||||
| empty
|
||||
IndexTypes ::=
|
||||
IndexType
|
||||
| IndexTypes "," IndexType
|
||||
IndexType ::=
|
||||
"IMPLIED" Index
|
||||
| Index
|
||||
|
||||
Index ::=
|
||||
-- use the SYNTAX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
Entry ::=
|
||||
-- use the INDEX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
|
||||
DefValPart ::= "DEFVAL" "{" Defvalue "}"
|
||||
| empty
|
||||
|
||||
Defvalue ::= -- must be valid for the type specified in
|
||||
-- SYNTAX clause of same OBJECT-TYPE macro
|
||||
value(ObjectSyntax)
|
||||
| "{" BitsValue "}"
|
||||
|
||||
BitsValue ::= BitNames
|
||||
| empty
|
||||
|
||||
BitNames ::= BitName
|
||||
| BitNames "," BitName
|
||||
|
||||
BitName ::= identifier
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- definitions for notifications
|
||||
|
||||
NOTIFICATION-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
ObjectsPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE NotificationName)
|
||||
|
||||
ObjectsPart ::=
|
||||
"OBJECTS" "{" Objects "}"
|
||||
| empty
|
||||
Objects ::=
|
||||
Object
|
||||
|
||||
| Objects "," Object
|
||||
Object ::=
|
||||
value(ObjectName)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- definitions of administrative identifiers
|
||||
|
||||
zeroDotZero OBJECT-IDENTITY
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A value used for null identifiers."
|
||||
::= { 0 0 }
|
||||
|
||||
|
||||
|
||||
TEXTUAL-CONVENTION MACRO ::=
|
||||
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
DisplayPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
"SYNTAX" Syntax
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE Syntax) -- adapted ASN.1
|
||||
|
||||
DisplayPart ::=
|
||||
"DISPLAY-HINT" Text
|
||||
| empty
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
END
|
||||
|
||||
MODULE-COMPLIANCE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
ModulePart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
ModulePart ::=
|
||||
Modules
|
||||
Modules ::=
|
||||
Module
|
||||
| Modules Module
|
||||
Module ::=
|
||||
-- name of module --
|
||||
"MODULE" ModuleName
|
||||
MandatoryPart
|
||||
CompliancePart
|
||||
|
||||
ModuleName ::=
|
||||
-- identifier must start with uppercase letter
|
||||
identifier ModuleIdentifier
|
||||
-- must not be empty unless contained
|
||||
-- in MIB Module
|
||||
| empty
|
||||
ModuleIdentifier ::=
|
||||
value(OBJECT IDENTIFIER)
|
||||
| empty
|
||||
|
||||
MandatoryPart ::=
|
||||
"MANDATORY-GROUPS" "{" Groups "}"
|
||||
| empty
|
||||
|
||||
Groups ::=
|
||||
|
||||
Group
|
||||
| Groups "," Group
|
||||
Group ::=
|
||||
value(OBJECT IDENTIFIER)
|
||||
|
||||
CompliancePart ::=
|
||||
Compliances
|
||||
| empty
|
||||
|
||||
Compliances ::=
|
||||
Compliance
|
||||
| Compliances Compliance
|
||||
Compliance ::=
|
||||
ComplianceGroup
|
||||
| Object
|
||||
|
||||
ComplianceGroup ::=
|
||||
"GROUP" value(OBJECT IDENTIFIER)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
Object ::=
|
||||
"OBJECT" value(ObjectName)
|
||||
SyntaxPart
|
||||
WriteSyntaxPart
|
||||
AccessPart
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- must be a refinement for object's SYNTAX clause
|
||||
SyntaxPart ::= "SYNTAX" Syntax
|
||||
| empty
|
||||
|
||||
-- must be a refinement for object's SYNTAX clause
|
||||
WriteSyntaxPart ::= "WRITE-SYNTAX" Syntax
|
||||
| empty
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement),
|
||||
-- a textual convention (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
AccessPart ::=
|
||||
"MIN-ACCESS" Access
|
||||
| empty
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
OBJECT-GROUP MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
ObjectsPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
ObjectsPart ::=
|
||||
"OBJECTS" "{" Objects "}"
|
||||
Objects ::=
|
||||
Object
|
||||
| Objects "," Object
|
||||
Object ::=
|
||||
|
||||
value(ObjectName)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
InetPortNumber ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents a 16 bit port number of an Internet transport
|
||||
|
||||
layer protocol. Port numbers are assigned by IANA. A
|
||||
current list of all assignments is available from
|
||||
<http://www.iana.org/>.
|
||||
|
||||
The value zero is object-specific and must be defined as
|
||||
part of the description of any object that uses this
|
||||
syntax. Examples of the usage of zero might include
|
||||
situations where a port number is unknown, or when the
|
||||
value zero is used as a wildcard in a filter."
|
||||
REFERENCE "STD 6 (RFC 768), STD 7 (RFC 793) and RFC 2960"
|
||||
SYNTAX Unsigned32 (0..65535)
|
||||
|
||||
|
||||
InetAddress ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"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."
|
||||
SYNTAX OCTET STRING (SIZE (0..255))
|
||||
|
||||
InetAddressType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"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))."
|
||||
SYNTAX INTEGER {
|
||||
unknown(0),
|
||||
ipv4(1),
|
||||
ipv6(2),
|
||||
ipv4z(3),
|
||||
ipv6z(4),
|
||||
dns(16)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
END
|
Loading…
Add table
Add a link
Reference in a new issue