From: Maxim Mamontov Date: Tue, 26 Jul 2011 15:43:43 +0000 (+0300) Subject: ASN.1 sources moved to library X-Git-Tag: 2.408-alpha~72 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/3b2cf3d5caf8a8e7d6761696038c73590434a93c ASN.1 sources moved to library --- diff --git a/projects/stargazer/plugins/other/smux/asn1/Makefile b/projects/stargazer/plugins/other/smux/asn1/Makefile deleted file mode 100644 index f1f0c87e..00000000 --- a/projects/stargazer/plugins/other/smux/asn1/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -ASN1_SOURCES = RFC1213-MIB.asn1 \ - RFC1155-SMI.asn1 \ - RFC1157-SNMP.asn1 \ - SMUX.asn1 - -asn1: $(ASN1_SOURCES) - asn1c -fskeletons-copy -fcompound-names $^ - rm Makefile.am.sample diff --git a/projects/stargazer/plugins/other/smux/asn1/RFC1155-SMI.asn1 b/projects/stargazer/plugins/other/smux/asn1/RFC1155-SMI.asn1 deleted file mode 100644 index 132e3408..00000000 --- a/projects/stargazer/plugins/other/smux/asn1/RFC1155-SMI.asn1 +++ /dev/null @@ -1,135 +0,0 @@ - --- WinAgents MIB Extraction Wizard --- Extracted from rfc1155.txt 17.03.2005 16:16:50 - -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 - --- MIB Extraction: All MACRO definitions are predefined by compiler --- commented by MIB Extraction: OBJECT-TYPE MACRO ::= --- commented by MIB Extraction: BEGIN --- commented by MIB Extraction: TYPE NOTATION ::= "SYNTAX" type (TYPE ObjectSyntax) --- commented by MIB Extraction: "ACCESS" Access --- commented by MIB Extraction: "STATUS" Status --- commented by MIB Extraction: VALUE NOTATION ::= value (VALUE ObjectName) --- commented by MIB Extraction: --- commented by MIB Extraction: Access ::= "read-only" --- commented by MIB Extraction: | "read-write" --- commented by MIB Extraction: | "write-only" --- commented by MIB Extraction: | "not-accessible" --- commented by MIB Extraction: Status ::= "mandatory" --- commented by MIB Extraction: | "optional" --- commented by MIB Extraction: | "obsolete" --- commented by MIB Extraction: 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 diff --git a/projects/stargazer/plugins/other/smux/asn1/RFC1157-SNMP.asn1 b/projects/stargazer/plugins/other/smux/asn1/RFC1157-SNMP.asn1 deleted file mode 100644 index 166f7e78..00000000 --- a/projects/stargazer/plugins/other/smux/asn1/RFC1157-SNMP.asn1 +++ /dev/null @@ -1,143 +0,0 @@ - --- WinAgents MIB Extraction Wizard --- Extracted from rfc1157.txt 16.03.2005 20:20:14 - -RFC1157-SNMP DEFINITIONS ::= BEGIN - - IMPORTS - ObjectName, ObjectSyntax, NetworkAddress, IpAddress, TimeTicks - FROM RFC1155-SMI; - - - -- top-level message - - Message ::= - SEQUENCE { - version -- version-1 for this RFC - INTEGER { - version-1(0) - }, - - community -- community name - OCTET STRING, - - data -- e.g., PDUs if trivial - ANY -- authentication is being used - } - - - -- protocol data units - - PDUs ::= - CHOICE { - get-request - GetRequest-PDU, - - get-next-request - GetNextRequest-PDU, - - get-response - GetResponse-PDU, - - set-request - SetRequest-PDU, - - trap - Trap-PDU - } - - - - - -- PDUs - - GetRequest-PDU ::= - [0] - IMPLICIT PDU - - GetNextRequest-PDU ::= - [1] - IMPLICIT PDU - - GetResponse-PDU ::= - [2] - IMPLICIT PDU - - SetRequest-PDU ::= - [3] - IMPLICIT PDU - - PDU ::= - SEQUENCE { - request-id - INTEGER, - - error-status -- sometimes ignored - INTEGER { - noError(0), - tooBig(1), - noSuchName(2), - badValue(3), - readOnly(4), - genErr(5) - }, - - error-index -- sometimes ignored - INTEGER, - - variable-bindings -- values are sometimes ignored - VarBindList - } - - Trap-PDU ::= - [4] - IMPLICIT SEQUENCE { - enterprise -- type of object generating - -- trap, see sysObjectID in [5] - - - OBJECT IDENTIFIER, - - agent-addr -- address of object generating - NetworkAddress, -- trap - - generic-trap -- generic trap type - INTEGER { - coldStart(0), - warmStart(1), - linkDown(2), - linkUp(3), - authenticationFailure(4), - egpNeighborLoss(5), - enterpriseSpecific(6) - }, - - specific-trap -- specific code, present even - INTEGER, -- if generic-trap is not - -- enterpriseSpecific - - time-stamp -- time elapsed between the last - TimeTicks, -- (re)initialization of the network - -- entity and the generation of the trap - - variable-bindings -- "interesting" information - VarBindList - } - - - -- variable bindings - - VarBind ::= - SEQUENCE { - name - ObjectName, - - value - ObjectSyntax - } - - VarBindList ::= - SEQUENCE OF - VarBind - - END \ No newline at end of file diff --git a/projects/stargazer/plugins/other/smux/asn1/RFC1213-MIB.asn1 b/projects/stargazer/plugins/other/smux/asn1/RFC1213-MIB.asn1 deleted file mode 100644 index b9b1e857..00000000 --- a/projects/stargazer/plugins/other/smux/asn1/RFC1213-MIB.asn1 +++ /dev/null @@ -1,339 +0,0 @@ - --- WinAgents MIB Extraction Wizard --- Extracted from rfc1213.txt 16.03.2005 20:20:14 - -RFC1213-MIB DEFINITIONS ::= BEGIN - -IMPORTS - mgmt, NetworkAddress, IpAddress, Counter, Gauge, - TimeTicks - FROM RFC1155-SMI - OBJECT-TYPE - FROM RFC-1212; - --- This MIB module uses the extended OBJECT-TYPE macro as --- defined in [14]; - - --- MIB-II (same prefix as MIB-I) - -mib-2 OBJECT IDENTIFIER ::= { mgmt 1 } - --- textual conventions - -DisplayString ::= - OCTET STRING --- This data type is used to model textual information taken --- from the NVT ASCII character set. By convention, objects --- with this syntax are declared as having - --- --- SIZE (0..255) - -PhysAddress ::= - OCTET STRING --- This data type is used to model media addresses. For many --- types of media, this will be in a binary representation. --- For example, an ethernet address would be represented as --- a string of 6 octets. - - --- groups in MIB-II - -system OBJECT IDENTIFIER ::= { mib-2 1 } - -interfaces OBJECT IDENTIFIER ::= { mib-2 2 } - -at OBJECT IDENTIFIER ::= { mib-2 3 } - -ip OBJECT IDENTIFIER ::= { mib-2 4 } - -icmp OBJECT IDENTIFIER ::= { mib-2 5 } - -tcp OBJECT IDENTIFIER ::= { mib-2 6 } - -udp OBJECT IDENTIFIER ::= { mib-2 7 } - -egp OBJECT IDENTIFIER ::= { mib-2 8 } - --- historical (some say hysterical) --- cmot OBJECT IDENTIFIER ::= { mib-2 9 } - -transmission OBJECT IDENTIFIER ::= { mib-2 10 } - -snmp OBJECT IDENTIFIER ::= { mib-2 11 } - - --- the System group - --- Implementation of the System group is mandatory for all --- systems. If an agent is not configured to have a value --- for any of these variables, a string of length 0 is --- returned. - - -IfEntry ::= - SEQUENCE { - ifIndex - INTEGER, - - ifDescr - DisplayString, - ifType - INTEGER, - ifMtu - INTEGER, - ifSpeed - Gauge, - ifPhysAddress - PhysAddress, - ifAdminStatus - INTEGER, - ifOperStatus - INTEGER, - ifLastChange - TimeTicks, - ifInOctets - Counter, - ifInUcastPkts - Counter, - ifInNUcastPkts - Counter, - ifInDiscards - Counter, - ifInErrors - Counter, - ifInUnknownProtos - Counter, - ifOutOctets - Counter, - ifOutUcastPkts - Counter, - ifOutNUcastPkts - Counter, - ifOutDiscards - Counter, - ifOutErrors - Counter, - ifOutQLen - Gauge, - ifSpecific - OBJECT IDENTIFIER - } - - --- the Address Translation group - --- Implementation of the Address Translation group is --- mandatory for all systems. Note however that this group --- is deprecated by MIB-II. That is, it is being included - --- solely for compatibility with MIB-I nodes, and will most --- likely be excluded from MIB-III nodes. From MIB-II and --- onwards, each network protocol group contains its own --- address translation tables. - --- The Address Translation group contains one table which is --- the union across all interfaces of the translation tables --- for converting a NetworkAddress (e.g., an IP address) into --- a subnetwork-specific address. For lack of a better term, --- this document refers to such a subnetwork-specific address --- as a `physical' address. - --- Examples of such translation tables are: for broadcast --- media where ARP is in use, the translation table is --- equivalent to the ARP cache; or, on an X.25 network where --- non-algorithmic translation to X.121 addresses is --- required, the translation table contains the --- NetworkAddress to X.121 address equivalences. - - -AtEntry ::= - SEQUENCE { - atIfIndex - INTEGER, - - atPhysAddress - PhysAddress, - atNetAddress - NetworkAddress - } - - - - - --- the IP address table - --- The IP address table contains this entity's IP addressing --- information. - - -IpAddrEntry ::= - SEQUENCE { - ipAdEntAddr - IpAddress, - ipAdEntIfIndex - INTEGER, - ipAdEntNetMask - IpAddress, - ipAdEntBcastAddr - INTEGER, - ipAdEntReasmMaxSize - INTEGER (0..65535) - } - - -IpRouteEntry ::= - SEQUENCE { - ipRouteDest - IpAddress, - ipRouteIfIndex - INTEGER, - ipRouteMetric1 - INTEGER, - ipRouteMetric2 - INTEGER, - ipRouteMetric3 - INTEGER, - ipRouteMetric4 - INTEGER, - ipRouteNextHop - IpAddress, - ipRouteType - INTEGER, - ipRouteProto - INTEGER, - ipRouteAge - INTEGER, - ipRouteMask - IpAddress, - ipRouteMetric5 - INTEGER, - - ipRouteInfo - OBJECT IDENTIFIER - } - - -IpNetToMediaEntry ::= - SEQUENCE { - ipNetToMediaIfIndex - INTEGER, - ipNetToMediaPhysAddress - PhysAddress, - ipNetToMediaNetAddress - IpAddress, - ipNetToMediaType - INTEGER - } - - - -TcpConnEntry ::= - SEQUENCE { - tcpConnState - INTEGER, - tcpConnLocalAddress - IpAddress, - tcpConnLocalPort - INTEGER (0..65535), - tcpConnRemAddress - IpAddress, - tcpConnRemPort - INTEGER (0..65535) - } - - -UdpEntry ::= - SEQUENCE { - udpLocalAddress - IpAddress, - udpLocalPort - INTEGER (0..65535) - } - - - --- the EGP Neighbor table - --- The EGP neighbor table contains information about this --- entity's EGP neighbors. - - -EgpNeighEntry ::= - SEQUENCE { - egpNeighState - INTEGER, - egpNeighAddr - IpAddress, - egpNeighAs - INTEGER, - egpNeighInMsgs - Counter, - egpNeighInErrs - Counter, - egpNeighOutMsgs - Counter, - egpNeighOutErrs - Counter, - - egpNeighInErrMsgs - Counter, - egpNeighOutErrMsgs - Counter, - egpNeighStateUps - Counter, - egpNeighStateDowns - Counter, - egpNeighIntervalHello - INTEGER, - egpNeighIntervalPoll - INTEGER, - egpNeighMode - INTEGER, - egpNeighEventTrigger - INTEGER - } - - - --- the Transmission group - --- Based on the transmission media underlying each interface --- on a system, the corresponding portion of the Transmission --- group is mandatory for that system. - --- When Internet-standard definitions for managing --- transmission media are defined, the transmission group is --- used to provide a prefix for the names of those objects. - --- Typically, such definitions reside in the experimental --- portion of the MIB until they are "proven", then as a --- part of the Internet standardization process, the --- definitions are accordingly elevated and a new object --- identifier, under the transmission group is defined. By --- convention, the name assigned is: --- --- type OBJECT IDENTIFIER ::= { transmission number } --- --- where "type" is the symbolic value used for the media in --- the ifType column of the ifTable object, and "number" is --- the actual integer value corresponding to the symbol. - - --- the SNMP group - --- Implementation of the SNMP group is mandatory for all --- systems which support an SNMP protocol entity. Some of --- the objects defined below will be zero-valued in those --- SNMP implementations that are optimized to support only --- those functions specific to either a management agent or --- a management station. In particular, it should be --- observed that the objects below refer to an SNMP entity, --- and there may be several SNMP entities residing on a --- managed node (e.g., if the node is hosting acting as --- a management station). - - -END diff --git a/projects/stargazer/plugins/other/smux/asn1/SMUX.asn1 b/projects/stargazer/plugins/other/smux/asn1/SMUX.asn1 deleted file mode 100644 index af7748fd..00000000 --- a/projects/stargazer/plugins/other/smux/asn1/SMUX.asn1 +++ /dev/null @@ -1,122 +0,0 @@ - --- WinAgents MIB Extraction Wizard --- Extracted from rfc1227.txt 16.03.2005 20:20:14 - -SMUX DEFINITIONS ::= BEGIN - -IMPORTS - ObjectName - FROM RFC1155-SMI - DisplayString - FROM RFC1213-MIB - - PDUs - FROM RFC1157-SNMP; - - --- tags for SMUX-specific PDUs are application-wide to --- avoid conflict with tags for current (and future) --- SNMP-generic PDUs - -SMUX-PDUs ::= - CHOICE { - open -- SMUX peer uses - OpenPDU, -- immediately after TCP open - - close -- either uses immediately before TCP close - ClosePDU, - - registerRequest -- SMUX peer uses - RReqPDU, - - registerResponse -- SNMP agent uses - RRspPDU, - - PDUs, -- note that roles are reversed: - -- SNMP agent does get/get-next/set - -- SMUX peer does get-response/trap - - commitOrRollback -- SNMP agent uses - SOutPDU - } - - --- open PDU --- currently only simple authentication - -OpenPDU ::= - CHOICE { - simple - - SimpleOpen - } - -SimpleOpen ::= - [APPLICATION 0] IMPLICIT - SEQUENCE { - version -- of SMUX protocol - INTEGER { - version-1(0) - }, - - identity -- of SMUX peer, authoritative - OBJECT IDENTIFIER, - - description -- of SMUX peer, implementation-specific - DisplayString, - - password -- zero length indicates no authentication - OCTET STRING - } - - --- close PDU - -ClosePDU ::= - [APPLICATION 1] IMPLICIT - INTEGER { - goingDown(0), - unsupportedVersion(1), - packetFormat(2), - protocolError(3), - internalError(4), - authenticationFailure(5) - } - - --- insert PDU - -RReqPDU ::= - [APPLICATION 2] IMPLICIT - SEQUENCE { - subtree - ObjectName, - - priority -- the lower the better, "-1" means default - INTEGER (-1..2147483647), - - operation - - INTEGER { - delete(0), -- remove registration - readOnly(1), -- add registration, objects are RO - readWrite(2) -- .., objects are RW - } - } - -RRspPDU ::= - [APPLICATION 3] IMPLICIT - INTEGER { - failure(-1) - - -- on success the non-negative priority is returned - } - -SOutPDU ::= - [APPLICATION 4] IMPLICIT - INTEGER { - commit(0), - rollback(1) - } - -END \ No newline at end of file diff --git a/stglibs/smux.lib/RFC1155-SMI.asn1 b/stglibs/smux.lib/RFC1155-SMI.asn1 new file mode 100644 index 00000000..132e3408 --- /dev/null +++ b/stglibs/smux.lib/RFC1155-SMI.asn1 @@ -0,0 +1,135 @@ + +-- WinAgents MIB Extraction Wizard +-- Extracted from rfc1155.txt 17.03.2005 16:16:50 + +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 + +-- MIB Extraction: All MACRO definitions are predefined by compiler +-- commented by MIB Extraction: OBJECT-TYPE MACRO ::= +-- commented by MIB Extraction: BEGIN +-- commented by MIB Extraction: TYPE NOTATION ::= "SYNTAX" type (TYPE ObjectSyntax) +-- commented by MIB Extraction: "ACCESS" Access +-- commented by MIB Extraction: "STATUS" Status +-- commented by MIB Extraction: VALUE NOTATION ::= value (VALUE ObjectName) +-- commented by MIB Extraction: +-- commented by MIB Extraction: Access ::= "read-only" +-- commented by MIB Extraction: | "read-write" +-- commented by MIB Extraction: | "write-only" +-- commented by MIB Extraction: | "not-accessible" +-- commented by MIB Extraction: Status ::= "mandatory" +-- commented by MIB Extraction: | "optional" +-- commented by MIB Extraction: | "obsolete" +-- commented by MIB Extraction: 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 diff --git a/stglibs/smux.lib/RFC1157-SNMP.asn1 b/stglibs/smux.lib/RFC1157-SNMP.asn1 new file mode 100644 index 00000000..166f7e78 --- /dev/null +++ b/stglibs/smux.lib/RFC1157-SNMP.asn1 @@ -0,0 +1,143 @@ + +-- WinAgents MIB Extraction Wizard +-- Extracted from rfc1157.txt 16.03.2005 20:20:14 + +RFC1157-SNMP DEFINITIONS ::= BEGIN + + IMPORTS + ObjectName, ObjectSyntax, NetworkAddress, IpAddress, TimeTicks + FROM RFC1155-SMI; + + + -- top-level message + + Message ::= + SEQUENCE { + version -- version-1 for this RFC + INTEGER { + version-1(0) + }, + + community -- community name + OCTET STRING, + + data -- e.g., PDUs if trivial + ANY -- authentication is being used + } + + + -- protocol data units + + PDUs ::= + CHOICE { + get-request + GetRequest-PDU, + + get-next-request + GetNextRequest-PDU, + + get-response + GetResponse-PDU, + + set-request + SetRequest-PDU, + + trap + Trap-PDU + } + + + + + -- PDUs + + GetRequest-PDU ::= + [0] + IMPLICIT PDU + + GetNextRequest-PDU ::= + [1] + IMPLICIT PDU + + GetResponse-PDU ::= + [2] + IMPLICIT PDU + + SetRequest-PDU ::= + [3] + IMPLICIT PDU + + PDU ::= + SEQUENCE { + request-id + INTEGER, + + error-status -- sometimes ignored + INTEGER { + noError(0), + tooBig(1), + noSuchName(2), + badValue(3), + readOnly(4), + genErr(5) + }, + + error-index -- sometimes ignored + INTEGER, + + variable-bindings -- values are sometimes ignored + VarBindList + } + + Trap-PDU ::= + [4] + IMPLICIT SEQUENCE { + enterprise -- type of object generating + -- trap, see sysObjectID in [5] + + + OBJECT IDENTIFIER, + + agent-addr -- address of object generating + NetworkAddress, -- trap + + generic-trap -- generic trap type + INTEGER { + coldStart(0), + warmStart(1), + linkDown(2), + linkUp(3), + authenticationFailure(4), + egpNeighborLoss(5), + enterpriseSpecific(6) + }, + + specific-trap -- specific code, present even + INTEGER, -- if generic-trap is not + -- enterpriseSpecific + + time-stamp -- time elapsed between the last + TimeTicks, -- (re)initialization of the network + -- entity and the generation of the trap + + variable-bindings -- "interesting" information + VarBindList + } + + + -- variable bindings + + VarBind ::= + SEQUENCE { + name + ObjectName, + + value + ObjectSyntax + } + + VarBindList ::= + SEQUENCE OF + VarBind + + END \ No newline at end of file diff --git a/stglibs/smux.lib/RFC1213-MIB.asn1 b/stglibs/smux.lib/RFC1213-MIB.asn1 new file mode 100644 index 00000000..b9b1e857 --- /dev/null +++ b/stglibs/smux.lib/RFC1213-MIB.asn1 @@ -0,0 +1,339 @@ + +-- WinAgents MIB Extraction Wizard +-- Extracted from rfc1213.txt 16.03.2005 20:20:14 + +RFC1213-MIB DEFINITIONS ::= BEGIN + +IMPORTS + mgmt, NetworkAddress, IpAddress, Counter, Gauge, + TimeTicks + FROM RFC1155-SMI + OBJECT-TYPE + FROM RFC-1212; + +-- This MIB module uses the extended OBJECT-TYPE macro as +-- defined in [14]; + + +-- MIB-II (same prefix as MIB-I) + +mib-2 OBJECT IDENTIFIER ::= { mgmt 1 } + +-- textual conventions + +DisplayString ::= + OCTET STRING +-- This data type is used to model textual information taken +-- from the NVT ASCII character set. By convention, objects +-- with this syntax are declared as having + +-- +-- SIZE (0..255) + +PhysAddress ::= + OCTET STRING +-- This data type is used to model media addresses. For many +-- types of media, this will be in a binary representation. +-- For example, an ethernet address would be represented as +-- a string of 6 octets. + + +-- groups in MIB-II + +system OBJECT IDENTIFIER ::= { mib-2 1 } + +interfaces OBJECT IDENTIFIER ::= { mib-2 2 } + +at OBJECT IDENTIFIER ::= { mib-2 3 } + +ip OBJECT IDENTIFIER ::= { mib-2 4 } + +icmp OBJECT IDENTIFIER ::= { mib-2 5 } + +tcp OBJECT IDENTIFIER ::= { mib-2 6 } + +udp OBJECT IDENTIFIER ::= { mib-2 7 } + +egp OBJECT IDENTIFIER ::= { mib-2 8 } + +-- historical (some say hysterical) +-- cmot OBJECT IDENTIFIER ::= { mib-2 9 } + +transmission OBJECT IDENTIFIER ::= { mib-2 10 } + +snmp OBJECT IDENTIFIER ::= { mib-2 11 } + + +-- the System group + +-- Implementation of the System group is mandatory for all +-- systems. If an agent is not configured to have a value +-- for any of these variables, a string of length 0 is +-- returned. + + +IfEntry ::= + SEQUENCE { + ifIndex + INTEGER, + + ifDescr + DisplayString, + ifType + INTEGER, + ifMtu + INTEGER, + ifSpeed + Gauge, + ifPhysAddress + PhysAddress, + ifAdminStatus + INTEGER, + ifOperStatus + INTEGER, + ifLastChange + TimeTicks, + ifInOctets + Counter, + ifInUcastPkts + Counter, + ifInNUcastPkts + Counter, + ifInDiscards + Counter, + ifInErrors + Counter, + ifInUnknownProtos + Counter, + ifOutOctets + Counter, + ifOutUcastPkts + Counter, + ifOutNUcastPkts + Counter, + ifOutDiscards + Counter, + ifOutErrors + Counter, + ifOutQLen + Gauge, + ifSpecific + OBJECT IDENTIFIER + } + + +-- the Address Translation group + +-- Implementation of the Address Translation group is +-- mandatory for all systems. Note however that this group +-- is deprecated by MIB-II. That is, it is being included + +-- solely for compatibility with MIB-I nodes, and will most +-- likely be excluded from MIB-III nodes. From MIB-II and +-- onwards, each network protocol group contains its own +-- address translation tables. + +-- The Address Translation group contains one table which is +-- the union across all interfaces of the translation tables +-- for converting a NetworkAddress (e.g., an IP address) into +-- a subnetwork-specific address. For lack of a better term, +-- this document refers to such a subnetwork-specific address +-- as a `physical' address. + +-- Examples of such translation tables are: for broadcast +-- media where ARP is in use, the translation table is +-- equivalent to the ARP cache; or, on an X.25 network where +-- non-algorithmic translation to X.121 addresses is +-- required, the translation table contains the +-- NetworkAddress to X.121 address equivalences. + + +AtEntry ::= + SEQUENCE { + atIfIndex + INTEGER, + + atPhysAddress + PhysAddress, + atNetAddress + NetworkAddress + } + + + + + +-- the IP address table + +-- The IP address table contains this entity's IP addressing +-- information. + + +IpAddrEntry ::= + SEQUENCE { + ipAdEntAddr + IpAddress, + ipAdEntIfIndex + INTEGER, + ipAdEntNetMask + IpAddress, + ipAdEntBcastAddr + INTEGER, + ipAdEntReasmMaxSize + INTEGER (0..65535) + } + + +IpRouteEntry ::= + SEQUENCE { + ipRouteDest + IpAddress, + ipRouteIfIndex + INTEGER, + ipRouteMetric1 + INTEGER, + ipRouteMetric2 + INTEGER, + ipRouteMetric3 + INTEGER, + ipRouteMetric4 + INTEGER, + ipRouteNextHop + IpAddress, + ipRouteType + INTEGER, + ipRouteProto + INTEGER, + ipRouteAge + INTEGER, + ipRouteMask + IpAddress, + ipRouteMetric5 + INTEGER, + + ipRouteInfo + OBJECT IDENTIFIER + } + + +IpNetToMediaEntry ::= + SEQUENCE { + ipNetToMediaIfIndex + INTEGER, + ipNetToMediaPhysAddress + PhysAddress, + ipNetToMediaNetAddress + IpAddress, + ipNetToMediaType + INTEGER + } + + + +TcpConnEntry ::= + SEQUENCE { + tcpConnState + INTEGER, + tcpConnLocalAddress + IpAddress, + tcpConnLocalPort + INTEGER (0..65535), + tcpConnRemAddress + IpAddress, + tcpConnRemPort + INTEGER (0..65535) + } + + +UdpEntry ::= + SEQUENCE { + udpLocalAddress + IpAddress, + udpLocalPort + INTEGER (0..65535) + } + + + +-- the EGP Neighbor table + +-- The EGP neighbor table contains information about this +-- entity's EGP neighbors. + + +EgpNeighEntry ::= + SEQUENCE { + egpNeighState + INTEGER, + egpNeighAddr + IpAddress, + egpNeighAs + INTEGER, + egpNeighInMsgs + Counter, + egpNeighInErrs + Counter, + egpNeighOutMsgs + Counter, + egpNeighOutErrs + Counter, + + egpNeighInErrMsgs + Counter, + egpNeighOutErrMsgs + Counter, + egpNeighStateUps + Counter, + egpNeighStateDowns + Counter, + egpNeighIntervalHello + INTEGER, + egpNeighIntervalPoll + INTEGER, + egpNeighMode + INTEGER, + egpNeighEventTrigger + INTEGER + } + + + +-- the Transmission group + +-- Based on the transmission media underlying each interface +-- on a system, the corresponding portion of the Transmission +-- group is mandatory for that system. + +-- When Internet-standard definitions for managing +-- transmission media are defined, the transmission group is +-- used to provide a prefix for the names of those objects. + +-- Typically, such definitions reside in the experimental +-- portion of the MIB until they are "proven", then as a +-- part of the Internet standardization process, the +-- definitions are accordingly elevated and a new object +-- identifier, under the transmission group is defined. By +-- convention, the name assigned is: +-- +-- type OBJECT IDENTIFIER ::= { transmission number } +-- +-- where "type" is the symbolic value used for the media in +-- the ifType column of the ifTable object, and "number" is +-- the actual integer value corresponding to the symbol. + + +-- the SNMP group + +-- Implementation of the SNMP group is mandatory for all +-- systems which support an SNMP protocol entity. Some of +-- the objects defined below will be zero-valued in those +-- SNMP implementations that are optimized to support only +-- those functions specific to either a management agent or +-- a management station. In particular, it should be +-- observed that the objects below refer to an SNMP entity, +-- and there may be several SNMP entities residing on a +-- managed node (e.g., if the node is hosting acting as +-- a management station). + + +END diff --git a/stglibs/smux.lib/SMUX.asn1 b/stglibs/smux.lib/SMUX.asn1 new file mode 100644 index 00000000..af7748fd --- /dev/null +++ b/stglibs/smux.lib/SMUX.asn1 @@ -0,0 +1,122 @@ + +-- WinAgents MIB Extraction Wizard +-- Extracted from rfc1227.txt 16.03.2005 20:20:14 + +SMUX DEFINITIONS ::= BEGIN + +IMPORTS + ObjectName + FROM RFC1155-SMI + DisplayString + FROM RFC1213-MIB + + PDUs + FROM RFC1157-SNMP; + + +-- tags for SMUX-specific PDUs are application-wide to +-- avoid conflict with tags for current (and future) +-- SNMP-generic PDUs + +SMUX-PDUs ::= + CHOICE { + open -- SMUX peer uses + OpenPDU, -- immediately after TCP open + + close -- either uses immediately before TCP close + ClosePDU, + + registerRequest -- SMUX peer uses + RReqPDU, + + registerResponse -- SNMP agent uses + RRspPDU, + + PDUs, -- note that roles are reversed: + -- SNMP agent does get/get-next/set + -- SMUX peer does get-response/trap + + commitOrRollback -- SNMP agent uses + SOutPDU + } + + +-- open PDU +-- currently only simple authentication + +OpenPDU ::= + CHOICE { + simple + + SimpleOpen + } + +SimpleOpen ::= + [APPLICATION 0] IMPLICIT + SEQUENCE { + version -- of SMUX protocol + INTEGER { + version-1(0) + }, + + identity -- of SMUX peer, authoritative + OBJECT IDENTIFIER, + + description -- of SMUX peer, implementation-specific + DisplayString, + + password -- zero length indicates no authentication + OCTET STRING + } + + +-- close PDU + +ClosePDU ::= + [APPLICATION 1] IMPLICIT + INTEGER { + goingDown(0), + unsupportedVersion(1), + packetFormat(2), + protocolError(3), + internalError(4), + authenticationFailure(5) + } + + +-- insert PDU + +RReqPDU ::= + [APPLICATION 2] IMPLICIT + SEQUENCE { + subtree + ObjectName, + + priority -- the lower the better, "-1" means default + INTEGER (-1..2147483647), + + operation + + INTEGER { + delete(0), -- remove registration + readOnly(1), -- add registration, objects are RO + readWrite(2) -- .., objects are RW + } + } + +RRspPDU ::= + [APPLICATION 3] IMPLICIT + INTEGER { + failure(-1) + + -- on success the non-negative priority is returned + } + +SOutPDU ::= + [APPLICATION 4] IMPLICIT + INTEGER { + commit(0), + rollback(1) + } + +END \ No newline at end of file