text: /*
   * Generated by confdc --mib2yang-std
   * Source: mgmt/dmi/model/common/mib-source/BGP4-MIB.mib
   */
  /*
   * This YANG module has been generated by smidump 0.5.0:
   *
   *      smidump -f yang BGP4-MIB
   *
   * Do not edit. Edit the source file instead!
   */
  
  module BGP4-MIB {
  
    namespace "urn:ietf:params:xml:ns:yang:smiv2:BGP4-MIB";
    prefix BGP4-MIB;
  
    import ietf-inet-types {
      prefix "inet";
    }
  
    import ietf-yang-smiv2 {
      prefix "smiv2";
    }
  
    import ietf-yang-types {
      prefix "yang";
    }
  
    organization
     "IETF BGP Working Group";
  
    contact
     "   John Chu  (Editor)
      Postal: IBM Corp.
              P.O.Box 218
              Yorktown Heights, NY 10598
              US
      
         Tel: +1 914 945 3156
         Fax: +1 914 945 2141
      E-mail: jychu@watson.ibm.com";
  
    description
     "The MIB module for BGP-4.";
  
    revision 1994-05-05 {
      description
       "[Revision added by libsmi due to a LAST-UPDATED clause.]";
    }
  
  
    container BGP4-MIB {
      config false;
  
      container bgp {
        smiv2:oid "1.3.6.1.2.1.15";
  
        leaf bgpVersion {
          type binary {
            length "1..255";
          }
          description
           "Vector of supported BGP protocol version
            numbers.  Each peer negotiates the version
            from this vector.  Versions are identified
            via the string of bits contained within this
            object.  The first octet contains bits 0 to
            7, the second octet contains bits 8 to 15,
            and so on, with the most significant bit
            referring to the lowest bit number in the
            octet (e.g., the MSB of the first octet
            refers to bit 0).  If a bit, i, is present
            and set, then the version (i+1) of the BGP
            is supported.";
          smiv2:max-access "read-only";
          smiv2:oid "1.3.6.1.2.1.15.1";
        }
  
        leaf bgpLocalAs {
          type int32 {
            range "0..65535";
          }
          description
           "The local autonomous system number.";
          smiv2:max-access "read-only";
          smiv2:oid "1.3.6.1.2.1.15.2";
        }
  
        leaf bgpIdentifier {
          type inet:ipv4-address;
          description
           "The BGP Identifier of local system.";
          smiv2:max-access "read-only";
          smiv2:oid "1.3.6.1.2.1.15.4";
        }
      }
  
      container bgpPeerTable {
        description
         "BGP peer table.  This table contains,
          one entry per BGP peer, information about
          the connections with BGP peers.";
        smiv2:oid "1.3.6.1.2.1.15.3";
  
        list bgpPeerEntry {
          key "bgpPeerRemoteAddr";
          description
           "Entry containing information about the
            connection with a BGP peer.";
          smiv2:oid "1.3.6.1.2.1.15.3.1";
  
          leaf bgpPeerIdentifier {
            type inet:ipv4-address;
            description
             "The BGP Identifier of this entry's BGP
              peer.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.1";
          }
  
          leaf bgpPeerState {
            type enumeration {
              enum "idle" {
                value "1";
              }
              enum "connect" {
                value "2";
              }
              enum "active" {
                value "3";
              }
              enum "opensent" {
                value "4";
              }
              enum "openconfirm" {
                value "5";
              }
              enum "established" {
                value "6";
              }
            }
            description
             "The BGP peer connection state.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.2";
          }
  
          leaf bgpPeerAdminStatus {
            type enumeration {
              enum "stop" {
                value "1";
              }
              enum "start" {
                value "2";
              }
            }
            description
             "The desired state of the BGP connection.
              A transition from 'stop' to 'start' will
              cause the BGP Start Event to be generated.
              A transition from 'start' to 'stop' will
              cause the BGP Stop Event to be generated.
              This parameter can be used to restart BGP
              peer connections.  Care should be used in
              providing write access to this object
              without adequate authentication.";
            smiv2:max-access "read-write";
            smiv2:oid "1.3.6.1.2.1.15.3.1.3";
          }
  
          leaf bgpPeerNegotiatedVersion {
            type int32;
            description
             "The negotiated version of BGP running
              between the two peers.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.4";
          }
  
          leaf bgpPeerLocalAddr {
            type inet:ipv4-address;
            description
             "The local IP address of this entry's BGP
              connection.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.5";
          }
  
          leaf bgpPeerLocalPort {
            type int32 {
              range "0..65535";
            }
            description
             "The local port for the TCP connection
              between the BGP peers.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.6";
          }
  
          leaf bgpPeerRemoteAddr {
            type inet:ipv4-address;
            description
             "The remote IP address of this entry's BGP
              peer.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.7";
          }
  
          leaf bgpPeerRemotePort {
            type int32 {
              range "0..65535";
            }
            description
             "The remote port for the TCP connection
              between the BGP peers.  Note that the
              objects bgpPeerLocalAddr,
              bgpPeerLocalPort, bgpPeerRemoteAddr and
              bgpPeerRemotePort provide the appropriate
              reference to the standard MIB TCP
              connection table.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.8";
          }
  
          leaf bgpPeerRemoteAs {
            type int32 {
              range "0..65535";
            }
            description
             "The remote autonomous system number.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.9";
          }
  
          leaf bgpPeerInUpdates {
            type yang:counter32;
            description
             "The number of BGP UPDATE messages
              received on this connection.  This object
              should be initialized to zero (0) when the
              connection is established.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.10";
          }
  
          leaf bgpPeerOutUpdates {
            type yang:counter32;
            description
             "The number of BGP UPDATE messages
              transmitted on this connection.  This
              object should be initialized to zero (0)
              when the connection is established.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.11";
          }
  
          leaf bgpPeerInTotalMessages {
            type yang:counter32;
            description
             "The total number of messages received
              from the remote peer on this connection.
              This object should be initialized to zero
              when the connection is established.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.12";
          }
  
          leaf bgpPeerOutTotalMessages {
            type yang:counter32;
            description
             "The total number of messages transmitted to
              the remote peer on this connection.  This
              object should be initialized to zero when
              the connection is established.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.13";
          }
  
          leaf bgpPeerLastError {
            type binary {
              length "2";
            }
            description
             "The last error code and subcode seen by this
              peer on this connection.  If no error has
              occurred, this field is zero.  Otherwise, the
              first byte of this two byte OCTET STRING
              contains the error code, and the second byte
              contains the subcode.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.14";
          }
  
          leaf bgpPeerFsmEstablishedTransitions {
            type yang:counter32;
            description
             "The total number of times the BGP FSM
              transitioned into the established state.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.15";
          }
  
          leaf bgpPeerFsmEstablishedTime {
            type yang:gauge32;
            description
             "This timer indicates how long (in
              seconds) this peer has been in the
              Established state or how long
              since this peer was last in the
              Established state.  It is set to zero when
              a new peer is configured or the router is
              booted.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.16";
          }
  
          leaf bgpPeerConnectRetryInterval {
            type int32 {
              range "1..65535";
            }
            description
             "Time interval in seconds for the
              ConnectRetry timer.  The suggested value
              for this timer is 120 seconds.";
            smiv2:max-access "read-write";
            smiv2:oid "1.3.6.1.2.1.15.3.1.17";
          }
  
          leaf bgpPeerHoldTime {
            type int32 {
              range "0|3..65535";
            }
            description
             "Time interval in seconds for the Hold
              Timer established with the peer.  The
              value of this object is calculated by this
              BGP speaker by using the smaller of the
              value in bgpPeerHoldTimeConfigured and the
              Hold Time received in the OPEN message.
              This value must be at lease three seconds
              if it is not zero (0) in which case the
              Hold Timer has not been established with
              the peer, or, the value of
              bgpPeerHoldTimeConfigured is zero (0).";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.18";
          }
  
          leaf bgpPeerKeepAlive {
            type int32 {
              range "0..21845";
            }
            description
             "Time interval in seconds for the KeepAlive
              timer established with the peer.  The value
              of this object is calculated by this BGP
              speaker such that, when compared with
              bgpPeerHoldTime, it has the same
              proportion as what
              bgpPeerKeepAliveConfigured has when
              compared with bgpPeerHoldTimeConfigured.
              If the value of this object is zero (0),
              it indicates that the KeepAlive timer has
              not been established with the peer, or,
              the value of bgpPeerKeepAliveConfigured is
              zero (0).";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.19";
          }
  
          leaf bgpPeerHoldTimeConfigured {
            type int32 {
              range "0|3..65535";
            }
            description
             "Time interval in seconds for the Hold Time
              configured for this BGP speaker with this
              peer.  This value is placed in an OPEN
              message sent to this peer by this BGP
              speaker, and is compared with the Hold
              Time field in an OPEN message received
              from the peer when determining the Hold
              Time (bgpPeerHoldTime) with the peer.
              This value must not be less than three
              seconds if it is not zero (0) in which
              case the Hold Time is NOT to be
              established with the peer.  The suggested
              value for this timer is 90 seconds.";
            smiv2:max-access "read-write";
            smiv2:oid "1.3.6.1.2.1.15.3.1.20";
          }
  
          leaf bgpPeerKeepAliveConfigured {
            type int32 {
              range "0..21845";
            }
            description
             "Time interval in seconds for the
              KeepAlive timer configured for this BGP
              speaker with this peer.  The value of this
              object will only determine the
              KEEPALIVE messages' frequency relative to
              the value specified in
              bgpPeerHoldTimeConfigured; the actual
              time interval for the KEEPALIVE messages
              is indicated by bgpPeerKeepAlive.  A
              reasonable maximum value for this timer
              would be configured to be one
              third of that of
              bgpPeerHoldTimeConfigured.
              If the value of this object is zero (0),
              no periodical KEEPALIVE messages are sent
              to the peer after the BGP connection has
              been established.  The suggested value for
              this timer is 30 seconds.";
            smiv2:max-access "read-write";
            smiv2:oid "1.3.6.1.2.1.15.3.1.21";
          }
  
          leaf bgpPeerMinASOriginationInterval {
            type int32 {
              range "1..65535";
            }
            description
             "Time interval in seconds for the
              MinASOriginationInterval timer.
              The suggested value for this timer is 15
              seconds.";
            smiv2:max-access "read-write";
            smiv2:oid "1.3.6.1.2.1.15.3.1.22";
          }
  
          leaf bgpPeerMinRouteAdvertisementInterval {
            type int32 {
              range "1..65535";
            }
            description
             "Time interval in seconds for the
              MinRouteAdvertisementInterval timer.
              The suggested value for this timer is 30
              seconds.";
            smiv2:max-access "read-write";
            smiv2:oid "1.3.6.1.2.1.15.3.1.23";
          }
  
          leaf bgpPeerInUpdateElapsedTime {
            type yang:gauge32;
            description
             "Elapsed time in seconds since the last BGP
              UPDATE message was received from the peer.
              Each time bgpPeerInUpdates is incremented,
              the value of this object is set to zero
              (0).";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.3.1.24";
          }
        }
      }
  
      container bgpRcvdPathAttrTable {
        status obsolete;
        description
         "The BGP Received Path Attribute Table
          contains information about paths to
          destination networks received from all
          peers running BGP version 3 or less.";
        smiv2:oid "1.3.6.1.2.1.15.5";
  
        list bgpPathAttrEntry {
          key "bgpPathAttrDestNetwork bgpPathAttrPeer";
          status obsolete;
          description
           "Information about a path to a network.";
          smiv2:oid "1.3.6.1.2.1.15.5.1";
  
          leaf bgpPathAttrPeer {
            type inet:ipv4-address;
            status obsolete;
            description
             "The IP address of the peer where the path
              information was learned.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.5.1.1";
          }
  
          leaf bgpPathAttrDestNetwork {
            type inet:ipv4-address;
            status obsolete;
            description
             "The address of the destination network.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.5.1.2";
          }
  
          leaf bgpPathAttrOrigin {
            type enumeration {
              enum "igp" {
                value "1";
              }
              enum "egp" {
                value "2";
              }
              enum "incomplete" {
                value "3";
              }
            }
            status obsolete;
            description
             "The ultimate origin of the path information.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.5.1.3";
          }
  
          leaf bgpPathAttrASPath {
            type binary {
              length "2..255";
            }
            status obsolete;
            description
             "The set of ASs that must be traversed to
              reach the network.  This object is
              probably best represented as SEQUENCE OF
              INTEGER.  For SMI compatibility, though,
              it is represented as OCTET STRING.  Each
              AS is represented as a pair of octets
              according to the following algorithm:
              
                  first-byte-of-pair = ASNumber / 256;
                  second-byte-of-pair = ASNumber & 255;";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.5.1.4";
          }
  
          leaf bgpPathAttrNextHop {
            type inet:ipv4-address;
            status obsolete;
            description
             "The address of the border router that
              should be used for the destination
              network.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.5.1.5";
          }
  
          leaf bgpPathAttrInterASMetric {
            type int32;
            status obsolete;
            description
             "The optional inter-AS metric.  If this
              attribute has not been provided for this
              route, the value for this object is 0.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.5.1.6";
          }
        }
      }
  
      container bgp4PathAttrTable {
        description
         "The BGP-4 Received Path Attribute Table
          contains information about paths to
          destination networks received from all
          BGP4 peers.";
        smiv2:oid "1.3.6.1.2.1.15.6";
  
        list bgp4PathAttrEntry {
          key "bgp4PathAttrIpAddrPrefix bgp4PathAttrIpAddrPrefixLen bgp4PathAttrPeer";
          description
           "Information about a path to a network.";
          smiv2:oid "1.3.6.1.2.1.15.6.1";
  
          leaf bgp4PathAttrPeer {
            type inet:ipv4-address;
            description
             "The IP address of the peer where the path
              information was learned.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.1";
          }
  
          leaf bgp4PathAttrIpAddrPrefixLen {
            type int32 {
              range "0..32";
            }
            description
             "Length in bits of the IP address prefix
              in the Network Layer Reachability
              Information field.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.2";
          }
  
          leaf bgp4PathAttrIpAddrPrefix {
            type inet:ipv4-address;
            description
             "An IP address prefix in the Network Layer
              Reachability Information field.  This object
              is an IP address containing the prefix with
              length specified by
              bgp4PathAttrIpAddrPrefixLen.
              Any bits beyond the length specified by
              bgp4PathAttrIpAddrPrefixLen are zeroed.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.3";
          }
  
          leaf bgp4PathAttrOrigin {
            type enumeration {
              enum "igp" {
                value "1";
              }
              enum "egp" {
                value "2";
              }
              enum "incomplete" {
                value "3";
              }
            }
            description
             "The ultimate origin of the path
              information.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.4";
          }
  
          leaf bgp4PathAttrASPathSegment {
            type binary {
              length "2..255";
            }
            description
             "The sequence of AS path segments.  Each AS
              path segment is represented by a triple
              <type, length, value>.
              
              The type is a 1-octet field which has two
              possible values:
                   1      AS_SET: unordered set of ASs a
                               route in the UPDATE
                               message has traversed
                   2      AS_SEQUENCE: ordered set of ASs
                               a route in the UPDATE
                               message has traversed.
              
              The length is a 1-octet field containing the
              number of ASs in the value field.
              
              The value field contains one or more AS
              numbers, each AS is represented in the octet
              string as a pair of octets according to the
              following algorithm:
              
                  first-byte-of-pair = ASNumber / 256;
                  second-byte-of-pair = ASNumber & 255;";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.5";
          }
  
          leaf bgp4PathAttrNextHop {
            type inet:ipv4-address;
            description
             "The address of the border router that
              should be used for the destination
              network.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.6";
          }
  
          leaf bgp4PathAttrMultiExitDisc {
            type int32 {
              range "-1..2147483647";
            }
            description
             "This metric is used to discriminate
              between multiple exit points to an
              adjacent autonomous system.  A value of -1
              indicates the absence of this attribute.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.7";
          }
  
          leaf bgp4PathAttrLocalPref {
            type int32 {
              range "-1..2147483647";
            }
            description
             "The originating BGP4 speaker's degree of
              preference for an advertised route.  A
              value of -1 indicates the absence of this
              attribute.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.8";
          }
  
          leaf bgp4PathAttrAtomicAggregate {
            type enumeration {
              enum "lessSpecificRrouteNotSelected" {
                value "1";
              }
              enum "lessSpecificRouteSelected" {
                value "2";
              }
            }
            description
             "Whether or not the local system has
              selected a less specific route without
              selecting a more specific route.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.9";
          }
  
          leaf bgp4PathAttrAggregatorAS {
            type int32 {
              range "0..65535";
            }
            description
             "The AS number of the last BGP4 speaker that
              performed route aggregation.  A value of
              zero (0) indicates the absence of this
              attribute.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.10";
          }
  
          leaf bgp4PathAttrAggregatorAddr {
            type inet:ipv4-address;
            description
             "The IP address of the last BGP4 speaker
              that performed route aggregation.  A value
              of 0.0.0.0 indicates the absence of this
              attribute.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.11";
          }
  
          leaf bgp4PathAttrCalcLocalPref {
            type int32 {
              range "-1..2147483647";
            }
            description
             "The degree of preference calculated by the
              receiving BGP4 speaker for an advertised
              route.  A value of -1 indicates the
              absence of this attribute.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.12";
          }
  
          leaf bgp4PathAttrBest {
            type enumeration {
              enum "false" {
                value "1";
              }
              enum "true" {
                value "2";
              }
            }
            description
             "An indication of whether or not this route
              was chosen as the best BGP4 route.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.13";
          }
  
          leaf bgp4PathAttrUnknown {
            type binary {
              length "0..255";
            }
            description
             "One or more path attributes not understood
              by this BGP4 speaker.  Size zero (0)
              indicates the absence of such
              attribute(s).  Octets beyond the maximum
              size, if any, are not recorded by this
              object.";
            smiv2:max-access "read-only";
            smiv2:oid "1.3.6.1.2.1.15.6.1.14";
          }
        }
      }
    }
  
    notification bgpEstablished {
      description
       "The BGP Established event is generated when
        the BGP FSM enters the ESTABLISHED state.";
      smiv2:oid "1.3.6.1.2.1.15.7.1";
  
      container object-1 {
  
        leaf bgpPeerRemoteAddr {
          type leafref {
            path "/BGP4-MIB:BGP4-MIB/BGP4-MIB:bgpPeerTable/BGP4-MIB:bgpPeerEntry/BGP4-MIB:bgpPeerRemoteAddr";
          }
        }
  
        leaf bgpPeerLastError {
          type leafref {
            path "/BGP4-MIB:BGP4-MIB/BGP4-MIB:bgpPeerTable/BGP4-MIB:bgpPeerEntry/BGP4-MIB:bgpPeerLastError";
          }
        }
      }
  
      container object-2 {
  
        leaf bgpPeerRemoteAddr {
          type leafref {
            path "/BGP4-MIB:BGP4-MIB/BGP4-MIB:bgpPeerTable/BGP4-MIB:bgpPeerEntry/BGP4-MIB:bgpPeerRemoteAddr";
          }
        }
  
        leaf bgpPeerState {
          type leafref {
            path "/BGP4-MIB:BGP4-MIB/BGP4-MIB:bgpPeerTable/BGP4-MIB:bgpPeerEntry/BGP4-MIB:bgpPeerState";
          }
        }
      }
    }
  
    notification bgpBackwardTransition {
      description
       "The BGPBackwardTransition Event is generated
        when the BGP FSM moves from a higher numbered
        state to a lower numbered state.";
      smiv2:oid "1.3.6.1.2.1.15.7.2";
  
      container object-1 {
  
        leaf bgpPeerRemoteAddr {
          type leafref {
            path "/BGP4-MIB:BGP4-MIB/BGP4-MIB:bgpPeerTable/BGP4-MIB:bgpPeerEntry/BGP4-MIB:bgpPeerRemoteAddr";
          }
        }
  
        leaf bgpPeerLastError {
          type leafref {
            path "/BGP4-MIB:BGP4-MIB/BGP4-MIB:bgpPeerTable/BGP4-MIB:bgpPeerEntry/BGP4-MIB:bgpPeerLastError";
          }
        }
      }
  
      container object-2 {
  
        leaf bgpPeerRemoteAddr {
          type leafref {
            path "/BGP4-MIB:BGP4-MIB/BGP4-MIB:bgpPeerTable/BGP4-MIB:bgpPeerEntry/BGP4-MIB:bgpPeerRemoteAddr";
          }
        }
  
        leaf bgpPeerState {
          type leafref {
            path "/BGP4-MIB:BGP4-MIB/BGP4-MIB:bgpPeerTable/BGP4-MIB:bgpPeerEntry/BGP4-MIB:bgpPeerState";
          }
        }
      }
    }
  
    smiv2:alias "bgp" {
      smiv2:oid "1.3.6.1.2.1.15";
    }
  
    smiv2:alias "bgpTraps" {
      smiv2:oid "1.3.6.1.2.1.15.7";
    }
  
  }
  