-- Copyright (C) 2008-2012 by Zhone Technologies.  All Rights Reserved.

-- ======================================================================
-- ==                                                                  ==
-- ==                      ZHN-PW MIB                                  ==
-- ==                                                                  ==
-- ==  Copyright (C) 2008-2012 Zhone Technologies, Inc.                ==
-- ==  Confidential, Unpublished Property of Zhone Technologies.       ==
-- ==  Rights Reserved Under the Copyright Laws of the United States.  ==
-- ==                                                                  ==
-- ======================================================================
   
   
ZHNPWMIB DEFINITIONS ::= BEGIN

IMPORTS
     NOTIFICATION-TYPE, MODULE-IDENTITY, OBJECT-TYPE,
     Integer32, Unsigned32, Counter32, Counter64, TimeTicks,
     transmission, IpAddress
        FROM SNMPv2-SMI                    -- [RFC2578]

     MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
        FROM SNMPv2-CONF                   -- [RFC2580]

     TruthValue, RowStatus, StorageType, MacAddress, DisplayString,
     TimeStamp
        FROM SNMPv2-TC                     -- [RFC2579]

     SnmpAdminString
        FROM SNMP-FRAMEWORK-MIB            -- [RFC3411]

     InetAddressType, InetAddress
        FROM INET-ADDRESS-MIB              -- [RFC4001]

     PwIndexType, PwIndexOrZeroType, PwVlanCfg
        FROM PW-TC-STD-MIB                 -- [PWTC]
  -- RFC Editor: Please replace [PWTC] with RFC number and remove this
  -- note.

     IANAPwTypeTC, IANAPwPsnTypeTC, IANAPwCapabilities
        FROM IANA-PWE3-MIB                 -- Reference will be added
                                           -- When IANA will create the
                                           -- MIB module
    zhoneWtn
         FROM Zhone
  ;


zhnPwMib MODULE-IDENTITY
    LAST-UPDATED "201205161200Z"  -- May 16, 2012
    ORGANIZATION "Zhone Technologies"
    CONTACT-INFO 
        "Zhone Technologies, Inc.
         Florida Design Center
         8545 126th Avenue North
         Largo, FL 33773

	 Toll-Free: +1 877-ZHONE20 (+1 877-946-6320)
	 Tel: +1-510-777-7000
	 Fax: +1-510-777-7001
	 E-mail: support@zhone.com"

    DESCRIPTION
        "This is the Zhone Enterprise MIB module for the Configuration 
         of Zhone Proprietary Pseudo-Wire Interfaces."

    REVISION "201205161200Z"  -- May 16, 2012 at 12:00 GMT
	DESCRIPTION "Removed comma in the end of the last line of the enum definitions."
    
    REVISION "201201271200Z"  -- Jan 27, 2012
    DESCRIPTION "Added new PWE table objects:
                   zhnPwClkAcquisitionLevel
                   zhnPwClearTotalStats
                "

    REVISION "201108290000Z"  -- Aug 29, 2011
    DESCRIPTION "Added new PWE table objects:
                   zhnPwActualPayloadSize
		   zhnPwRxRaiAction
		   zhnPwRxAisAction
		   zhnPwLopAction
		   zhnPwAdaptState
		   zhnPwAdaptTime
		   zhnPwIsdn
		   zhnPwOuterLabel
    
                And, added new PWE scalar objects:
                   zhnPwRtpHeaderMode
		   zhnPwAdaptPllMode
		   zhnPwAutoAdclEnable
		   zhnPwAdaptSourceActual
		   zhnPwSourceIPAddr
		   zhnPwSourceIPMask
		   zhnPwSourceGateway
		   zhnPwUdpDstPort
		   zhnPwT1E1Mode
                   zhnPeerPingName
                   zhnPeerPingRequest
                   zhnPeerPingStatus
                "

    REVISION "200811060000Z"  -- Nov 6, 2008
    DESCRIPTION "Initial release."


::=  { zhoneWtn 31 } 


PwClearStatisticsTC ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "Indicates the action to perform on statistics counters.
            - noAction(0):      No action.
            - clear(1):         Clear the statistics counters.
        "
    SYNTAX   INTEGER {
        noAction(0),
        clear(1)
    }



zhnPwNotifications OBJECT IDENTIFIER ::= { zhnPwMib 0 }
zhnPwObjects       OBJECT IDENTIFIER ::= { zhnPwMib 1 }
zhnPwConformance   OBJECT IDENTIFIER ::= { zhnPwMib 2 }


-- ***************************************************************
--    Zhone Enterprise PW Configuration Table
-- ***************************************************************

-- 1.3.6.1.4.1.5504.2.5.31.1.1
zhnPwTable OBJECT-TYPE
       SYNTAX  SEQUENCE OF ZhnPwEntry
       MAX-ACCESS  not-accessible
       STATUS  current
       DESCRIPTION
               "This table contains the Zhone Proprietary 
                Pseudo-Wire interface information."
       ::= { zhnPwObjects 1 }

zhnPwEntry OBJECT-TYPE
       SYNTAX  ZhnPwEntry
       MAX-ACCESS  not-accessible
       STATUS  current
       DESCRIPTION
          "A row in this table represents a pseudowire (PW) virtual
           connection across a packet network. It is indexed by
           pwIndex, which uniquely identifies a singular
           connection.
           A row is only created when an entry in the PW-STD-MIB pwTable
           is created and includes adjunct information to the pwTable."
       INDEX   { zhnPwIndex }
       ::= { zhnPwTable 1 }


ZhnPwEntry ::=
       SEQUENCE {
          zhnPwIndex               PwIndexType,
          zhnPwVlanID              PwVlanCfg,
          zhnPwVlanPriority        Unsigned32,
          zhnPwPeerMask            IpAddress,
	  zhnPwPeerGateway         IpAddress,
          zhnPwPeerMAC             MacAddress,
          zhnPwMappedIfName        SnmpAdminString,
          zhnPwLocalLMBits         INTEGER,
          zhnPwLocalRBit           INTEGER,
          zhnPwRemoteLMBits        INTEGER,
          zhnPwRemoteRBit          INTEGER,
          zhnPwPeerMACMode         INTEGER,
          zhnPwActualPayloadSize   Unsigned32,
          zhnPwRxRaiAction         INTEGER,
          zhnPwRxAisAction         INTEGER,
          zhnPwLopAction           INTEGER,
          zhnPwAdaptState          INTEGER,
          zhnPwAdaptTime           INTEGER,
          zhnPwIsdn                INTEGER,
          zhnPwOuterLabel          Unsigned32,
          zhnPwClkAcquisitionLevel Unsigned32,
          zhnPwClearTotalStats     PwClearStatisticsTC

       }


  zhnPwIndex OBJECT-TYPE
     SYNTAX        PwIndexType
     MAX-ACCESS    not-accessible
     STATUS        current
     DESCRIPTION
         "A unique index for the conceptual row identifying a PW within
          this table."
     ::= { zhnPwEntry 1 }

  zhnPwVlanID OBJECT-TYPE
     SYNTAX        PwVlanCfg
     MAX-ACCESS    read-create
     STATUS        current
     DESCRIPTION
         "The VLAN ID which this PW is mapped to. If the value is
          zero, the VLAN is untagged. "
     DEFVAL { 0 }
     ::= { zhnPwEntry 2 }

  zhnPwVlanPriority OBJECT-TYPE
     SYNTAX        Unsigned32 (0..7)
     MAX-ACCESS    read-create
     STATUS        current
     DESCRIPTION
         "The VLAN priority."
     DEFVAL { 0 }
     ::= { zhnPwEntry 3 }

  zhnPwPeerMask OBJECT-TYPE
     SYNTAX        IpAddress
     MAX-ACCESS    read-create
     STATUS        current
     DESCRIPTION
          "This object contains the subnet mask for the peer.
	   This object is required if the Peer Type is IPv4."
     ::= { zhnPwEntry 4 }

  zhnPwPeerGateway OBJECT-TYPE
     SYNTAX        IpAddress
     MAX-ACCESS    read-create
     STATUS        current
     DESCRIPTION
          "This object contains the gateway address for the peer.
	   This object is required if the Peer Type is IPv4."
     ::= { zhnPwEntry 5 }

  zhnPwPeerMAC OBJECT-TYPE
     SYNTAX        MacAddress
     MAX-ACCESS    read-create
     STATUS        current
     DESCRIPTION
          "This object contains the MAC address for the peer."
     ::= { zhnPwEntry 6 }

  zhnPwMappedIfName  OBJECT-TYPE
     SYNTAX        SnmpAdminString
     MAX-ACCESS    read-create
     STATUS        current
     DESCRIPTION
          "The name of the interface mapped to this PW. If the PW is a
           structure-agnostic (i.e. SATOP) connection, the interface
           name should be that of a T1/E1 port. It the PW is a 
           structure-aware connection, the interface name should be
           that of a DS0 Bundle."
     ::= { zhnPwEntry 7 }

  zhnPwLocalLMBits OBJECT-TYPE
     SYNTAX        INTEGER {
            noDefect (0),
            reserved1 (1),
            rxRDI (2),
            nonTDMData (3),
            txAIS (4),
            reserved2 (5),
            reserved3 (6),
            reserved4 (7)
     }
     MAX-ACCESS    read-only
     STATUS        current
     DESCRIPTION
          "Indicates the value of the Local TDM Failure (L-Bit) and
           the Modifier bits (M-bits) currently transmitted.
           Refer to RFC 5086 for more information on the L/M bits."
     ::= { zhnPwEntry 8 }

  zhnPwLocalRBit OBJECT-TYPE
     SYNTAX        INTEGER {
            on (1),
            off (2)
     }
     MAX-ACCESS    read-only
     STATUS        current
     DESCRIPTION
          "Indicates the value of the Remote Loss of Frames indication 
           (R-Bit) currently transmitted."
     ::= { zhnPwEntry 9 }

  zhnPwRemoteLMBits OBJECT-TYPE
     SYNTAX        INTEGER {
            noDefect (0),
            reserved1 (1),
            rxRDI (2),
            nonTDMData (3),
            txAIS (4),
            reserved2 (5),
            reserved3 (6),
            reserved4 (7)
     }
     MAX-ACCESS    read-only
     STATUS        current
     DESCRIPTION
          "Indicates the value of the Local Failure (L-Bit) and
           the Modifier bits (M-bits) currently received.
           Refer to RFC 5086 for more information on the L/M bits."
     ::= { zhnPwEntry 10 }

  zhnPwRemoteRBit OBJECT-TYPE
     SYNTAX        INTEGER {
            on (1),
            off (2)
     }
     MAX-ACCESS    read-only
     STATUS        current
     DESCRIPTION
          "Indicates the value of the Remote Loss of Frames indication 
           (R-Bit) currently received."
     ::= { zhnPwEntry 11 }

  zhnPwPeerMACMode OBJECT-TYPE
     SYNTAX INTEGER {
            dynamic(1),
            static(2)
     }
     MAX-ACCESS  read-write
     STATUS      current
     DESCRIPTION 
          "Setting this object to dynamic(1) will cause PW to ARP 
           for the MAC address of the peer node. If the value of 
           this object is static(2), the peer MAC address is the
           value of object pwPeerMAC."
     ::= { zhnPwEntry 12 }

  zhnPwActualPayloadSize OBJECT-TYPE
     SYNTAX        Unsigned32 (0..65535)
     MAX-ACCESS    read-only
     STATUS        current
     DESCRIPTION
         "The value of this object indicates the actual PayLoad Size (in bytes)."
     ::= { zhnPwEntry 13 }

  zhnPwRxRaiAction OBJECT-TYPE
     SYNTAX        INTEGER {
            none (1),
            txAIS (2),
            txRAI (3),
            txChlIdle (4)
     }
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "Indicates the action to be taken upon when receiving L,M bits equal 
	  to  0,10 (rxRAI). When set to none (1), the payload will be transmitted 
	  as it was received. When set to txAIS (2), the AIS pattern will be transmitted
	  towards the local CE. When set to txRAI (3), the RAI pattern will be 
	  transmitted towards the local CE. When set to txChlIdle (4), the Channel Idle
	  signal will be transmitted towards the local CE."
     ::= { zhnPwEntry 14 }

  zhnPwRxAisAction OBJECT-TYPE
     SYNTAX        INTEGER {
            none (1),
            txAIS (2),
            txRAI (3),
            txChlIdle (4)
     }
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "Indicates the action to be taken upon when receiving L,M bits equal 
	  to 1,00 (rxAIS). When set to none (1), the payload will be transmitted 
	  as it was received. When set to txAIS (2), the AIS pattern will be transmitted
	  towards the local CE. When set to txRAI (3), the RAI pattern will be 
	  transmitted towards the local CE. When set to txChlIdle (4), the Channel Idle
	  signal will be transmitted towards the local CE. "
     ::= { zhnPwEntry 15 }

  zhnPwLopAction OBJECT-TYPE
     SYNTAX        INTEGER {
            none (1),
            txAIS (2),
            txRAI (3),
            txChlIdle (4)
     }
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "Indicates the action to be taken while in a Loss or Packets state.
	  When set to none (1), the payload will be transmitted as it was received. 
	  When set to txAIS (2), the AIS pattern will be transmitted towards the 
	  local CE. When set to txRAI (3), the RAI pattern will be transmitted 
	  towards the local CE. When set to txChlIdle (4), the Channel Idle signal 
	  will be transmitted towards the local CE."
     ::= { zhnPwEntry 16 }

  zhnPwAdaptState OBJECT-TYPE
     SYNTAX        INTEGER {
            idle (1),
            acquisition (2),
            tracking1 (3),
            tracking2 (4),
            locked (5),
            recovery (6),
            restart (7),
            disabled (8)
     }
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "Indicates the current adaptive state. The only value that can be written
	  for this object is restart (7), which will restart clock adaption on the port 
	  associated with the bundle."
     ::= { zhnPwEntry 17 }

  zhnPwAdaptTime OBJECT-TYPE
     SYNTAX        INTEGER (1..2147483647)
     MAX-ACCESS    read-only
     STATUS        current
     DESCRIPTION
          "Indicates the current adaptive timestamp."
     ::= { zhnPwEntry 18 }

  zhnPwIsdn OBJECT-TYPE
     SYNTAX        INTEGER {
            disabled (1),
            lt (2),
            nt1 (3)
     }
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "Indicates the endpoint is of IDSN type as defined in ETS 300 233.
	   When Idsn type is set to disabled (1), the payload is transmitted as 
	   it was received. When set to lt (2), the Line Termination unit is 
	   connected to the Terminal Equipment. When set to nt1 (3), the Network 
	   Termination unit connected to the Exchange Equipment."
     ::= { zhnPwEntry 19 }

  zhnPwOuterLabel OBJECT-TYPE
     SYNTAX        Unsigned32 (0..65535)
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
         "The value of this object is the MPLS 20-bit outer tag. This 
	  object is only applicable for MPLS PW connections."
     ::= { zhnPwEntry 20 }

  zhnPwClkAcquisitionLevel OBJECT-TYPE
     SYNTAX        Unsigned32 (0..15)
     MAX-ACCESS    read-only
     STATUS        current
     DESCRIPTION
         "The PLL clock acquisition level from 0 - 15. Level 8 or higher is required 
	  for reliable operation. During the clock acquisition process, the Phase Lock 
	  Loop moves through 16 adjustment levels. Level 0 is the starting phase, with 
	  very coarse adjustments. Level 15 is the final phase, with very fine adjustment. 
	  Once level 8 has been reached, the acquired clock is highly accurate.
	  This object is also referred to as the PWE Adaptive Clock Counter."
     ::= { zhnPwEntry 21 }

  zhnPwClearTotalStats OBJECT-TYPE
     SYNTAX        PwClearStatisticsTC
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
         "This object can be used to clear all PWE total statistics counters, contained 
	  in the pwPerfTotalTable and defined in the PW-STD mib."
     ::= { zhnPwEntry 22 }




  zhnPwRtpHeaderMode OBJECT-TYPE
      SYNTAX         INTEGER {
             enable(1),      
             disable(2)     
      }
      MAX-ACCESS    read-write
      STATUS        current
      DESCRIPTION 
          "Enable or disable the transmission of a RTP header mode for all 
	  Pseudo-wire connections.  Note, the configuration must be saved and 
	  the system rebooted for this item to take effect."
      ::= { zhnPwObjects 2 }

  zhnPwAdaptPllMode OBJECT-TYPE
      SYNTAX        INTEGER {
             normal(1),      
             fine(2)    
      }
      MAX-ACCESS    read-write
      STATUS        current
      DESCRIPTION 
          "Configure the accuracy of the recovered clock for all Pseudo-wire connections.
           Note, configuration must be saved and system rebooted for this item to take
           effect. When set to normal(1), the system will support reliable timing recovery 
           in networks with occasional packet delay variation and packet loss.  This is the 
           recommended mode of operation. When set to fine(2), the accuracy of the recovered
           clock will be slightly higher than normal(1) mode, but during the clock recovery
           phase the network must be stable and predictable and requires pristine network 
           conditions during timing acquisition."
      ::= { zhnPwObjects 3 }

  zhnPwAutoAdclEnable OBJECT-TYPE
      SYNTAX          INTEGER {
             enable(1),      
             disable(2)    
      }
      MAX-ACCESS    read-write
      STATUS        current
      DESCRIPTION 
          "Enable or disable the ability to automatically select the first available 
           Pseudo Wire connection to use for adaptive clock recovery."
      ::= { zhnPwObjects 4 }

  zhnPwAdaptSourceActual OBJECT-TYPE
       SYNTAX        DisplayString
       MAX-ACCESS    read-only
       STATUS        current
       DESCRIPTION 
          "The actual Pseudo Wire connection in use for adaptive clock recovery 
          if automatic adaptive is disabled."
       ::= { zhnPwObjects 5 }

  zhnPwSourceIPAddr OBJECT-TYPE
     SYNTAX        IpAddress
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "This object contains the IP address for all local Pseudo Wire connections."
     ::= { zhnPwObjects 6 }

  zhnPwSourceIPMask OBJECT-TYPE
     SYNTAX        IpAddress
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "This object contains the subnet mask for all local Pseudo Wire connections."
     ::= { zhnPwObjects 7 }

  zhnPwSourceGateway OBJECT-TYPE
     SYNTAX        IpAddress
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "This object contains the gateway address for all local Pseudo Wire connections."
     ::= { zhnPwObjects 8 }

  zhnPwUdpDstPort OBJECT-TYPE
     SYNTAX        Unsigned32 (1..65535)
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "This object contains the UDP port used by the peer."
     ::= { zhnPwObjects 9 }

  zhnPwT1E1Mode OBJECT-TYPE
     SYNTAX        INTEGER {
             t1(1),      
             e1(2)
     }
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "This object identifies the DS1 mode of operation for all DS1 ports in 
	   the system."
     ::= { zhnPwObjects 10 }

  zhnPeerPingName OBJECT-TYPE
     SYNTAX        SnmpAdminString
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "This object identifies the name of the peer Pseudo Wire connection with 
	   which to initiate a ping test."
     ::= { zhnPwObjects 11 }

  zhnPeerPingRequest OBJECT-TYPE
     SYNTAX        INTEGER {
             start(1),
             stop(2),
             nop(3)   
     }
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "This object starts or stops a Pseudo Wire ping test. A valid zhnPeerPingName
	   must be configured for the ping test to be successful."
     ::= { zhnPwObjects 12 }

  zhnPeerPingStatus OBJECT-TYPE
     SYNTAX        INTEGER {
             reply(1),
             timedout(2),
             none(3),
             unconfigured(4),
             failed(5)
     }
     MAX-ACCESS    read-write
     STATUS        current
     DESCRIPTION
          "This object retrieves the status of the current or last Pseudo Wire ping 
	   test initiated by the CPE."
     ::= { zhnPwObjects 13 }



-- ****************************************************************************
--
-- Conformance Information
--

zhnPwMibConformance       OBJECT IDENTIFIER ::= { zhnPwMib 2 }

zhnPwMibGroups OBJECT IDENTIFIER ::= { zhnPwMibConformance 1}
zhnPwMibCompliances OBJECT IDENTIFIER ::= { zhnPwMibConformance 2}
 
--
-- Compliance Statements
--

zhnPwMibCompliance  MODULE-COMPLIANCE
  STATUS        current
  DESCRIPTION
        "The Compliance statement for SNMP entities which
         manage display the Zhone Pseudo-Wire Information.
	 "
  MODULE  -- this module
  MANDATORY-GROUPS {
         zhnPwMibGroup,
         zhnPwMibScalars
  }

  ::= {zhnPwMibCompliances 1}

--
-- Units of Conformance
--

zhnPwMibGroup OBJECT-GROUP
   OBJECTS {
          zhnPwVlanID,
          zhnPwVlanPriority,
          zhnPwPeerMask,
	  zhnPwPeerGateway,
          zhnPwPeerMAC,
          zhnPwMappedIfName,
          zhnPwLocalLMBits,
          zhnPwLocalRBit,
          zhnPwRemoteLMBits,
          zhnPwRemoteRBit,
          zhnPwPeerMACMode,
          zhnPwActualPayloadSize,
          zhnPwRxRaiAction,
          zhnPwRxAisAction,
          zhnPwLopAction,
          zhnPwAdaptState,
          zhnPwAdaptTime,
          zhnPwIsdn,
          zhnPwOuterLabel,
          zhnPwClkAcquisitionLevel,
          zhnPwClearTotalStats
   }
   STATUS current
   DESCRIPTION
      "A collection of Zhone Pseudo-Wire table objects that describe the 
       pseudo-wire interfaces of the device."
   ::= { zhnPwMibGroups 1}


zhnPwMibScalars OBJECT-GROUP
   OBJECTS {
          zhnPwRtpHeaderMode,
          zhnPwAdaptPllMode,
          zhnPwAutoAdclEnable,
          zhnPwAdaptSourceActual,
          zhnPwSourceIPAddr,
          zhnPwSourceIPMask,
          zhnPwSourceGateway,
          zhnPwUdpDstPort,
          zhnPwT1E1Mode,
	  zhnPeerPingName,
	  zhnPeerPingRequest,
	  zhnPeerPingStatus
   }
   STATUS current
   DESCRIPTION
      "A collection of Zhone Pseudo-Wire table scalar objects that describe the 
       pseudo-wire emulation of the device."
   ::= { zhnPwMibGroups 2}

END
