Skip to content

Instantly share code, notes, and snippets.

@neoeinstein
Created May 29, 2009 22:38
Show Gist options
  • Save neoeinstein/120252 to your computer and use it in GitHub Desktop.
Save neoeinstein/120252 to your computer and use it in GitHub Desktop.
Important Links:
SNMP RFCs:
2578: Structure of Management Information Version 2 (SMIv2)
http://tools.ietf.org/html/rfc2578
2579: Textual Conventions for SMIv2
http://tools.ietf.org/html/rfc2579
2580: Conformance Statements for SMIv2
http://tools.ietf.org/html/rfc2580
SNMP MIB Example:
4022: Management Information Base for the Transmission Control Protocol (TCP)
http://tools.ietf.org/html/rfc4022
Tor Documents:
Control Port Spec
http://git.torproject.org/checkout/tor/master/doc/spec/control-spec.txt
Tor Protocol Spec
http://git.torproject.org/checkout/tor/master/doc/spec/tor-spec.txt
TOR-MGMT-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32, Unsigned32,
Gauge32, Counter32, Counter64 FROM SNMPv2-SMI
TEXTUAL-CONVENTION, RowStatus FROM SNMPv2-TC
InetAddressType, InetAddress,
InetPortNumber FROM INET-ADDRESS-MIB
tor, TorFingerprint, TorNickname FROM TOR-MIB;
torMgmt MODULE-IDENTITY
LAST-UPDATED "200905290000Z"
ORGANIZATION
"The Tor Project
http://www.torproject.org"
CONTACT-INFO
"Postal: The Tor Project
122 Scott Circle
Dedham, MA 02026-6416
USA
Email: <>"
DESCRIPTION
"MIB module for the managment of Tor routers"
REVISION "200905290000Z"
DESCRIPTION
""
::= { tor 1 }
orConn OBJECT IDENTIFIER ::= { torMgmt 2 }
orConnInConnectAttempt OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Remote OR connection attempts to this router"
::= { orConn 1 }
orConnOutConnectAttempt OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"OR connection attempts made by this router"
::= { orConn 2 }
orConnConnectEstab OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"OR connections successfully established"
::= { orConn 3 }
orConnFailed OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"OR connections closed before a handshake was completed"
::= { orConn 4 }
orConnClosed OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"OR connections closed after a successful handshake"
::= { orConn 5 }
orConnCurrAttempt OBJECT-TYPE
SYNTAX Gauge32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"OR connections currently being attempted which have not
yet completed a successful handshake"
::= { orConn 6 }
orConnCurrEstab OBJECT-TYPE
SYNTAX Gauge32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"OR connections currently established that have successfully
completed a handshake"
::= { orConn 7 }
orConnTable OBJECT-TYPE
SYNTAX SEQUENCE OF OrConnEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"OR connections currently tracked by this router"
::= { orConn 8 }
orConnEntry OBJECT-TYPE
SYNTAX OrConnEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A conceptual row in the orConnTable containing information
about a particlular OR connection. All rows in this table are
transient and may appear as soon as a connection is opened and
disappear as soon as it is closed."
INDEX { orConnAddressType,
orConnAddress,
orConnPort }
::= { orConnTable 1 }
OrConnEntry ::= SEQUENCE {
orConnAddressType InetAddressType,
orConnAddress InetAddress,
orConnPortNumber InetPortNumber,
orConnFingerprint TorFingerprint,
orConnNickname TorNickname,
orConnState INTEGER,
orConnInOnions Counter32,
orConnOutOnions Counter32,
orConnNumCircs Gauge32,
orConnCloseReason INTEGER
}
orConnAddressType OBJECT-TYPE
SYNTAX InetAddressType
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The internet address type of the address for the remote end
of this OR connection"
::= { orConnEntry 1 }
orConnAddress OBJECT-TYPE
SYNTAX InetAddress
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The internet address for the remote end of this OR connection"
::= { orConnEntry 2 }
orConnPortNumber OBJECT-TYPE
SYNTAX InetPortNumber
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The port number for the remote end of this OR connection"
::= { orConnEntry 3 }
orConnFingerprint OBJECT-TYPE
SYNTAX TorFingerprint
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The fingerprint of the remote router to which this OR
connection is associated"
::= { orConnEntry 4 }
orConnNickname OBJECT-TYPE
SYNTAX TorNickname
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The nickname of the remote router to which this OR connection
is associated"
::= { orConnEntry 5 }
orConnState OBJECT-TYPE
SYNTAX INTEGER {
new(1),
launched(2),
connected(3),
failed(4),
closed(5)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The current connectivity state of this OR connection"
::= { orConnEntry 6 }
orConnInOnion OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of onion packets received via this OR connection"
::= { orConnEntry 7 }
orConnOutOnion OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of onion packets sent via this OR connection"
::= { orConnEntry 8 }
orConnNumCircs OBJECT-TYPE
SYNTAX Gauge32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of circuits which include this OR connection"
::= { orConnEntry 9 }
orConnCloseReason OBJECT-TYPE
SYNTAX INTEGER {
misc(0),
done(1),
connectRefused(2),
identity(3),
connectReset(4),
timeout(5),
noRoute(6),
ioError(7),
resourceLimit(8)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The reason that the OR connection was failed/closed"
::= { orConnEntry 10 }
END
+--tor(1.3.6.1.4.1.9586.100.6)
|
+--mgmt(1)
|
+--config(1)
| |
| +--
+--orConn(2)
| |
| +-- -R-- Counter orConnInConnectAttempt(1)*
| +-- -R-- Counter orConnOutConnectAttempt(2)*
| +-- -R-- Counter orConnConnectEstab(3)*
| +-- -R-- Counter orConnFailed(4)*
| +-- -R-- Counter orConnClosed(5)*
| +-- -R-- Gauge orConnCurrEstab(6)
| |
| +--orConnTable
| |
| +--orConnEntry(1)
| | Index: orConnFingerprint
| |
| +-- ---- String orConnFingerprint(1)
| | Textual Convention: TorFingerprint
| | Size: 20
| +-- -R-- String orConnName(2)
| | Size: 0..19
| +-- -R-- EnumVal orConnState(1)
| | Values: new(1), launched(2), connected(3), failed(4), closed(5)
| +-- -R-- IpAddr orConnAddress(4)*
| +-- -R-- Integer32 orConnPort(5)*
| | Range: 0..65535
| +-- -R-- Counter orConnInOnions(6)*
| +-- -R-- Counter orConnOutOnions(7)*
| +-- -R-- Gague orConnNumCircs(8)*
| +-- -R-- EnumVal orConnCloseReason(9)
| Values: misc(0), done(1), connectRefused(2), identity(3), connectReset(4), timeout(5), noRoute(6), ioError(7), resourceLimit(8)
+--circ(3)
| |
| +--circTable
| |
| +--circEntry(1)
| | Index: circId
| |
| +-- ---- Unsigned32 circId(1)
| +-- -R-- EnumVal circStatus(2)
| | Values: launched(1), built(2), extended(3), failed(4), closed(5)
| +-- CR-- EnumVal circPurpose(3)
| | Values: general(1), controller(2), bridge(3), hidSrvIntro(4), hidSrvRend(5)
| +-- -R-- EnumVal circReason(4)
| | Textual Convention: TorCircReason
| | Values: none(0), torProtocol(1), internal(2), requested(3), hibernating(4), resourceLimit(5), connectFailed(6), orIdentity(7), orConnClosed(8), finished(9), timeout(10), destroyed(11), nopath(12), nosuchservice(13)
| +-- -R-- EnumVal circRemoteReason(5)
| | Textual Convention: TorCircReason
| | Values: none(0), torProtocol(1), internal(2), requested(3), hibernating(4), resourceLimit(5), connectFailed(6), orIdentity(7), orConnClosed(8), finished(9), timeout(10), destroyed(11), nopath(12), nosuchservice(13)
| +-- CR-- EnumVal circRowStatus(4)
| | Textual Convention: RowStatus
| | Values: active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
| +--circNodeTable
| |
| +--circNodeEntry(1)
| | Index: circNodeId
| |
| +-- ---- Unsigned32 circNodeId(1)
| +-- CR-- String circNodeFingerprint(2)
| | Textual Convention: TorFingerprint
| | Size: 20
| +-- CR-- String circNodeName(3)
| +-- CR-- EnumVal circNodeRowStatus
| Textual Convention: RowStatus
| Values: active(1), notInService(2), notReady(3), createAndGo(4), createAndWait(5), destroy(6)
+--stream(4)
| |
| +--streamTable
| |
| +--streamEntry(1)
| | Index: streamId
| |
| +-- ---- Unsigned32 streamId(1)
| +-- -R-- EnumVal streamStatus(2)
| | Values: new(1), newresolve(2), remap(3), sentconnect(4), sentresolve(4), succeeded(5), failed(6), closed(7), detached(8)
| +-- -R-- EnumVal streamReason(3)
| | Textual Convention: TorStreamReason
| | Values: misc(1), resolveFailed(2), connectRefused(3), exitPolicy(4), destroy(5), done(6), timeout(7), hibernating(9), internal(10), resourceLimit(11), connReset(12), torProtocol(13), notDirectory(14)
| +-- -R-- EnumVal streamRemoteReason(3)
| | Textual Convention: TorStreamReason
| | Values: misc(1), resolveFailed(2), connectRefused(3), exitPolicy(4), destroy(5), done(6), timeout(7), hibernating(9), internal(10), resourceLimit(11), connReset(12), torProtocol(13), notDirectory(14)
+--dir(5)
+--ns(6)
|
+--nsTable
|
+--nsEntry(1)
| Index: orConnFingerprint
|
+--
+--Debian(9586)
|
+--project(100)
|
+--tor(6)
+--torMgmt(1)
| |
| +--orConn(2)
| |
| +-- -R-- Counter orConnInConnectAttempt(1)
| +-- -R-- Counter orConnOutConnectAttempt(2)
| +-- -R-- Counter orConnConnectEstab(3)
| +-- -R-- Counter orConnFailed(4)
| +-- -R-- Counter orConnClosed(5)
| +-- -R-- Gauge orConnCurrAttempt(6)
| +-- -R-- Gauge orConnCurrEstab(7)
| |
| +--orConnTable(8)
| |
| +--orConnEntry(1)
| | Index: orConnAddressType, orConnAddress, orConnPort
| |
| +-- ---- EnumVal orConnAddressType(1)
| | Textual Convention: InetAddressType
| | Values: unknown(0), ipv4(1), ipv6(2), ipv4z(3), ipv6z(4), dns(16)
| +-- ---- String orConnAddress(2)
| | Textual Convention: InetAddress
| | Size: 0..255
| +-- ---- Unsigned orConnPortNumber(3)
| | Textual Convention: InetPortNumber
| | Range: 0..65535
| +-- -R-- String orConnFingerprint(4)
| | Textual Convention: TorFingerprint
| | Size: 20
| +-- -R-- String orConnNickname(5)
| | Textual Convention: TorNickname
| | Size: 0..19
| +-- -R-- EnumVal orConnState(6)
| | Values: new(1), launched(2), connected(3), failed(4), closed(5)
| +-- -R-- Counter orConnInOnion(7)
| +-- -R-- Counter orConnOutOnion(8)
| +-- -R-- Gauge orConnNumCircs(9)
| +-- -R-- EnumVal orConnCloseReason(10)
| Values: misc(0), done(1), connectRefused(2), identity(3), connectReset(4), timeout(5), noRoute(6), ioError(7), resourceLimit(8)
|
+--torExperimental(9999)
|
+--torPlaypen(9999)
TOR-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, enterprises FROM SNMPv2-SMI
TEXTUAL-CONVENTION FROM SNMPv2-TC;
Debian OBJECT IDENTIFIER ::= { enterprises 9586 }
project OBJECT IDENTIFIER ::= { Debian 100 }
tor MODULE-IDENTITY
LAST-UPDATED "200905290000Z" -- 29 May 2009
ORGANIZATION
"The Tor Project
http://www.torproject.org"
CONTACT-INFO
"Postal: The Tor Project
122 Scott Circle
Deedham, MA 02026-6416
USA
Email: <>"
DESCRIPTION
"The MIB module for managing Tor implementations.
Copyright (C) The Tor Project (2009)."
REVISION "200905290000Z"
DESCRIPTION
"Initial revision of this MIB, proposed in Tor
Proposal XXX."
::= { project 6 }
torExperimental OBJECT IDENTIFIER ::= { tor 9999 }
torPlaypen OBJECT IDENTIFIER ::= { torExperimental 9999 }
TorFingerprint ::= TEXTUAL-CONVENTION
DISPLAY-HINT "$20x"
STATUS current
DESCRIPTION
"Represents a Tor router identity key fingerprint"
SYNTAX OCTET STRING (SIZE (20))
TorNickname ::= TEXTUAL-CONVENTION
DISPLAY-HINT "19a"
STATUS current
DESCRIPTION
"Represents a Tor router self-assigned nickname"
SYNTAX OCTET STRING (SIZE (0..19))
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment