   SMUX DEFINITIONS ::= BEGIN

   IMPORTS
           DisplayString, ObjectName
                   FROM RFC1155-SMI

           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
          SMUX-MIB DEFINITIONS ::= BEGIN

          IMPORTS
                  enterprises
                          FROM RFC1155-SMI
                  OBJECT-TYPE
                          FROM RFC1212;

          unix    OBJECT IDENTIFIER ::= { enterprises 4 }

          smux    OBJECT IDENTIFIER ::= { unix 4 }

          smuxPeerTable   OBJECT-TYPE
                  SYNTAX  SEQUENCE OF SmuxPeerEntry
                  ACCESS  not-accessible
                  STATUS  mandatory
                  DESCRIPTION
                      "The SMUX peer table."
                  ::= { smux 1 }

          smuxPeerEntry   OBJECT-TYPE
                  SYNTAX  SmuxPeerEntry
                  ACCESS  not-accessible
                  STATUS  mandatory
                  DESCRIPTION
                      "An entry in the SMUX peer table."
                  INDEX   { smuxPindex }
                  ::= { smuxPeerTable 1}

          SmuxPeerEntry ::=
              SEQUENCE {
                  smuxPindex
                      INTEGER,
                  smuxPidentity
                      OBJECT IDENTIFIER,
                  smuxPdescription
                      DisplayString,
                  smuxPstatus
                      INTEGER
              }

          smuxPindex      OBJECT-TYPE
                  SYNTAX  INTEGER
                  ACCESS  read-only





                  STATUS  mandatory
                  DESCRIPTION
                      "An index which uniquely identifies a SMUX peer."
                  ::= { smuxPeerEntry 1 }

          smuxPidentity   OBJECT-TYPE
                  SYNTAX  OBJECT IDENTIFIER
                  ACCESS  read-only
                  STATUS  mandatory
                  DESCRIPTION
                      "The authoritative designation for a SMUX peer."
                  ::= { smuxPeerEntry 2 }

          smuxPdescription OBJECT-TYPE
                  SYNTAX  DisplayString (SIZE (0..255))
                  ACCESS  read-only
                  STATUS  mandatory
                  DESCRIPTION
                      "A human-readable description of a SMUX peer."
                  ::= { smuxPeerEntry 3 }

          smuxPstatus     OBJECT-TYPE
                  SYNTAX  INTEGER { valid(1), invalid(2), connecting(3) }
                  ACCESS  read-write
                  STATUS  mandatory
                  DESCRIPTION
                      "The type of SMUX peer.

                      Setting this object to the value invalid(2) has
                      the effect of invaliding the corresponding entry
                      in the smuxPeerTable.  It is an implementation-
                      specific matter as to whether the agent removes an
                      invalidated entry from the table.  Accordingly,
                      management stations must be prepared to receive
                      tabular information from agents that correspond to
                      entries not currently in use.  Proper
                      interpretation of such entries requires
                      examination of the relative smuxPstatus object."
                  ::= { smuxPeerEntry 4 }

          smuxTreeTable   OBJECT-TYPE
                  SYNTAX  SEQUENCE OF SmuxTreeEntry
                  ACCESS  not-accessible
                  STATUS  mandatory
                  DESCRIPTION
                      "The SMUX tree table."
                  ::= { smux 2 }






          smuxTreeEntry   OBJECT-TYPE
                  SYNTAX  SmuxTreeEntry
                  ACCESS  not-accessible
                  STATUS  mandatory
                  DESCRIPTION
                      "An entry in the SMUX tree table."
                  INDEX   { smuxTsubtree, smuxTpriority }
                  ::= { smuxTreeTable 1}

          SmuxTreeEntry ::=
              SEQUENCE {
                  smuxTsubtree
                      OBJECT IDENTIFIER,
                  smuxTpriority
                      INTEGER,
                  smuxTindex
                      INTEGER,
                  smuxTstatus
                      INTEGER
              }

          smuxTsubtree    OBJECT-TYPE
                  SYNTAX  OBJECT IDENTIFIER
                  ACCESS  read-only
                  STATUS  mandatory
                  DESCRIPTION
                      "The MIB subtree being exported by a SMUX peer."
                  ::= { smuxTreeEntry 1 }

          smuxTpriority OBJECT-TYPE
                  SYNTAX  INTEGER (0..'07fffffff'h)
                  ACCESS  read-only
                  STATUS  mandatory
                  DESCRIPTION
                      "The SMUX peer's priority when exporting the MIB
                      subtree."
                  ::= { smuxTreeEntry 2 }

          smuxTindex OBJECT-TYPE
                  SYNTAX  INTEGER
                  ACCESS  read-only
                  STATUS  mandatory
                  DESCRIPTION
                      "The SMUX peer's identity."
                  ::= { smuxTreeEntry 3 }

          smuxTstatus     OBJECT-TYPE
                  SYNTAX  INTEGER { valid(1), invalid(2) }





                  ACCESS  read-write
                  STATUS  mandatory
                  DESCRIPTION
                      "The type of SMUX tree.

                      Setting this object to the value invalid(2) has
                      the effect of invaliding the corresponding entry
                      in the smuxTreeTable.  It is an implementation-
                      specific matter as to whether the agent removes an
                      invalidated entry from the table.  Accordingly,
                      management stations must be prepared to receive
                      tabular information from agents that correspond to
                      entries not currently in use.  Proper
                      interpretation of such entries requires
                      examination of the relative smuxTstatus object."
                  ::= { smuxTreeEntry 4 }

          END
