<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-netana-nmop-message-broker-bmp-telemetry-msg-03"
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">

  <front>
    <title abbrev="BMP YANG Network Telemetry Message">BMP YANG Model
      for Network Telemetry Messages</title>

    <seriesInfo name="Internet-Draft"
      value="draft-netana-nmop-message-broker-bmp-telemetry-msg-03" />

    <author fullname="Thomas Graf" initials="TG" surname="Graf">

      <organization>Swisscom</organization>
      <address>
        <postal>
          <street>Binzring 17</street>
          <city>Zurich</city>
          <code>8045</code>
          <country>CH</country>
        </postal>
        <email>thomas.graf@swisscom.com</email>
      </address>
    </author>

    <author fullname="Paolo Lucente" initials="PL" surname="Lucente">

      <organization>NTT</organization>
      <address>
        <postal>
          <street>Veemweg 23</street>
          <city>Barneveld</city>
          <code>3771</code>
          <country>NL</country>
        </postal>
        <email>paolo@ntt.net</email>
      </address>
    </author>

    <author fullname="Leonardo Rodoni" initials="LR" surname="Rodoni">

      <organization>Swisscom</organization>
      <address>
        <postal>
          <street>Binzring 17</street>
          <city>Zurich</city>
          <code>8045</code>
          <country>CH</country>
        </postal>
        <email>leonardo.rodoni@swisscom.com</email>
      </address>
    </author>

    <author fullname="Maxence Younsi" initials="MY" surname="Younsi">

      <organization>INSA-Lyon</organization>
      <address>
        <postal>
          <city>Lyon</city>
          <country>FR</country>
        </postal>
        <email>maxence.younsi@insa-lyon.fr</email>
      </address>
    </author>


    <date day="02" month="July" year="2026" />

    <area>General</area>
    <workgroup>NMOP</workgroup>
    <keyword>BMP</keyword>
    <keyword>BGP</keyword>
    <keyword>Data Mesh</keyword>
    <keyword>Network Telemetry</keyword>
    <keyword>Network Analytics</keyword>

    <abstract>
      <t>This document defines an BGP Monitoring Protocol (BMP) message
        schema extension in YANG to be used at data collection to
        transform Network Telemetry messages into external systems such
        as Message Brokers.</t>
    </abstract>

  </front>

  <middle>

    <section anchor="Introduction">
      <name>Introduction</name>

      <t>Nowadays network operators are using <xref
          target="RFC7854">BGP Monitoring Protocol (BMP)</xref> to
        monitor the BGP peerings and RIB's. With <xref
          target="I-D.ietf-nmop-message-broker-telemetry-message" /> a
        machine and human readable extensible Network Telemetry message
        schema in <xref target="RFC7950">YANG</xref> has been defined.</t>

      <t>Network operators organize their data in a <xref
          target="Deh22">Data Mesh</xref> where a Message Broker such as <xref
          target="Kaf11">Apache Kafka</xref> or <xref
          target="Pul16">Apache Pulsar</xref> facilitates the exchange
        of messages among data processing components.</t>

      <t>With <xref
          target="I-D.netana-nmop-yang-message-broker-message-key">YANG
        Message Keys for Message Broker Integration</xref> how
        Dimensional YANG data can be indexed and addressed in Message
        Brokers are being described.</t>

      <t>This document describes how <xref
          target="I-D.ietf-nmop-message-broker-telemetry-message" />
        defined Network Telemetry message is being extended to support
        BMP data transformation to YANG at the Network Telemetry data
        collector and being indexed and addressed in Message Broker
        based on <xref
          target="I-D.netana-nmop-yang-message-broker-message-key" />
        principles at the YANG Message Broker Producer.</t>
    </section>

    <section anchor="Conventions_and_Definitions">
      <name>Conventions and Definitions</name>

      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
        NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
        "MAY", and "OPTIONAL" in this document are to be interpreted as
        described in BCP 14 <xref target="RFC2119" />
      <xref
          target="RFC8174" /> when, and only when, they appear in all
        capitals, as shown here.</t>

      <section anchor="Terminology">
        <name>Terminology</name>

        <t>The following terms are used as defined in <xref
            target="I-D.ietf-nmop-terminology" />:</t>

        <ul>
          <li>Network Telemetry</li>

          <li>Network Analytics</li>

          <li>Value</li>

          <li>State</li>

          <li>Change</li>
        </ul>

        <t>The following terms are used as defined in <xref
            target="I-D.ietf-nmop-yang-message-broker-integration" />:</t>

        <ul>
          <li>Message Broker</li>

          <li>YANG Message Broker Producer</li>

          <li>YANG Message Broker Consumer</li>
        </ul>

        <t>The following terms are used as defined in <xref
            target="Kaf11">Apache Kafka</xref> and <xref
            target="Pul16">Apache Pulsar</xref> Message Broker:</t>

        <ul>
          <li>Subject: Is used for Messages within a Topic sharing the
            same schema tree and also to identify a unique schema tree
            within a schema registry.</li>

          <li>Topic: A communication channel for publishing and
            subscribing messages with one or more subjects and
            partitions.</li>

          <li>Topic Compaction: The act of compressing messages in a
            topic to the latest state. As used with Apache Pulsar.
            Apache Kafka uses the term Log Compaction with identical
            meaning. </li>

          <li>Partition: Messages in a topic are spread over hash
            buckets where a hash bucket refers to a partition being
            stored on one message broker node. Message ordering is
            guaranteed within a partition.</li>

          <li>Message: A piece of structured data sent between data
            processing components to facilitate communication in a
            distributed system</li>

          <li>Message Key: Message Key: Metadata associated with a
            message to facilitate deterministic hash bucketing and
            indexing for instantiated YANG data.</li>

          <li>Partition Key: Metadata associated with a message to
            facilitate deterministic hash bucketing for instantiated
            YANG data. Also known as ordering key or routing key.</li>
        </ul>

        <t>The following terms are used as defined in <xref
            target="RFC7854" />:</t>

        <ul>
          <li>BMP</li>

          <li>BMP Message</li>

          <li>Adj-RIB-In</li>

          <li>Pre-policy Adj-RIB-In</li>

          <li>Post-Policy Adj-RIB-In</li>
        </ul>

        <t>The following terms are used as defined in <xref
            target="RFC8671" />:</t>

        <ul>
          <li>Adj-RIB-Out</li>

          <li>Pre-policy Adj-RIB-Out</li>

          <li>Post-policy Adj-RIB-Out</li>
        </ul>

        <t>The following terms are used as defined in <xref
            target="RFC9069" />:</t>

        <ul>
          <li>BGP Instance</li>

          <li>Loc-RIB</li>
        </ul>

        <t>This document defines the following term:</t>

        <ul>
          <li>BMP Index: A unique identifier created depending on BMP
            Message Type from multiple BMP and BGP data dimensions. The
            BMP Index is used to generate the Message Key. See <xref
              target="BMP_Message_Keys_Indexes_Solution" />.</li>
        </ul>
      </section>
    </section>

    <section>
      <name>Relationship to other documents</name>

      <section>
        <name>Relationship to draft-ietf-nmop-message-broker-telemetry-message</name>

        <t><xref
            target="I-D.ietf-nmop-message-broker-telemetry-message" />
          defines, using the 'ietf-telemetry-message' YANG module, a
          base Network Telemetry Message schema used between <xref
            section="4.6" sectionFormat="of"
            target="I-D.ietf-nmop-yang-message-broker-integration">
          Message Broker Producer</xref> and <xref section="4.7"
            sectionFormat="of"
            target="I-D.ietf-nmop-yang-message-broker-integration">
          Message Broker Consumer</xref>, and using the
          'ietf-yang-push-telemetry-message' YANG module, an extension
          that supports YANG-Push specific subscription metadata.</t>

        <t>This document defines two BMP YANG modules <xref
            target="ietf-bmp-telemetry-message-module" />, <xref
            target="ietf-bmp-tlv-module" /> and two BGP YANG modules <xref
            target="ietf-bgp-rib-entry-module" />, <xref
            target="ietf-bgp-open-module" /> which populates the anydata
          "payload" node defined in the 'ietf-telemetry-message' YANG
          module of <xref
            target="I-D.ietf-nmop-message-broker-telemetry-message" />.</t>
      </section>

      <section>
        <name>Relationship to draft-ietf-idr-bgp-model</name>

        <t><xref target="I-D.ietf-idr-bgp-model" /> defines the
          'ietf-bgp' YANG module along with the following submodules:
          'iana-bgp-community-types', 'iana-bgp-notification',
          'iana-bgp-rib-types', 'iana-bgp-types',
          'ietf-bgp-capabilities', 'ietf-bgp-common',
          'ietf-bgp-common-multiprotocol', 'ietf-bgp-common-structure',
          'ietf-bgp-neighbor', 'ietf-bgp-policy', 'ietf-bgp-rib',
          'ietf-bgp-rib-attributes', and 'ietf-bgp-rib-tables'.</t>

        <t>This document defines two new standalone YANG modules,
          'ietf-bgp-rib-entry' and 'ietf-bgp-open', that import
          'ietf-bgp'. The 'ietf-bgp-rib-entry' module adapts the
          groupings exposed by the 'ietf-bgp-rib',
          'ietf-bgp-rib-attributes', and 'ietf-bgp-rib-tables'
          submodules and restructures them into a 'rib-entry' grouping
          that represents a single BGP RIB entry suitable for
          serialization in a Telemetry Message on a Message Broker. The
          'clear-routes' YANG grouping has been omitted since a
          Telemetry Message covers only operational metrics. The
          'ietf-bgp-open' module exposes BGP OPEN message fields for use
          in BMP Peer Up notifications.</t>

        <t>Because 'ietf-bgp-rib-attributes' and 'ietf-bgp-rib-tables'
          are YANG submodules that <xref section="7.2.2"
            sectionFormat="of" target="RFC7950">belong to</xref> the
          'ietf-bgp' main module, they cannot be imported independently.
          This document therefore, imports the full 'ietf-bgp' module,
          which includes BGP configuration and policy content that is
          not required for telemetry purposes.</t>

        <t>Once 'ietf-bgp-rib-attributes' and 'ietf-bgp-rib-tables' are
          restructured as standalone importable modules, this document
          could be simplified to import only those specific modules
          rather than the entire 'ietf-bgp' and its submodules. Such a
					change requires coordination with the <xref
					target="I-D.ietf-idr-bgp-model" /> authors on an appropriate
					timeline. This section will be removed if and once those
					changes are in place.</t>

        <t>The <xref target="I-D.ietf-idr-bgp-model" /> authors are
          honored under <xref target="Contributors" /> for their
          contribution to the BGP YANG modelling this document uses.</t>
      </section>

      <section>
        <name>Relationship to draft-ietf-grow-bmp-yang</name>

        <t><xref
            target="I-D.ietf-grow-bmp-yang" /> defines with 'ietf-bmp'
          YANG module the configuration and monitoring of BMP. While
          there is no direct relationship between this document and its
          defined YANG modules, it is worth mentioning that the with <xref
            target="I-D.ietf-grow-bmp-yang" /> subscribed BMP data is
          being transformed at BMP monitoring stations to Message
          Brokers as described in this document.</t>
      </section>

    </section>

    <section>
      <name>BMP YANG Modules</name>

      <t>The 'ietf-bmp-telemetry-message' YANG module defines the
        top-level BMP <tt>message</tt> structure. It carries a mandatory <tt>
        version</tt> leaf from the BMP Common Header, an optional <tt>
        session-metadata</tt> presence container derived from the BMP
        Initiation message, and a <tt>message-type</tt> choice covering
        all seven BMP message types: route-monitoring,
        statistics-report, peer-down-notification, peer-up-notification,
        initiation-message, termination-message, and
        route-mirroring-message.</t>

      <t>The 'ietf-bgp-rib-entry' module provides the <tt>rib-entry</tt>
        grouping used by route-monitoring and route-mirroring messages.
        It selects between five RIB table types — loc-rib,
        adj-rib-in-pre, adj-rib-in-post, adj-rib-out-pre, and
        adj-rib-out-post — via a nested <tt>rib-type</tt> choice. Each
        route entry contains the prefix, optional path-id for ADD-PATH,
        BGP path attributes, and community attributes.</t>

      <t>The 'ietf-bgp-open' module provides the <tt>bgp-open</tt>
        grouping, which carries the BGP OPEN message fields: protocol
        version, Autonomous System number, hold time, BGP identifier,
        and the negotiated capability list. It is used in
        peer-up-notification for both the sent and received OPEN
        messages.</t>

      <t>The 'ietf-bmp-tlv' module provides TLV groupings modeling the
        decoded content of BMP TLV Value fields. The <tt>common</tt>
        grouping — carrying sequence number, typed timestamps, and
        extended peer-header flags — is used across all seven BMP
        message types. Additional groupings are message-type-specific: <tt>
        information</tt> for initiation and peer-up messages, <tt>
        termination</tt> for termination messages, <tt>peer-down</tt>
        for Loc-RIB peer-down with reason code 6, and <tt>
        route-monitoring</tt> for path status and VRF/Table Name in
        route-monitoring messages.</t>

      <t>A BMP Initiation message is sent once per BMP session when the
        TCP connection is established and provides router identity
        information such as sys-name, sys-descr, and optional free-form
        strings. Because subsequent per-peer messages (Route Monitoring,
        Statistics Report, Peer Up, Peer Down) carry no equivalent
        identity information, a Network Telemetry collector acting as a
        YANG Message Broker Producer SHOULD cache the Initiation message
        content for each BMP session and populate <tt>session-metadata</tt>
        in every downstream message it emits. This makes each Message
        Broker message self-contained for consumers that did not observe
        or store the Initiation message directly. The <tt>
        session-metadata</tt> container is absent when the collector has
        not yet received or cached the Initiation message for that
        session.</t>

      <!-- ietf-bmp-telemetry-message YANG Tree -->
      <figure anchor="ietf-bmp-telemetry-message-tree"
        title="YANG tree diagram for 'ietf-bmp-telemetry-message' module.">
        <sourcecode type="yangtree">
<![CDATA[
module: ietf-bmp-telemetry-message

  structure message:
    +-- session-metadata!
    |  +-- string*           string
    |  +-- sys-descr?        string
    |  +-- sys-name?         string
    |  +-- vrf-table-name?   string
    +-- version             uint8
    +-- (message-type)?
       +--:(route-monitoring)
       |  +-- route-monitoring
       |     +-- peer-type             peer-type
       |     +-- peer-flags
       |     |  +-- ipv6-peer?        boolean
       |     |  +-- post-policy?      boolean
       |     |  +-- legacy-as-path?   boolean
       |     |  +-- adj-rib-out?      boolean
       |     |  +-- filtered?         boolean
       |     +-- peer-distinguisher    rt-types:route-distinguisher
       |     +-- peer-address          inet:ip-address
       |     +-- peer-as               uint32
       |     +-- peer-bgp-id           inet:ipv4-address
       |     +-- timestamp?            yang:date-and-time
       |     +-- afi-safi-type         identityref
       |     +-- rib-entry
       |     |  +-- (afi-safi)
       |     |     +--:(ipv4-unicast)
       |     |     |  +-- ipv4-unicast
       |     |     |     +-- (rib-type)
       |     |     |        +--:(loc-rib)
       |     |     |        |  +-- loc-rib
       |     |     |        |     +-- route
       |     |     |        |        +-- prefix
       |     |     |        |        |     inet:ipv4-prefix
       |     |     |        |        +-- origin?
       |     |     |        |        |     union
       |     |     |        |        +-- path-id?
       |     |     |        |        |     uint32
       |     |     |        |        +-- attributes
       |     |     |        |        |  +-- origin
       |     |     |        |        |  |     bt:bgp-origin-attr-type
       |     |     |        |        |  +-- as-path
       |     |     |        |        |  |  +-- segment*
       |     |     |        |        |  |     +-- type?
       |     |     |        |        |  |     |     bt:as-path-segment-type
       |     |     |        |        |  |     +-- member*
       |     |     |        |        |  |           inet:as-number
       |     |     |        |        |  +-- next-hop?
       |     |     |        |        |  |     inet:ip-address
       |     |     |        |        |  +-- link-local-next-hop?
       |     |     |        |        |  |     inet:ipv6-address
       |     |     |        |        |  +-- med?
       |     |     |        |        |  |     uint32
       |     |     |        |        |  +-- local-pref?
       |     |     |        |        |  |     uint32
       |     |     |        |        |  +-- as4-path
       |     |     |        |        |  |  +-- segment*
       |     |     |        |        |  |     +-- type?
       |     |     |        |        |  |     |     bt:as-path-segment-type
       |     |     |        |        |  |     +-- member*
       |     |     |        |        |  |           inet:as-number
       |     |     |        |        |  +-- aggregator
       |     |     |        |        |  |  +-- as?
       |     |     |        |        |  |  |     inet:as-number
       |     |     |        |        |  |  +-- identifier?
       |     |     |        |        |  |        yang:dotted-quad
       |     |     |        |        |  +-- aggregator4
       |     |     |        |        |  |  +-- as4?
       |     |     |        |        |  |  |     inet:as-number
       |     |     |        |        |  |  +-- identifier?
       |     |     |        |        |  |        yang:dotted-quad
       |     |     |        |        |  +-- atomic-aggregate?
       |     |     |        |        |  |     boolean
       |     |     |        |        |  +-- originator-id?
       |     |     |        |        |  |     yang:dotted-quad
       |     |     |        |        |  +-- cluster-list*
       |     |     |        |        |  |     yang:dotted-quad
       |     |     |        |        |  +-- aigp-metric?
       |     |     |        |        |        uint64
       |     |     |        |        +-- community*
       |     |     |        |        |     union
       |     |     |        |        +-- ext-community*
       |     |     |        |        |     bct:bgp-ext-community-type
       |     |     |        |        +-- ext-community-raw*
       |     |     |        |        |     string
       |     |     |        |        +-- ipv6-ext-community*
       |     |     |        |        |     bct:bgp-ipv6-ext-community-type
       |     |     |        |        +-- ipv6-ext-community-raw*
       |     |     |        |        |     string
       |     |     |        |        +-- large-community*
       |     |     |        |        |     bct:bgp-large-community-type
       |     |     |        |        +-- last-modified?
       |     |     |        |        |     yang:timeticks
       |     |     |        |        +-- eligible-route?
       |     |     |        |        |     boolean
       |     |     |        |        +-- ineligible-reason?
       |     |     |        |        |     identityref
       |     |     |        |        +-- unknown-attributes
       |     |     |        |        |  +-- unknown-attribute*
       |     |     |        |        |        [attr-type]
       |     |     |        |        |     +-- attr-type     uint8
       |     |     |        |        |     +-- optional?     boolean
       |     |     |        |        |     +-- transitive?   boolean
       |     |     |        |        |     +-- partial?      boolean
       |     |     |        |        |     +-- extended?     boolean
       |     |     |        |        |     +-- attr-len?     uint16
       |     |     |        |        |     +-- attr-value?   binary
       |     |     |        |        +-- reject-reason?
       |     |     |        |              union
       |     |     |        +--:(adj-rib-in-pre)
       |     |     |        |  +-- adj-rib-in-pre
       |     |     |        |     +-- route
       |     |     |        |        +-- prefix
       |     |     |        |        |     inet:ipv4-prefix
       |     |     |        |        +-- path-id?
       |     |     |        |        |     uint32
       |     |     |        |        +-- attributes
       |     |     |        |        |  +-- origin
       |     |     |        |        |  |     bt:bgp-origin-attr-type
       |     |     |        |        |  +-- as-path
       |     |     |        |        |  |  +-- segment*
       |     |     |        |        |  |     +-- type?
       |     |     |        |        |  |     |     bt:as-path-segment-type
       |     |     |        |        |  |     +-- member*
       |     |     |        |        |  |           inet:as-number
       |     |     |        |        |  +-- next-hop?
       |     |     |        |        |  |     inet:ip-address
       |     |     |        |        |  +-- link-local-next-hop?
       |     |     |        |        |  |     inet:ipv6-address
       |     |     |        |        |  +-- med?
       |     |     |        |        |  |     uint32
       |     |     |        |        |  +-- local-pref?
       |     |     |        |        |  |     uint32
       |     |     |        |        |  +-- as4-path
       |     |     |        |        |  |  +-- segment*
       |     |     |        |        |  |     +-- type?
       |     |     |        |        |  |     |     bt:as-path-segment-type
       |     |     |        |        |  |     +-- member*
       |     |     |        |        |  |           inet:as-number
       |     |     |        |        |  +-- aggregator
       |     |     |        |        |  |  +-- as?
       |     |     |        |        |  |  |     inet:as-number
       |     |     |        |        |  |  +-- identifier?
       |     |     |        |        |  |        yang:dotted-quad
       |     |     |        |        |  +-- aggregator4
       |     |     |        |        |  |  +-- as4?
       |     |     |        |        |  |  |     inet:as-number
       |     |     |        |        |  |  +-- identifier?
       |     |     |        |        |  |        yang:dotted-quad
       |     |     |        |        |  +-- atomic-aggregate?
       |     |     |        |        |  |     boolean
       |     |     |        |        |  +-- originator-id?
       |     |     |        |        |  |     yang:dotted-quad
       |     |     |        |        |  +-- cluster-list*
       |     |     |        |        |  |     yang:dotted-quad
       |     |     |        |        |  +-- aigp-metric?
       |     |     |        |        |        uint64
       |     |     |        |        +-- community*
       |     |     |        |        |     union
       |     |     |        |        +-- ext-community*
       |     |     |        |        |     bct:bgp-ext-community-type
       |     |     |        |        +-- ext-community-raw*
       |     |     |        |        |     string
       |     |     |        |        +-- ipv6-ext-community*
       |     |     |        |        |     bct:bgp-ipv6-ext-community-type
       |     |     |        |        +-- ipv6-ext-community-raw*
       |     |     |        |        |     string
       |     |     |        |        +-- large-community*
       |     |     |        |        |     bct:bgp-large-community-type
       |     |     |        |        +-- last-modified?
       |     |     |        |        |     yang:timeticks
       |     |     |        |        +-- eligible-route?
       |     |     |        |        |     boolean
       |     |     |        |        +-- ineligible-reason?
       |     |     |        |        |     identityref
       |     |     |        |        +-- unknown-attributes
       |     |     |        |        |  +-- unknown-attribute*
       |     |     |        |        |        [attr-type]
       |     |     |        |        |     +-- attr-type     uint8
       |     |     |        |        |     +-- optional?     boolean
       |     |     |        |        |     +-- transitive?   boolean
       |     |     |        |        |     +-- partial?      boolean
       |     |     |        |        |     +-- extended?     boolean
       |     |     |        |        |     +-- attr-len?     uint16
       |     |     |        |        |     +-- attr-value?   binary
       |     |     |        |        +-- reject-reason?
       |     |     |        |              union
       |     |     |        +--:(adj-rib-in-post)
       |     |     |        |  +-- adj-rib-in-post
       |     |     |        |     +-- route
       |     |     |        |        +-- prefix
       |     |     |        |        |     inet:ipv4-prefix
       |     |     |        |        +-- path-id?
       |     |     |        |        |     uint32
       |     |     |        |        +-- attributes
       |     |     |        |        |  +-- origin
       |     |     |        |        |  |     bt:bgp-origin-attr-type
       |     |     |        |        |  +-- as-path
       |     |     |        |        |  |  +-- segment*
       |     |     |        |        |  |     +-- type?
       |     |     |        |        |  |     |     bt:as-path-segment-type
       |     |     |        |        |  |     +-- member*
       |     |     |        |        |  |           inet:as-number
       |     |     |        |        |  +-- next-hop?
       |     |     |        |        |  |     inet:ip-address
       |     |     |        |        |  +-- link-local-next-hop?
       |     |     |        |        |  |     inet:ipv6-address
       |     |     |        |        |  +-- med?
       |     |     |        |        |  |     uint32
       |     |     |        |        |  +-- local-pref?
       |     |     |        |        |  |     uint32
       |     |     |        |        |  +-- as4-path
       |     |     |        |        |  |  +-- segment*
       |     |     |        |        |  |     +-- type?
       |     |     |        |        |  |     |     bt:as-path-segment-type
       |     |     |        |        |  |     +-- member*
       |     |     |        |        |  |           inet:as-number
       |     |     |        |        |  +-- aggregator
       |     |     |        |        |  |  +-- as?
       |     |     |        |        |  |  |     inet:as-number
       |     |     |        |        |  |  +-- identifier?
       |     |     |        |        |  |        yang:dotted-quad
       |     |     |        |        |  +-- aggregator4
       |     |     |        |        |  |  +-- as4?
       |     |     |        |        |  |  |     inet:as-number
       |     |     |        |        |  |  +-- identifier?
       |     |     |        |        |  |        yang:dotted-quad
       |     |     |        |        |  +-- atomic-aggregate?
       |     |     |        |        |  |     boolean
       |     |     |        |        |  +-- originator-id?
       |     |     |        |        |  |     yang:dotted-quad
       |     |     |        |        |  +-- cluster-list*
       |     |     |        |        |  |     yang:dotted-quad
       |     |     |        |        |  +-- aigp-metric?
       |     |     |        |        |        uint64
       |     |     |        |        +-- community*
       |     |     |        |        |     union
       |     |     |        |        +-- ext-community*
       |     |     |        |        |     bct:bgp-ext-community-type
       |     |     |        |        +-- ext-community-raw*
       |     |     |        |        |     string
       |     |     |        |        +-- ipv6-ext-community*
       |     |     |        |        |     bct:bgp-ipv6-ext-community-type
       |     |     |        |        +-- ipv6-ext-community-raw*
       |     |     |        |        |     string
       |     |     |        |        +-- large-community*
       |     |     |        |        |     bct:bgp-large-community-type
       |     |     |        |        +-- last-modified?
       |     |     |        |        |     yang:timeticks
       |     |     |        |        +-- eligible-route?
       |     |     |        |        |     boolean
       |     |     |        |        +-- ineligible-reason?
       |     |     |        |        |     identityref
       |     |     |        |        +-- best-path?
       |     |     |        |        |     boolean
       |     |     |        |        +-- unknown-attributes
       |     |     |        |        |  +-- unknown-attribute*
       |     |     |        |        |        [attr-type]
       |     |     |        |        |     +-- attr-type     uint8
       |     |     |        |        |     +-- optional?     boolean
       |     |     |        |        |     +-- transitive?   boolean
       |     |     |        |        |     +-- partial?      boolean
       |     |     |        |        |     +-- extended?     boolean
       |     |     |        |        |     +-- attr-len?     uint16
       |     |     |        |        |     +-- attr-value?   binary
       |     |     |        |        +-- reject-reason?
       |     |     |        |              union
       |     |     |        +--:(adj-rib-out-pre)
       |     |     |        |  +-- adj-rib-out-pre
       |     |     |        |     +-- route
       |     |     |        |        +-- prefix
       |     |     |        |        |     inet:ipv4-prefix
       |     |     |        |        +-- path-id?
       |     |     |        |        |     uint32
       |     |     |        |        +-- attributes
       |     |     |        |        |  +-- origin
       |     |     |        |        |  |     bt:bgp-origin-attr-type
       |     |     |        |        |  +-- as-path
       |     |     |        |        |  |  +-- segment*
       |     |     |        |        |  |     +-- type?
       |     |     |        |        |  |     |     bt:as-path-segment-type
       |     |     |        |        |  |     +-- member*
       |     |     |        |        |  |           inet:as-number
       |     |     |        |        |  +-- next-hop?
       |     |     |        |        |  |     inet:ip-address
       |     |     |        |        |  +-- link-local-next-hop?
       |     |     |        |        |  |     inet:ipv6-address
       |     |     |        |        |  +-- med?
       |     |     |        |        |  |     uint32
       |     |     |        |        |  +-- local-pref?
       |     |     |        |        |  |     uint32
       |     |     |        |        |  +-- as4-path
       |     |     |        |        |  |  +-- segment*
       |     |     |        |        |  |     +-- type?
       |     |     |        |        |  |     |     bt:as-path-segment-type
       |     |     |        |        |  |     +-- member*
       |     |     |        |        |  |           inet:as-number
       |     |     |        |        |  +-- aggregator
       |     |     |        |        |  |  +-- as?
       |     |     |        |        |  |  |     inet:as-number
       |     |     |        |        |  |  +-- identifier?
       |     |     |        |        |  |        yang:dotted-quad
       |     |     |        |        |  +-- aggregator4
       |     |     |        |        |  |  +-- as4?
       |     |     |        |        |  |  |     inet:as-number
       |     |     |        |        |  |  +-- identifier?
       |     |     |        |        |  |        yang:dotted-quad
       |     |     |        |        |  +-- atomic-aggregate?
       |     |     |        |        |  |     boolean
       |     |     |        |        |  +-- originator-id?
       |     |     |        |        |  |     yang:dotted-quad
       |     |     |        |        |  +-- cluster-list*
       |     |     |        |        |  |     yang:dotted-quad
       |     |     |        |        |  +-- aigp-metric?
       |     |     |        |        |        uint64
       |     |     |        |        +-- community*
       |     |     |        |        |     union
       |     |     |        |        +-- ext-community*
       |     |     |        |        |     bct:bgp-ext-community-type
       |     |     |        |        +-- ext-community-raw*
       |     |     |        |        |     string
       |     |     |        |        +-- ipv6-ext-community*
       |     |     |        |        |     bct:bgp-ipv6-ext-community-type
       |     |     |        |        +-- ipv6-ext-community-raw*
       |     |     |        |        |     string
       |     |     |        |        +-- large-community*
       |     |     |        |        |     bct:bgp-large-community-type
       |     |     |        |        +-- last-modified?
       |     |     |        |        |     yang:timeticks
       |     |     |        |        +-- eligible-route?
       |     |     |        |        |     boolean
       |     |     |        |        +-- ineligible-reason?
       |     |     |        |        |     identityref
       |     |     |        |        +-- unknown-attributes
       |     |     |        |        |  +-- unknown-attribute*
       |     |     |        |        |        [attr-type]
       |     |     |        |        |     +-- attr-type     uint8
       |     |     |        |        |     +-- optional?     boolean
       |     |     |        |        |     +-- transitive?   boolean
       |     |     |        |        |     +-- partial?      boolean
       |     |     |        |        |     +-- extended?     boolean
       |     |     |        |        |     +-- attr-len?     uint16
       |     |     |        |        |     +-- attr-value?   binary
       |     |     |        |        +-- reject-reason?
       |     |     |        |              union
       |     |     |        +--:(adj-rib-out-post)
       |     |     |           +-- adj-rib-out-post
       |     |     |              +-- route
       |     |     |                 +-- prefix
       |     |     |                 |     inet:ipv4-prefix
       |     |     |                 +-- path-id?
       |     |     |                 |     uint32
       |     |     |                 +-- attributes
       |     |     |                 |  +-- origin
       |     |     |                 |  |     bt:bgp-origin-attr-type
       |     |     |                 |  +-- as-path
       |     |     |                 |  |  +-- segment*
       |     |     |                 |  |     +-- type?
       |     |     |                 |  |     |     bt:as-path-segment-type
       |     |     |                 |  |     +-- member*
       |     |     |                 |  |           inet:as-number
       |     |     |                 |  +-- next-hop?
       |     |     |                 |  |     inet:ip-address
       |     |     |                 |  +-- link-local-next-hop?
       |     |     |                 |  |     inet:ipv6-address
       |     |     |                 |  +-- med?
       |     |     |                 |  |     uint32
       |     |     |                 |  +-- local-pref?
       |     |     |                 |  |     uint32
       |     |     |                 |  +-- as4-path
       |     |     |                 |  |  +-- segment*
       |     |     |                 |  |     +-- type?
       |     |     |                 |  |     |     bt:as-path-segment-type
       |     |     |                 |  |     +-- member*
       |     |     |                 |  |           inet:as-number
       |     |     |                 |  +-- aggregator
       |     |     |                 |  |  +-- as?
       |     |     |                 |  |  |     inet:as-number
       |     |     |                 |  |  +-- identifier?
       |     |     |                 |  |        yang:dotted-quad
       |     |     |                 |  +-- aggregator4
       |     |     |                 |  |  +-- as4?
       |     |     |                 |  |  |     inet:as-number
       |     |     |                 |  |  +-- identifier?
       |     |     |                 |  |        yang:dotted-quad
       |     |     |                 |  +-- atomic-aggregate?
       |     |     |                 |  |     boolean
       |     |     |                 |  +-- originator-id?
       |     |     |                 |  |     yang:dotted-quad
       |     |     |                 |  +-- cluster-list*
       |     |     |                 |  |     yang:dotted-quad
       |     |     |                 |  +-- aigp-metric?
       |     |     |                 |        uint64
       |     |     |                 +-- community*
       |     |     |                 |     union
       |     |     |                 +-- ext-community*
       |     |     |                 |     bct:bgp-ext-community-type
       |     |     |                 +-- ext-community-raw*
       |     |     |                 |     string
       |     |     |                 +-- ipv6-ext-community*
       |     |     |                 |     bct:bgp-ipv6-ext-community-type
       |     |     |                 +-- ipv6-ext-community-raw*
       |     |     |                 |     string
       |     |     |                 +-- large-community*
       |     |     |                 |     bct:bgp-large-community-type
       |     |     |                 +-- last-modified?
       |     |     |                 |     yang:timeticks
       |     |     |                 +-- eligible-route?
       |     |     |                 |     boolean
       |     |     |                 +-- ineligible-reason?
       |     |     |                 |     identityref
       |     |     |                 +-- unknown-attributes
       |     |     |                 |  +-- unknown-attribute*
       |     |     |                 |        [attr-type]
       |     |     |                 |     +-- attr-type     uint8
       |     |     |                 |     +-- optional?     boolean
       |     |     |                 |     +-- transitive?   boolean
       |     |     |                 |     +-- partial?      boolean
       |     |     |                 |     +-- extended?     boolean
       |     |     |                 |     +-- attr-len?     uint16
       |     |     |                 |     +-- attr-value?   binary
       |     |     |                 +-- reject-reason?
       |     |     |                       union
       |     |     +--:(ipv6-unicast)
       |     |        +-- ipv6-unicast
       |     |           +-- (rib-type)
       |     |              +--:(loc-rib)
       |     |              |  +-- loc-rib
       |     |              |     +-- route
       |     |              |        +-- prefix
       |     |              |        |     inet:ipv6-prefix
       |     |              |        +-- origin?
       |     |              |        |     union
       |     |              |        +-- path-id?
       |     |              |        |     uint32
       |     |              |        +-- attributes
       |     |              |        |  +-- origin
       |     |              |        |  |     bt:bgp-origin-attr-type
       |     |              |        |  +-- as-path
       |     |              |        |  |  +-- segment*
       |     |              |        |  |     +-- type?
       |     |              |        |  |     |     bt:as-path-segment-type
       |     |              |        |  |     +-- member*
       |     |              |        |  |           inet:as-number
       |     |              |        |  +-- next-hop?
       |     |              |        |  |     inet:ip-address
       |     |              |        |  +-- link-local-next-hop?
       |     |              |        |  |     inet:ipv6-address
       |     |              |        |  +-- med?
       |     |              |        |  |     uint32
       |     |              |        |  +-- local-pref?
       |     |              |        |  |     uint32
       |     |              |        |  +-- as4-path
       |     |              |        |  |  +-- segment*
       |     |              |        |  |     +-- type?
       |     |              |        |  |     |     bt:as-path-segment-type
       |     |              |        |  |     +-- member*
       |     |              |        |  |           inet:as-number
       |     |              |        |  +-- aggregator
       |     |              |        |  |  +-- as?
       |     |              |        |  |  |     inet:as-number
       |     |              |        |  |  +-- identifier?
       |     |              |        |  |        yang:dotted-quad
       |     |              |        |  +-- aggregator4
       |     |              |        |  |  +-- as4?
       |     |              |        |  |  |     inet:as-number
       |     |              |        |  |  +-- identifier?
       |     |              |        |  |        yang:dotted-quad
       |     |              |        |  +-- atomic-aggregate?
       |     |              |        |  |     boolean
       |     |              |        |  +-- originator-id?
       |     |              |        |  |     yang:dotted-quad
       |     |              |        |  +-- cluster-list*
       |     |              |        |  |     yang:dotted-quad
       |     |              |        |  +-- aigp-metric?
       |     |              |        |        uint64
       |     |              |        +-- community*
       |     |              |        |     union
       |     |              |        +-- ext-community*
       |     |              |        |     bct:bgp-ext-community-type
       |     |              |        +-- ext-community-raw*
       |     |              |        |     string
       |     |              |        +-- ipv6-ext-community*
       |     |              |        |     bct:bgp-ipv6-ext-community-type
       |     |              |        +-- ipv6-ext-community-raw*
       |     |              |        |     string
       |     |              |        +-- large-community*
       |     |              |        |     bct:bgp-large-community-type
       |     |              |        +-- last-modified?
       |     |              |        |     yang:timeticks
       |     |              |        +-- eligible-route?
       |     |              |        |     boolean
       |     |              |        +-- ineligible-reason?
       |     |              |        |     identityref
       |     |              |        +-- unknown-attributes
       |     |              |        |  +-- unknown-attribute*
       |     |              |        |        [attr-type]
       |     |              |        |     +-- attr-type     uint8
       |     |              |        |     +-- optional?     boolean
       |     |              |        |     +-- transitive?   boolean
       |     |              |        |     +-- partial?      boolean
       |     |              |        |     +-- extended?     boolean
       |     |              |        |     +-- attr-len?     uint16
       |     |              |        |     +-- attr-value?   binary
       |     |              |        +-- reject-reason?
       |     |              |              union
       |     |              +--:(adj-rib-in-pre)
       |     |              |  +-- adj-rib-in-pre
       |     |              |     +-- route
       |     |              |        +-- prefix
       |     |              |        |     inet:ipv6-prefix
       |     |              |        +-- path-id?
       |     |              |        |     uint32
       |     |              |        +-- attributes
       |     |              |        |  +-- origin
       |     |              |        |  |     bt:bgp-origin-attr-type
       |     |              |        |  +-- as-path
       |     |              |        |  |  +-- segment*
       |     |              |        |  |     +-- type?
       |     |              |        |  |     |     bt:as-path-segment-type
       |     |              |        |  |     +-- member*
       |     |              |        |  |           inet:as-number
       |     |              |        |  +-- next-hop?
       |     |              |        |  |     inet:ip-address
       |     |              |        |  +-- link-local-next-hop?
       |     |              |        |  |     inet:ipv6-address
       |     |              |        |  +-- med?
       |     |              |        |  |     uint32
       |     |              |        |  +-- local-pref?
       |     |              |        |  |     uint32
       |     |              |        |  +-- as4-path
       |     |              |        |  |  +-- segment*
       |     |              |        |  |     +-- type?
       |     |              |        |  |     |     bt:as-path-segment-type
       |     |              |        |  |     +-- member*
       |     |              |        |  |           inet:as-number
       |     |              |        |  +-- aggregator
       |     |              |        |  |  +-- as?
       |     |              |        |  |  |     inet:as-number
       |     |              |        |  |  +-- identifier?
       |     |              |        |  |        yang:dotted-quad
       |     |              |        |  +-- aggregator4
       |     |              |        |  |  +-- as4?
       |     |              |        |  |  |     inet:as-number
       |     |              |        |  |  +-- identifier?
       |     |              |        |  |        yang:dotted-quad
       |     |              |        |  +-- atomic-aggregate?
       |     |              |        |  |     boolean
       |     |              |        |  +-- originator-id?
       |     |              |        |  |     yang:dotted-quad
       |     |              |        |  +-- cluster-list*
       |     |              |        |  |     yang:dotted-quad
       |     |              |        |  +-- aigp-metric?
       |     |              |        |        uint64
       |     |              |        +-- community*
       |     |              |        |     union
       |     |              |        +-- ext-community*
       |     |              |        |     bct:bgp-ext-community-type
       |     |              |        +-- ext-community-raw*
       |     |              |        |     string
       |     |              |        +-- ipv6-ext-community*
       |     |              |        |     bct:bgp-ipv6-ext-community-type
       |     |              |        +-- ipv6-ext-community-raw*
       |     |              |        |     string
       |     |              |        +-- large-community*
       |     |              |        |     bct:bgp-large-community-type
       |     |              |        +-- last-modified?
       |     |              |        |     yang:timeticks
       |     |              |        +-- eligible-route?
       |     |              |        |     boolean
       |     |              |        +-- ineligible-reason?
       |     |              |        |     identityref
       |     |              |        +-- unknown-attributes
       |     |              |        |  +-- unknown-attribute*
       |     |              |        |        [attr-type]
       |     |              |        |     +-- attr-type     uint8
       |     |              |        |     +-- optional?     boolean
       |     |              |        |     +-- transitive?   boolean
       |     |              |        |     +-- partial?      boolean
       |     |              |        |     +-- extended?     boolean
       |     |              |        |     +-- attr-len?     uint16
       |     |              |        |     +-- attr-value?   binary
       |     |              |        +-- reject-reason?
       |     |              |              union
       |     |              +--:(adj-rib-in-post)
       |     |              |  +-- adj-rib-in-post
       |     |              |     +-- route
       |     |              |        +-- prefix
       |     |              |        |     inet:ipv6-prefix
       |     |              |        +-- path-id?
       |     |              |        |     uint32
       |     |              |        +-- attributes
       |     |              |        |  +-- origin
       |     |              |        |  |     bt:bgp-origin-attr-type
       |     |              |        |  +-- as-path
       |     |              |        |  |  +-- segment*
       |     |              |        |  |     +-- type?
       |     |              |        |  |     |     bt:as-path-segment-type
       |     |              |        |  |     +-- member*
       |     |              |        |  |           inet:as-number
       |     |              |        |  +-- next-hop?
       |     |              |        |  |     inet:ip-address
       |     |              |        |  +-- link-local-next-hop?
       |     |              |        |  |     inet:ipv6-address
       |     |              |        |  +-- med?
       |     |              |        |  |     uint32
       |     |              |        |  +-- local-pref?
       |     |              |        |  |     uint32
       |     |              |        |  +-- as4-path
       |     |              |        |  |  +-- segment*
       |     |              |        |  |     +-- type?
       |     |              |        |  |     |     bt:as-path-segment-type
       |     |              |        |  |     +-- member*
       |     |              |        |  |           inet:as-number
       |     |              |        |  +-- aggregator
       |     |              |        |  |  +-- as?
       |     |              |        |  |  |     inet:as-number
       |     |              |        |  |  +-- identifier?
       |     |              |        |  |        yang:dotted-quad
       |     |              |        |  +-- aggregator4
       |     |              |        |  |  +-- as4?
       |     |              |        |  |  |     inet:as-number
       |     |              |        |  |  +-- identifier?
       |     |              |        |  |        yang:dotted-quad
       |     |              |        |  +-- atomic-aggregate?
       |     |              |        |  |     boolean
       |     |              |        |  +-- originator-id?
       |     |              |        |  |     yang:dotted-quad
       |     |              |        |  +-- cluster-list*
       |     |              |        |  |     yang:dotted-quad
       |     |              |        |  +-- aigp-metric?
       |     |              |        |        uint64
       |     |              |        +-- community*
       |     |              |        |     union
       |     |              |        +-- ext-community*
       |     |              |        |     bct:bgp-ext-community-type
       |     |              |        +-- ext-community-raw*
       |     |              |        |     string
       |     |              |        +-- ipv6-ext-community*
       |     |              |        |     bct:bgp-ipv6-ext-community-type
       |     |              |        +-- ipv6-ext-community-raw*
       |     |              |        |     string
       |     |              |        +-- large-community*
       |     |              |        |     bct:bgp-large-community-type
       |     |              |        +-- last-modified?
       |     |              |        |     yang:timeticks
       |     |              |        +-- eligible-route?
       |     |              |        |     boolean
       |     |              |        +-- ineligible-reason?
       |     |              |        |     identityref
       |     |              |        +-- best-path?
       |     |              |        |     boolean
       |     |              |        +-- unknown-attributes
       |     |              |        |  +-- unknown-attribute*
       |     |              |        |        [attr-type]
       |     |              |        |     +-- attr-type     uint8
       |     |              |        |     +-- optional?     boolean
       |     |              |        |     +-- transitive?   boolean
       |     |              |        |     +-- partial?      boolean
       |     |              |        |     +-- extended?     boolean
       |     |              |        |     +-- attr-len?     uint16
       |     |              |        |     +-- attr-value?   binary
       |     |              |        +-- reject-reason?
       |     |              |              union
       |     |              +--:(adj-rib-out-pre)
       |     |              |  +-- adj-rib-out-pre
       |     |              |     +-- route
       |     |              |        +-- prefix
       |     |              |        |     inet:ipv6-prefix
       |     |              |        +-- path-id?
       |     |              |        |     uint32
       |     |              |        +-- attributes
       |     |              |        |  +-- origin
       |     |              |        |  |     bt:bgp-origin-attr-type
       |     |              |        |  +-- as-path
       |     |              |        |  |  +-- segment*
       |     |              |        |  |     +-- type?
       |     |              |        |  |     |     bt:as-path-segment-type
       |     |              |        |  |     +-- member*
       |     |              |        |  |           inet:as-number
       |     |              |        |  +-- next-hop?
       |     |              |        |  |     inet:ip-address
       |     |              |        |  +-- link-local-next-hop?
       |     |              |        |  |     inet:ipv6-address
       |     |              |        |  +-- med?
       |     |              |        |  |     uint32
       |     |              |        |  +-- local-pref?
       |     |              |        |  |     uint32
       |     |              |        |  +-- as4-path
       |     |              |        |  |  +-- segment*
       |     |              |        |  |     +-- type?
       |     |              |        |  |     |     bt:as-path-segment-type
       |     |              |        |  |     +-- member*
       |     |              |        |  |           inet:as-number
       |     |              |        |  +-- aggregator
       |     |              |        |  |  +-- as?
       |     |              |        |  |  |     inet:as-number
       |     |              |        |  |  +-- identifier?
       |     |              |        |  |        yang:dotted-quad
       |     |              |        |  +-- aggregator4
       |     |              |        |  |  +-- as4?
       |     |              |        |  |  |     inet:as-number
       |     |              |        |  |  +-- identifier?
       |     |              |        |  |        yang:dotted-quad
       |     |              |        |  +-- atomic-aggregate?
       |     |              |        |  |     boolean
       |     |              |        |  +-- originator-id?
       |     |              |        |  |     yang:dotted-quad
       |     |              |        |  +-- cluster-list*
       |     |              |        |  |     yang:dotted-quad
       |     |              |        |  +-- aigp-metric?
       |     |              |        |        uint64
       |     |              |        +-- community*
       |     |              |        |     union
       |     |              |        +-- ext-community*
       |     |              |        |     bct:bgp-ext-community-type
       |     |              |        +-- ext-community-raw*
       |     |              |        |     string
       |     |              |        +-- ipv6-ext-community*
       |     |              |        |     bct:bgp-ipv6-ext-community-type
       |     |              |        +-- ipv6-ext-community-raw*
       |     |              |        |     string
       |     |              |        +-- large-community*
       |     |              |        |     bct:bgp-large-community-type
       |     |              |        +-- last-modified?
       |     |              |        |     yang:timeticks
       |     |              |        +-- eligible-route?
       |     |              |        |     boolean
       |     |              |        +-- ineligible-reason?
       |     |              |        |     identityref
       |     |              |        +-- unknown-attributes
       |     |              |        |  +-- unknown-attribute*
       |     |              |        |        [attr-type]
       |     |              |        |     +-- attr-type     uint8
       |     |              |        |     +-- optional?     boolean
       |     |              |        |     +-- transitive?   boolean
       |     |              |        |     +-- partial?      boolean
       |     |              |        |     +-- extended?     boolean
       |     |              |        |     +-- attr-len?     uint16
       |     |              |        |     +-- attr-value?   binary
       |     |              |        +-- reject-reason?
       |     |              |              union
       |     |              +--:(adj-rib-out-post)
       |     |                 +-- adj-rib-out-post
       |     |                    +-- route
       |     |                       +-- prefix
       |     |                       |     inet:ipv6-prefix
       |     |                       +-- path-id?
       |     |                       |     uint32
       |     |                       +-- attributes
       |     |                       |  +-- origin
       |     |                       |  |     bt:bgp-origin-attr-type
       |     |                       |  +-- as-path
       |     |                       |  |  +-- segment*
       |     |                       |  |     +-- type?
       |     |                       |  |     |     bt:as-path-segment-type
       |     |                       |  |     +-- member*
       |     |                       |  |           inet:as-number
       |     |                       |  +-- next-hop?
       |     |                       |  |     inet:ip-address
       |     |                       |  +-- link-local-next-hop?
       |     |                       |  |     inet:ipv6-address
       |     |                       |  +-- med?
       |     |                       |  |     uint32
       |     |                       |  +-- local-pref?
       |     |                       |  |     uint32
       |     |                       |  +-- as4-path
       |     |                       |  |  +-- segment*
       |     |                       |  |     +-- type?
       |     |                       |  |     |     bt:as-path-segment-type
       |     |                       |  |     +-- member*
       |     |                       |  |           inet:as-number
       |     |                       |  +-- aggregator
       |     |                       |  |  +-- as?
       |     |                       |  |  |     inet:as-number
       |     |                       |  |  +-- identifier?
       |     |                       |  |        yang:dotted-quad
       |     |                       |  +-- aggregator4
       |     |                       |  |  +-- as4?
       |     |                       |  |  |     inet:as-number
       |     |                       |  |  +-- identifier?
       |     |                       |  |        yang:dotted-quad
       |     |                       |  +-- atomic-aggregate?
       |     |                       |  |     boolean
       |     |                       |  +-- originator-id?
       |     |                       |  |     yang:dotted-quad
       |     |                       |  +-- cluster-list*
       |     |                       |  |     yang:dotted-quad
       |     |                       |  +-- aigp-metric?
       |     |                       |        uint64
       |     |                       +-- community*
       |     |                       |     union
       |     |                       +-- ext-community*
       |     |                       |     bct:bgp-ext-community-type
       |     |                       +-- ext-community-raw*
       |     |                       |     string
       |     |                       +-- ipv6-ext-community*
       |     |                       |     bct:bgp-ipv6-ext-community-type
       |     |                       +-- ipv6-ext-community-raw*
       |     |                       |     string
       |     |                       +-- large-community*
       |     |                       |     bct:bgp-large-community-type
       |     |                       +-- last-modified?
       |     |                       |     yang:timeticks
       |     |                       +-- eligible-route?
       |     |                       |     boolean
       |     |                       +-- ineligible-reason?
       |     |                       |     identityref
       |     |                       +-- unknown-attributes
       |     |                       |  +-- unknown-attribute*
       |     |                       |        [attr-type]
       |     |                       |     +-- attr-type     uint8
       |     |                       |     +-- optional?     boolean
       |     |                       |     +-- transitive?   boolean
       |     |                       |     +-- partial?      boolean
       |     |                       |     +-- extended?     boolean
       |     |                       |     +-- attr-len?     uint16
       |     |                       |     +-- attr-value?   binary
       |     |                       +-- reject-reason?
       |     |                             union
       |     +-- path-status!
       |     |  +-- invalid?                    boolean
       |     |  +-- best?                       boolean
       |     |  +-- nonselected?                boolean
       |     |  +-- primary?                    boolean
       |     |  +-- backup?                     boolean
       |     |  +-- non-installed?              boolean
       |     |  +-- best-external?              boolean
       |     |  +-- add-path?                   boolean
       |     |  +-- filtered-inbound-policy?    boolean
       |     |  +-- filtered-outbound-policy?   boolean
       |     |  +-- stale?                      boolean
       |     |  +-- suppressed?                 boolean
       |     |  +-- reason-code?
       |     |        path-status-reason-code
       |     +-- vrf-table-name?       string
       |     +-- sequence-number?      uint64
       |     +-- timestamps* [timestamp-type]
       |     |  +-- timestamp-type    timestamp-type
       |     |  +-- timestamp         yang:date-and-time
       |     +-- extended-flags!
       |        +-- ipv6-peer?        boolean
       |        +-- post-policy?      boolean
       |        +-- legacy-as-path?   boolean
       |        +-- adj-rib-out?      boolean
       |        +-- filtered?         boolean
       +--:(statistics-report)
       |  +-- statistics-report
       |     +-- peer-type             peer-type
       |     +-- peer-flags
       |     |  +-- ipv6-peer?        boolean
       |     |  +-- post-policy?      boolean
       |     |  +-- legacy-as-path?   boolean
       |     |  +-- adj-rib-out?      boolean
       |     |  +-- filtered?         boolean
       |     +-- peer-distinguisher    rt-types:route-distinguisher
       |     +-- peer-address          inet:ip-address
       |     +-- peer-as               uint32
       |     +-- peer-bgp-id           inet:ipv4-address
       |     +-- timestamp?            yang:date-and-time
       |     +-- statistics-type?      string
       |     +-- statistics-data?      uint64
       |     +-- sequence-number?      uint64
       |     +-- timestamps* [timestamp-type]
       |     |  +-- timestamp-type    timestamp-type
       |     |  +-- timestamp         yang:date-and-time
       |     +-- extended-flags!
       |        +-- ipv6-peer?        boolean
       |        +-- post-policy?      boolean
       |        +-- legacy-as-path?   boolean
       |        +-- adj-rib-out?      boolean
       |        +-- filtered?         boolean
       +--:(peer-down-notification)
       |  +-- peer-down-notification
       |     +-- peer-type             peer-type
       |     +-- peer-flags
       |     |  +-- ipv6-peer?        boolean
       |     |  +-- post-policy?      boolean
       |     |  +-- legacy-as-path?   boolean
       |     |  +-- adj-rib-out?      boolean
       |     |  +-- filtered?         boolean
       |     +-- peer-distinguisher    rt-types:route-distinguisher
       |     +-- peer-address          inet:ip-address
       |     +-- peer-as               uint32
       |     +-- peer-bgp-id           inet:ipv4-address
       |     +-- timestamp?            yang:date-and-time
       |     +-- reason                peer-down-reason-code
       |     +-- peer-down
       |     |  +-- vrf-table-name?   string
       |     +-- sequence-number?      uint64
       |     +-- timestamps* [timestamp-type]
       |     |  +-- timestamp-type    timestamp-type
       |     |  +-- timestamp         yang:date-and-time
       |     +-- extended-flags!
       |        +-- ipv6-peer?        boolean
       |        +-- post-policy?      boolean
       |        +-- legacy-as-path?   boolean
       |        +-- adj-rib-out?      boolean
       |        +-- filtered?         boolean
       +--:(peer-up-notification)
       |  +-- peer-up-notification
       |     +-- peer-type             peer-type
       |     +-- peer-flags
       |     |  +-- ipv6-peer?        boolean
       |     |  +-- post-policy?      boolean
       |     |  +-- legacy-as-path?   boolean
       |     |  +-- adj-rib-out?      boolean
       |     |  +-- filtered?         boolean
       |     +-- peer-distinguisher    rt-types:route-distinguisher
       |     +-- peer-address          inet:ip-address
       |     +-- peer-as               uint32
       |     +-- peer-bgp-id           inet:ipv4-address
       |     +-- timestamp?            yang:date-and-time
       |     +-- local-address?        inet:ip-address
       |     +-- local-port?           inet:port-number
       |     +-- remote-port?          inet:port-number
       |     +-- sent-open
       |     |  +-- version           uint8
       |     |  +-- my-as             uint32
       |     |  +-- hold-time         uint16
       |     |  +-- bgp-identifier    inet:ipv4-address
       |     |  +-- capabilities* [code index]
       |     |     +-- code     uint8
       |     |     +-- index    uint8
       |     |     +-- name?    identityref
       |     |     +-- value
       |     |        +-- mpbgp
       |     |        |  +-- afi?    iana-rt-types:address-family
       |     |        |  +-- safi?   iana-rt-types:bgp-safi
       |     |        |  +-- name?   identityref
       |     |        +-- graceful-restart
       |     |        |  +-- flags?
       |     |        |  |     bt:graceful-restart-flags
       |     |        |  +-- unknown-flags?   bits
       |     |        |  +-- restart-time?
       |     |        |  |     bt:graceful-restart-time-type
       |     |        |  +-- afi-safis*
       |     |        |     +-- afi?
       |     |        |     |     iana-rt-types:address-family
       |     |        |     +-- safi?
       |     |        |     |     iana-rt-types:bgp-safi
       |     |        |     +-- afi-safi-flags?
       |     |        |     |     bt:graceful-restart-flags-for-afi
       |     |        |     +-- afi-safi-unknown-flags?   bits
       |     |        +-- asn32
       |     |        |  +-- as?   inet:as-number
       |     |        +-- add-paths
       |     |           +-- afi-safis*
       |     |              +-- afi?    iana-rt-types:address-family
       |     |              +-- safi?   iana-rt-types:bgp-safi
       |     |              +-- mode?   enumeration
       |     +-- received-open
       |     |  +-- version           uint8
       |     |  +-- my-as             uint32
       |     |  +-- hold-time         uint16
       |     |  +-- bgp-identifier    inet:ipv4-address
       |     |  +-- capabilities* [code index]
       |     |     +-- code     uint8
       |     |     +-- index    uint8
       |     |     +-- name?    identityref
       |     |     +-- value
       |     |        +-- mpbgp
       |     |        |  +-- afi?    iana-rt-types:address-family
       |     |        |  +-- safi?   iana-rt-types:bgp-safi
       |     |        |  +-- name?   identityref
       |     |        +-- graceful-restart
       |     |        |  +-- flags?
       |     |        |  |     bt:graceful-restart-flags
       |     |        |  +-- unknown-flags?   bits
       |     |        |  +-- restart-time?
       |     |        |  |     bt:graceful-restart-time-type
       |     |        |  +-- afi-safis*
       |     |        |     +-- afi?
       |     |        |     |     iana-rt-types:address-family
       |     |        |     +-- safi?
       |     |        |     |     iana-rt-types:bgp-safi
       |     |        |     +-- afi-safi-flags?
       |     |        |     |     bt:graceful-restart-flags-for-afi
       |     |        |     +-- afi-safi-unknown-flags?   bits
       |     |        +-- asn32
       |     |        |  +-- as?   inet:as-number
       |     |        +-- add-paths
       |     |           +-- afi-safis*
       |     |              +-- afi?    iana-rt-types:address-family
       |     |              +-- safi?   iana-rt-types:bgp-safi
       |     |              +-- mode?   enumeration
       |     +-- information!
       |     |  +-- string*           string
       |     |  +-- sys-descr?        string
       |     |  +-- sys-name?         string
       |     |  +-- vrf-table-name?   string
       |     +-- sequence-number?      uint64
       |     +-- timestamps* [timestamp-type]
       |     |  +-- timestamp-type    timestamp-type
       |     |  +-- timestamp         yang:date-and-time
       |     +-- extended-flags!
       |        +-- ipv6-peer?        boolean
       |        +-- post-policy?      boolean
       |        +-- legacy-as-path?   boolean
       |        +-- adj-rib-out?      boolean
       |        +-- filtered?         boolean
       +--:(initiation-message)
       |  +-- initiation-message
       |     +-- string*            string
       |     +-- sys-descr?         string
       |     +-- sys-name?          string
       |     +-- vrf-table-name?    string
       |     +-- sequence-number?   uint64
       |     +-- timestamps* [timestamp-type]
       |     |  +-- timestamp-type    timestamp-type
       |     |  +-- timestamp         yang:date-and-time
       |     +-- extended-flags!
       |        +-- ipv6-peer?        boolean
       |        +-- post-policy?      boolean
       |        +-- legacy-as-path?   boolean
       |        +-- adj-rib-out?      boolean
       |        +-- filtered?         boolean
       +--:(termination-message)
       |  +-- termination-message
       |     +-- string*            string
       |     +-- reason             enumeration
       |     +-- sequence-number?   uint64
       |     +-- timestamps* [timestamp-type]
       |     |  +-- timestamp-type    timestamp-type
       |     |  +-- timestamp         yang:date-and-time
       |     +-- extended-flags!
       |        +-- ipv6-peer?        boolean
       |        +-- post-policy?      boolean
       |        +-- legacy-as-path?   boolean
       |        +-- adj-rib-out?      boolean
       |        +-- filtered?         boolean
       +--:(route-mirroring-message)
          +-- route-mirroring-message
             +-- peer-type             peer-type
             +-- peer-flags
             |  +-- ipv6-peer?        boolean
             |  +-- post-policy?      boolean
             |  +-- legacy-as-path?   boolean
             |  +-- adj-rib-out?      boolean
             |  +-- filtered?         boolean
             +-- peer-distinguisher    rt-types:route-distinguisher
             +-- peer-address          inet:ip-address
             +-- peer-as               uint32
             +-- peer-bgp-id           inet:ipv4-address
             +-- timestamp?            yang:date-and-time
             +-- afi-safi-type         identityref
             +-- rib-entry
             |  +-- (afi-safi)
             |     +--:(ipv4-unicast)
             |     |  +-- ipv4-unicast
             |     |     +-- (rib-type)
             |     |        +--:(loc-rib)
             |     |        |  +-- loc-rib
             |     |        |     +-- route
             |     |        |        +-- prefix
             |     |        |        |     inet:ipv4-prefix
             |     |        |        +-- origin?
             |     |        |        |     union
             |     |        |        +-- path-id?
             |     |        |        |     uint32
             |     |        |        +-- attributes
             |     |        |        |  +-- origin
             |     |        |        |  |     bt:bgp-origin-attr-type
             |     |        |        |  +-- as-path
             |     |        |        |  |  +-- segment*
             |     |        |        |  |     +-- type?
             |     |        |        |  |     |     bt:as-path-segment-type
             |     |        |        |  |     +-- member*
             |     |        |        |  |           inet:as-number
             |     |        |        |  +-- next-hop?
             |     |        |        |  |     inet:ip-address
             |     |        |        |  +-- link-local-next-hop?
             |     |        |        |  |     inet:ipv6-address
             |     |        |        |  +-- med?
             |     |        |        |  |     uint32
             |     |        |        |  +-- local-pref?
             |     |        |        |  |     uint32
             |     |        |        |  +-- as4-path
             |     |        |        |  |  +-- segment*
             |     |        |        |  |     +-- type?
             |     |        |        |  |     |     bt:as-path-segment-type
             |     |        |        |  |     +-- member*
             |     |        |        |  |           inet:as-number
             |     |        |        |  +-- aggregator
             |     |        |        |  |  +-- as?
             |     |        |        |  |  |     inet:as-number
             |     |        |        |  |  +-- identifier?
             |     |        |        |  |        yang:dotted-quad
             |     |        |        |  +-- aggregator4
             |     |        |        |  |  +-- as4?
             |     |        |        |  |  |     inet:as-number
             |     |        |        |  |  +-- identifier?
             |     |        |        |  |        yang:dotted-quad
             |     |        |        |  +-- atomic-aggregate?
             |     |        |        |  |     boolean
             |     |        |        |  +-- originator-id?
             |     |        |        |  |     yang:dotted-quad
             |     |        |        |  +-- cluster-list*
             |     |        |        |  |     yang:dotted-quad
             |     |        |        |  +-- aigp-metric?
             |     |        |        |        uint64
             |     |        |        +-- community*
             |     |        |        |     union
             |     |        |        +-- ext-community*
             |     |        |        |     bct:bgp-ext-community-type
             |     |        |        +-- ext-community-raw*
             |     |        |        |     string
             |     |        |        +-- ipv6-ext-community*
             |     |        |        |     bct:bgp-ipv6-ext-community-type
             |     |        |        +-- ipv6-ext-community-raw*
             |     |        |        |     string
             |     |        |        +-- large-community*
             |     |        |        |     bct:bgp-large-community-type
             |     |        |        +-- last-modified?
             |     |        |        |     yang:timeticks
             |     |        |        +-- eligible-route?
             |     |        |        |     boolean
             |     |        |        +-- ineligible-reason?
             |     |        |        |     identityref
             |     |        |        +-- unknown-attributes
             |     |        |        |  +-- unknown-attribute*
             |     |        |        |        [attr-type]
             |     |        |        |     +-- attr-type     uint8
             |     |        |        |     +-- optional?     boolean
             |     |        |        |     +-- transitive?   boolean
             |     |        |        |     +-- partial?      boolean
             |     |        |        |     +-- extended?     boolean
             |     |        |        |     +-- attr-len?     uint16
             |     |        |        |     +-- attr-value?   binary
             |     |        |        +-- reject-reason?
             |     |        |              union
             |     |        +--:(adj-rib-in-pre)
             |     |        |  +-- adj-rib-in-pre
             |     |        |     +-- route
             |     |        |        +-- prefix
             |     |        |        |     inet:ipv4-prefix
             |     |        |        +-- path-id?
             |     |        |        |     uint32
             |     |        |        +-- attributes
             |     |        |        |  +-- origin
             |     |        |        |  |     bt:bgp-origin-attr-type
             |     |        |        |  +-- as-path
             |     |        |        |  |  +-- segment*
             |     |        |        |  |     +-- type?
             |     |        |        |  |     |     bt:as-path-segment-type
             |     |        |        |  |     +-- member*
             |     |        |        |  |           inet:as-number
             |     |        |        |  +-- next-hop?
             |     |        |        |  |     inet:ip-address
             |     |        |        |  +-- link-local-next-hop?
             |     |        |        |  |     inet:ipv6-address
             |     |        |        |  +-- med?
             |     |        |        |  |     uint32
             |     |        |        |  +-- local-pref?
             |     |        |        |  |     uint32
             |     |        |        |  +-- as4-path
             |     |        |        |  |  +-- segment*
             |     |        |        |  |     +-- type?
             |     |        |        |  |     |     bt:as-path-segment-type
             |     |        |        |  |     +-- member*
             |     |        |        |  |           inet:as-number
             |     |        |        |  +-- aggregator
             |     |        |        |  |  +-- as?
             |     |        |        |  |  |     inet:as-number
             |     |        |        |  |  +-- identifier?
             |     |        |        |  |        yang:dotted-quad
             |     |        |        |  +-- aggregator4
             |     |        |        |  |  +-- as4?
             |     |        |        |  |  |     inet:as-number
             |     |        |        |  |  +-- identifier?
             |     |        |        |  |        yang:dotted-quad
             |     |        |        |  +-- atomic-aggregate?
             |     |        |        |  |     boolean
             |     |        |        |  +-- originator-id?
             |     |        |        |  |     yang:dotted-quad
             |     |        |        |  +-- cluster-list*
             |     |        |        |  |     yang:dotted-quad
             |     |        |        |  +-- aigp-metric?
             |     |        |        |        uint64
             |     |        |        +-- community*
             |     |        |        |     union
             |     |        |        +-- ext-community*
             |     |        |        |     bct:bgp-ext-community-type
             |     |        |        +-- ext-community-raw*
             |     |        |        |     string
             |     |        |        +-- ipv6-ext-community*
             |     |        |        |     bct:bgp-ipv6-ext-community-type
             |     |        |        +-- ipv6-ext-community-raw*
             |     |        |        |     string
             |     |        |        +-- large-community*
             |     |        |        |     bct:bgp-large-community-type
             |     |        |        +-- last-modified?
             |     |        |        |     yang:timeticks
             |     |        |        +-- eligible-route?
             |     |        |        |     boolean
             |     |        |        +-- ineligible-reason?
             |     |        |        |     identityref
             |     |        |        +-- unknown-attributes
             |     |        |        |  +-- unknown-attribute*
             |     |        |        |        [attr-type]
             |     |        |        |     +-- attr-type     uint8
             |     |        |        |     +-- optional?     boolean
             |     |        |        |     +-- transitive?   boolean
             |     |        |        |     +-- partial?      boolean
             |     |        |        |     +-- extended?     boolean
             |     |        |        |     +-- attr-len?     uint16
             |     |        |        |     +-- attr-value?   binary
             |     |        |        +-- reject-reason?
             |     |        |              union
             |     |        +--:(adj-rib-in-post)
             |     |        |  +-- adj-rib-in-post
             |     |        |     +-- route
             |     |        |        +-- prefix
             |     |        |        |     inet:ipv4-prefix
             |     |        |        +-- path-id?
             |     |        |        |     uint32
             |     |        |        +-- attributes
             |     |        |        |  +-- origin
             |     |        |        |  |     bt:bgp-origin-attr-type
             |     |        |        |  +-- as-path
             |     |        |        |  |  +-- segment*
             |     |        |        |  |     +-- type?
             |     |        |        |  |     |     bt:as-path-segment-type
             |     |        |        |  |     +-- member*
             |     |        |        |  |           inet:as-number
             |     |        |        |  +-- next-hop?
             |     |        |        |  |     inet:ip-address
             |     |        |        |  +-- link-local-next-hop?
             |     |        |        |  |     inet:ipv6-address
             |     |        |        |  +-- med?
             |     |        |        |  |     uint32
             |     |        |        |  +-- local-pref?
             |     |        |        |  |     uint32
             |     |        |        |  +-- as4-path
             |     |        |        |  |  +-- segment*
             |     |        |        |  |     +-- type?
             |     |        |        |  |     |     bt:as-path-segment-type
             |     |        |        |  |     +-- member*
             |     |        |        |  |           inet:as-number
             |     |        |        |  +-- aggregator
             |     |        |        |  |  +-- as?
             |     |        |        |  |  |     inet:as-number
             |     |        |        |  |  +-- identifier?
             |     |        |        |  |        yang:dotted-quad
             |     |        |        |  +-- aggregator4
             |     |        |        |  |  +-- as4?
             |     |        |        |  |  |     inet:as-number
             |     |        |        |  |  +-- identifier?
             |     |        |        |  |        yang:dotted-quad
             |     |        |        |  +-- atomic-aggregate?
             |     |        |        |  |     boolean
             |     |        |        |  +-- originator-id?
             |     |        |        |  |     yang:dotted-quad
             |     |        |        |  +-- cluster-list*
             |     |        |        |  |     yang:dotted-quad
             |     |        |        |  +-- aigp-metric?
             |     |        |        |        uint64
             |     |        |        +-- community*
             |     |        |        |     union
             |     |        |        +-- ext-community*
             |     |        |        |     bct:bgp-ext-community-type
             |     |        |        +-- ext-community-raw*
             |     |        |        |     string
             |     |        |        +-- ipv6-ext-community*
             |     |        |        |     bct:bgp-ipv6-ext-community-type
             |     |        |        +-- ipv6-ext-community-raw*
             |     |        |        |     string
             |     |        |        +-- large-community*
             |     |        |        |     bct:bgp-large-community-type
             |     |        |        +-- last-modified?
             |     |        |        |     yang:timeticks
             |     |        |        +-- eligible-route?
             |     |        |        |     boolean
             |     |        |        +-- ineligible-reason?
             |     |        |        |     identityref
             |     |        |        +-- best-path?
             |     |        |        |     boolean
             |     |        |        +-- unknown-attributes
             |     |        |        |  +-- unknown-attribute*
             |     |        |        |        [attr-type]
             |     |        |        |     +-- attr-type     uint8
             |     |        |        |     +-- optional?     boolean
             |     |        |        |     +-- transitive?   boolean
             |     |        |        |     +-- partial?      boolean
             |     |        |        |     +-- extended?     boolean
             |     |        |        |     +-- attr-len?     uint16
             |     |        |        |     +-- attr-value?   binary
             |     |        |        +-- reject-reason?
             |     |        |              union
             |     |        +--:(adj-rib-out-pre)
             |     |        |  +-- adj-rib-out-pre
             |     |        |     +-- route
             |     |        |        +-- prefix
             |     |        |        |     inet:ipv4-prefix
             |     |        |        +-- path-id?
             |     |        |        |     uint32
             |     |        |        +-- attributes
             |     |        |        |  +-- origin
             |     |        |        |  |     bt:bgp-origin-attr-type
             |     |        |        |  +-- as-path
             |     |        |        |  |  +-- segment*
             |     |        |        |  |     +-- type?
             |     |        |        |  |     |     bt:as-path-segment-type
             |     |        |        |  |     +-- member*
             |     |        |        |  |           inet:as-number
             |     |        |        |  +-- next-hop?
             |     |        |        |  |     inet:ip-address
             |     |        |        |  +-- link-local-next-hop?
             |     |        |        |  |     inet:ipv6-address
             |     |        |        |  +-- med?
             |     |        |        |  |     uint32
             |     |        |        |  +-- local-pref?
             |     |        |        |  |     uint32
             |     |        |        |  +-- as4-path
             |     |        |        |  |  +-- segment*
             |     |        |        |  |     +-- type?
             |     |        |        |  |     |     bt:as-path-segment-type
             |     |        |        |  |     +-- member*
             |     |        |        |  |           inet:as-number
             |     |        |        |  +-- aggregator
             |     |        |        |  |  +-- as?
             |     |        |        |  |  |     inet:as-number
             |     |        |        |  |  +-- identifier?
             |     |        |        |  |        yang:dotted-quad
             |     |        |        |  +-- aggregator4
             |     |        |        |  |  +-- as4?
             |     |        |        |  |  |     inet:as-number
             |     |        |        |  |  +-- identifier?
             |     |        |        |  |        yang:dotted-quad
             |     |        |        |  +-- atomic-aggregate?
             |     |        |        |  |     boolean
             |     |        |        |  +-- originator-id?
             |     |        |        |  |     yang:dotted-quad
             |     |        |        |  +-- cluster-list*
             |     |        |        |  |     yang:dotted-quad
             |     |        |        |  +-- aigp-metric?
             |     |        |        |        uint64
             |     |        |        +-- community*
             |     |        |        |     union
             |     |        |        +-- ext-community*
             |     |        |        |     bct:bgp-ext-community-type
             |     |        |        +-- ext-community-raw*
             |     |        |        |     string
             |     |        |        +-- ipv6-ext-community*
             |     |        |        |     bct:bgp-ipv6-ext-community-type
             |     |        |        +-- ipv6-ext-community-raw*
             |     |        |        |     string
             |     |        |        +-- large-community*
             |     |        |        |     bct:bgp-large-community-type
             |     |        |        +-- last-modified?
             |     |        |        |     yang:timeticks
             |     |        |        +-- eligible-route?
             |     |        |        |     boolean
             |     |        |        +-- ineligible-reason?
             |     |        |        |     identityref
             |     |        |        +-- unknown-attributes
             |     |        |        |  +-- unknown-attribute*
             |     |        |        |        [attr-type]
             |     |        |        |     +-- attr-type     uint8
             |     |        |        |     +-- optional?     boolean
             |     |        |        |     +-- transitive?   boolean
             |     |        |        |     +-- partial?      boolean
             |     |        |        |     +-- extended?     boolean
             |     |        |        |     +-- attr-len?     uint16
             |     |        |        |     +-- attr-value?   binary
             |     |        |        +-- reject-reason?
             |     |        |              union
             |     |        +--:(adj-rib-out-post)
             |     |           +-- adj-rib-out-post
             |     |              +-- route
             |     |                 +-- prefix
             |     |                 |     inet:ipv4-prefix
             |     |                 +-- path-id?
             |     |                 |     uint32
             |     |                 +-- attributes
             |     |                 |  +-- origin
             |     |                 |  |     bt:bgp-origin-attr-type
             |     |                 |  +-- as-path
             |     |                 |  |  +-- segment*
             |     |                 |  |     +-- type?
             |     |                 |  |     |     bt:as-path-segment-type
             |     |                 |  |     +-- member*
             |     |                 |  |           inet:as-number
             |     |                 |  +-- next-hop?
             |     |                 |  |     inet:ip-address
             |     |                 |  +-- link-local-next-hop?
             |     |                 |  |     inet:ipv6-address
             |     |                 |  +-- med?
             |     |                 |  |     uint32
             |     |                 |  +-- local-pref?
             |     |                 |  |     uint32
             |     |                 |  +-- as4-path
             |     |                 |  |  +-- segment*
             |     |                 |  |     +-- type?
             |     |                 |  |     |     bt:as-path-segment-type
             |     |                 |  |     +-- member*
             |     |                 |  |           inet:as-number
             |     |                 |  +-- aggregator
             |     |                 |  |  +-- as?
             |     |                 |  |  |     inet:as-number
             |     |                 |  |  +-- identifier?
             |     |                 |  |        yang:dotted-quad
             |     |                 |  +-- aggregator4
             |     |                 |  |  +-- as4?
             |     |                 |  |  |     inet:as-number
             |     |                 |  |  +-- identifier?
             |     |                 |  |        yang:dotted-quad
             |     |                 |  +-- atomic-aggregate?
             |     |                 |  |     boolean
             |     |                 |  +-- originator-id?
             |     |                 |  |     yang:dotted-quad
             |     |                 |  +-- cluster-list*
             |     |                 |  |     yang:dotted-quad
             |     |                 |  +-- aigp-metric?
             |     |                 |        uint64
             |     |                 +-- community*
             |     |                 |     union
             |     |                 +-- ext-community*
             |     |                 |     bct:bgp-ext-community-type
             |     |                 +-- ext-community-raw*
             |     |                 |     string
             |     |                 +-- ipv6-ext-community*
             |     |                 |     bct:bgp-ipv6-ext-community-type
             |     |                 +-- ipv6-ext-community-raw*
             |     |                 |     string
             |     |                 +-- large-community*
             |     |                 |     bct:bgp-large-community-type
             |     |                 +-- last-modified?
             |     |                 |     yang:timeticks
             |     |                 +-- eligible-route?
             |     |                 |     boolean
             |     |                 +-- ineligible-reason?
             |     |                 |     identityref
             |     |                 +-- unknown-attributes
             |     |                 |  +-- unknown-attribute*
             |     |                 |        [attr-type]
             |     |                 |     +-- attr-type     uint8
             |     |                 |     +-- optional?     boolean
             |     |                 |     +-- transitive?   boolean
             |     |                 |     +-- partial?      boolean
             |     |                 |     +-- extended?     boolean
             |     |                 |     +-- attr-len?     uint16
             |     |                 |     +-- attr-value?   binary
             |     |                 +-- reject-reason?
             |     |                       union
             |     +--:(ipv6-unicast)
             |        +-- ipv6-unicast
             |           +-- (rib-type)
             |              +--:(loc-rib)
             |              |  +-- loc-rib
             |              |     +-- route
             |              |        +-- prefix
             |              |        |     inet:ipv6-prefix
             |              |        +-- origin?
             |              |        |     union
             |              |        +-- path-id?
             |              |        |     uint32
             |              |        +-- attributes
             |              |        |  +-- origin
             |              |        |  |     bt:bgp-origin-attr-type
             |              |        |  +-- as-path
             |              |        |  |  +-- segment*
             |              |        |  |     +-- type?
             |              |        |  |     |     bt:as-path-segment-type
             |              |        |  |     +-- member*
             |              |        |  |           inet:as-number
             |              |        |  +-- next-hop?
             |              |        |  |     inet:ip-address
             |              |        |  +-- link-local-next-hop?
             |              |        |  |     inet:ipv6-address
             |              |        |  +-- med?
             |              |        |  |     uint32
             |              |        |  +-- local-pref?
             |              |        |  |     uint32
             |              |        |  +-- as4-path
             |              |        |  |  +-- segment*
             |              |        |  |     +-- type?
             |              |        |  |     |     bt:as-path-segment-type
             |              |        |  |     +-- member*
             |              |        |  |           inet:as-number
             |              |        |  +-- aggregator
             |              |        |  |  +-- as?
             |              |        |  |  |     inet:as-number
             |              |        |  |  +-- identifier?
             |              |        |  |        yang:dotted-quad
             |              |        |  +-- aggregator4
             |              |        |  |  +-- as4?
             |              |        |  |  |     inet:as-number
             |              |        |  |  +-- identifier?
             |              |        |  |        yang:dotted-quad
             |              |        |  +-- atomic-aggregate?
             |              |        |  |     boolean
             |              |        |  +-- originator-id?
             |              |        |  |     yang:dotted-quad
             |              |        |  +-- cluster-list*
             |              |        |  |     yang:dotted-quad
             |              |        |  +-- aigp-metric?
             |              |        |        uint64
             |              |        +-- community*
             |              |        |     union
             |              |        +-- ext-community*
             |              |        |     bct:bgp-ext-community-type
             |              |        +-- ext-community-raw*
             |              |        |     string
             |              |        +-- ipv6-ext-community*
             |              |        |     bct:bgp-ipv6-ext-community-type
             |              |        +-- ipv6-ext-community-raw*
             |              |        |     string
             |              |        +-- large-community*
             |              |        |     bct:bgp-large-community-type
             |              |        +-- last-modified?
             |              |        |     yang:timeticks
             |              |        +-- eligible-route?
             |              |        |     boolean
             |              |        +-- ineligible-reason?
             |              |        |     identityref
             |              |        +-- unknown-attributes
             |              |        |  +-- unknown-attribute*
             |              |        |        [attr-type]
             |              |        |     +-- attr-type     uint8
             |              |        |     +-- optional?     boolean
             |              |        |     +-- transitive?   boolean
             |              |        |     +-- partial?      boolean
             |              |        |     +-- extended?     boolean
             |              |        |     +-- attr-len?     uint16
             |              |        |     +-- attr-value?   binary
             |              |        +-- reject-reason?
             |              |              union
             |              +--:(adj-rib-in-pre)
             |              |  +-- adj-rib-in-pre
             |              |     +-- route
             |              |        +-- prefix
             |              |        |     inet:ipv6-prefix
             |              |        +-- path-id?
             |              |        |     uint32
             |              |        +-- attributes
             |              |        |  +-- origin
             |              |        |  |     bt:bgp-origin-attr-type
             |              |        |  +-- as-path
             |              |        |  |  +-- segment*
             |              |        |  |     +-- type?
             |              |        |  |     |     bt:as-path-segment-type
             |              |        |  |     +-- member*
             |              |        |  |           inet:as-number
             |              |        |  +-- next-hop?
             |              |        |  |     inet:ip-address
             |              |        |  +-- link-local-next-hop?
             |              |        |  |     inet:ipv6-address
             |              |        |  +-- med?
             |              |        |  |     uint32
             |              |        |  +-- local-pref?
             |              |        |  |     uint32
             |              |        |  +-- as4-path
             |              |        |  |  +-- segment*
             |              |        |  |     +-- type?
             |              |        |  |     |     bt:as-path-segment-type
             |              |        |  |     +-- member*
             |              |        |  |           inet:as-number
             |              |        |  +-- aggregator
             |              |        |  |  +-- as?
             |              |        |  |  |     inet:as-number
             |              |        |  |  +-- identifier?
             |              |        |  |        yang:dotted-quad
             |              |        |  +-- aggregator4
             |              |        |  |  +-- as4?
             |              |        |  |  |     inet:as-number
             |              |        |  |  +-- identifier?
             |              |        |  |        yang:dotted-quad
             |              |        |  +-- atomic-aggregate?
             |              |        |  |     boolean
             |              |        |  +-- originator-id?
             |              |        |  |     yang:dotted-quad
             |              |        |  +-- cluster-list*
             |              |        |  |     yang:dotted-quad
             |              |        |  +-- aigp-metric?
             |              |        |        uint64
             |              |        +-- community*
             |              |        |     union
             |              |        +-- ext-community*
             |              |        |     bct:bgp-ext-community-type
             |              |        +-- ext-community-raw*
             |              |        |     string
             |              |        +-- ipv6-ext-community*
             |              |        |     bct:bgp-ipv6-ext-community-type
             |              |        +-- ipv6-ext-community-raw*
             |              |        |     string
             |              |        +-- large-community*
             |              |        |     bct:bgp-large-community-type
             |              |        +-- last-modified?
             |              |        |     yang:timeticks
             |              |        +-- eligible-route?
             |              |        |     boolean
             |              |        +-- ineligible-reason?
             |              |        |     identityref
             |              |        +-- unknown-attributes
             |              |        |  +-- unknown-attribute*
             |              |        |        [attr-type]
             |              |        |     +-- attr-type     uint8
             |              |        |     +-- optional?     boolean
             |              |        |     +-- transitive?   boolean
             |              |        |     +-- partial?      boolean
             |              |        |     +-- extended?     boolean
             |              |        |     +-- attr-len?     uint16
             |              |        |     +-- attr-value?   binary
             |              |        +-- reject-reason?
             |              |              union
             |              +--:(adj-rib-in-post)
             |              |  +-- adj-rib-in-post
             |              |     +-- route
             |              |        +-- prefix
             |              |        |     inet:ipv6-prefix
             |              |        +-- path-id?
             |              |        |     uint32
             |              |        +-- attributes
             |              |        |  +-- origin
             |              |        |  |     bt:bgp-origin-attr-type
             |              |        |  +-- as-path
             |              |        |  |  +-- segment*
             |              |        |  |     +-- type?
             |              |        |  |     |     bt:as-path-segment-type
             |              |        |  |     +-- member*
             |              |        |  |           inet:as-number
             |              |        |  +-- next-hop?
             |              |        |  |     inet:ip-address
             |              |        |  +-- link-local-next-hop?
             |              |        |  |     inet:ipv6-address
             |              |        |  +-- med?
             |              |        |  |     uint32
             |              |        |  +-- local-pref?
             |              |        |  |     uint32
             |              |        |  +-- as4-path
             |              |        |  |  +-- segment*
             |              |        |  |     +-- type?
             |              |        |  |     |     bt:as-path-segment-type
             |              |        |  |     +-- member*
             |              |        |  |           inet:as-number
             |              |        |  +-- aggregator
             |              |        |  |  +-- as?
             |              |        |  |  |     inet:as-number
             |              |        |  |  +-- identifier?
             |              |        |  |        yang:dotted-quad
             |              |        |  +-- aggregator4
             |              |        |  |  +-- as4?
             |              |        |  |  |     inet:as-number
             |              |        |  |  +-- identifier?
             |              |        |  |        yang:dotted-quad
             |              |        |  +-- atomic-aggregate?
             |              |        |  |     boolean
             |              |        |  +-- originator-id?
             |              |        |  |     yang:dotted-quad
             |              |        |  +-- cluster-list*
             |              |        |  |     yang:dotted-quad
             |              |        |  +-- aigp-metric?
             |              |        |        uint64
             |              |        +-- community*
             |              |        |     union
             |              |        +-- ext-community*
             |              |        |     bct:bgp-ext-community-type
             |              |        +-- ext-community-raw*
             |              |        |     string
             |              |        +-- ipv6-ext-community*
             |              |        |     bct:bgp-ipv6-ext-community-type
             |              |        +-- ipv6-ext-community-raw*
             |              |        |     string
             |              |        +-- large-community*
             |              |        |     bct:bgp-large-community-type
             |              |        +-- last-modified?
             |              |        |     yang:timeticks
             |              |        +-- eligible-route?
             |              |        |     boolean
             |              |        +-- ineligible-reason?
             |              |        |     identityref
             |              |        +-- best-path?
             |              |        |     boolean
             |              |        +-- unknown-attributes
             |              |        |  +-- unknown-attribute*
             |              |        |        [attr-type]
             |              |        |     +-- attr-type     uint8
             |              |        |     +-- optional?     boolean
             |              |        |     +-- transitive?   boolean
             |              |        |     +-- partial?      boolean
             |              |        |     +-- extended?     boolean
             |              |        |     +-- attr-len?     uint16
             |              |        |     +-- attr-value?   binary
             |              |        +-- reject-reason?
             |              |              union
             |              +--:(adj-rib-out-pre)
             |              |  +-- adj-rib-out-pre
             |              |     +-- route
             |              |        +-- prefix
             |              |        |     inet:ipv6-prefix
             |              |        +-- path-id?
             |              |        |     uint32
             |              |        +-- attributes
             |              |        |  +-- origin
             |              |        |  |     bt:bgp-origin-attr-type
             |              |        |  +-- as-path
             |              |        |  |  +-- segment*
             |              |        |  |     +-- type?
             |              |        |  |     |     bt:as-path-segment-type
             |              |        |  |     +-- member*
             |              |        |  |           inet:as-number
             |              |        |  +-- next-hop?
             |              |        |  |     inet:ip-address
             |              |        |  +-- link-local-next-hop?
             |              |        |  |     inet:ipv6-address
             |              |        |  +-- med?
             |              |        |  |     uint32
             |              |        |  +-- local-pref?
             |              |        |  |     uint32
             |              |        |  +-- as4-path
             |              |        |  |  +-- segment*
             |              |        |  |     +-- type?
             |              |        |  |     |     bt:as-path-segment-type
             |              |        |  |     +-- member*
             |              |        |  |           inet:as-number
             |              |        |  +-- aggregator
             |              |        |  |  +-- as?
             |              |        |  |  |     inet:as-number
             |              |        |  |  +-- identifier?
             |              |        |  |        yang:dotted-quad
             |              |        |  +-- aggregator4
             |              |        |  |  +-- as4?
             |              |        |  |  |     inet:as-number
             |              |        |  |  +-- identifier?
             |              |        |  |        yang:dotted-quad
             |              |        |  +-- atomic-aggregate?
             |              |        |  |     boolean
             |              |        |  +-- originator-id?
             |              |        |  |     yang:dotted-quad
             |              |        |  +-- cluster-list*
             |              |        |  |     yang:dotted-quad
             |              |        |  +-- aigp-metric?
             |              |        |        uint64
             |              |        +-- community*
             |              |        |     union
             |              |        +-- ext-community*
             |              |        |     bct:bgp-ext-community-type
             |              |        +-- ext-community-raw*
             |              |        |     string
             |              |        +-- ipv6-ext-community*
             |              |        |     bct:bgp-ipv6-ext-community-type
             |              |        +-- ipv6-ext-community-raw*
             |              |        |     string
             |              |        +-- large-community*
             |              |        |     bct:bgp-large-community-type
             |              |        +-- last-modified?
             |              |        |     yang:timeticks
             |              |        +-- eligible-route?
             |              |        |     boolean
             |              |        +-- ineligible-reason?
             |              |        |     identityref
             |              |        +-- unknown-attributes
             |              |        |  +-- unknown-attribute*
             |              |        |        [attr-type]
             |              |        |     +-- attr-type     uint8
             |              |        |     +-- optional?     boolean
             |              |        |     +-- transitive?   boolean
             |              |        |     +-- partial?      boolean
             |              |        |     +-- extended?     boolean
             |              |        |     +-- attr-len?     uint16
             |              |        |     +-- attr-value?   binary
             |              |        +-- reject-reason?
             |              |              union
             |              +--:(adj-rib-out-post)
             |                 +-- adj-rib-out-post
             |                    +-- route
             |                       +-- prefix
             |                       |     inet:ipv6-prefix
             |                       +-- path-id?
             |                       |     uint32
             |                       +-- attributes
             |                       |  +-- origin
             |                       |  |     bt:bgp-origin-attr-type
             |                       |  +-- as-path
             |                       |  |  +-- segment*
             |                       |  |     +-- type?
             |                       |  |     |     bt:as-path-segment-type
             |                       |  |     +-- member*
             |                       |  |           inet:as-number
             |                       |  +-- next-hop?
             |                       |  |     inet:ip-address
             |                       |  +-- link-local-next-hop?
             |                       |  |     inet:ipv6-address
             |                       |  +-- med?
             |                       |  |     uint32
             |                       |  +-- local-pref?
             |                       |  |     uint32
             |                       |  +-- as4-path
             |                       |  |  +-- segment*
             |                       |  |     +-- type?
             |                       |  |     |     bt:as-path-segment-type
             |                       |  |     +-- member*
             |                       |  |           inet:as-number
             |                       |  +-- aggregator
             |                       |  |  +-- as?
             |                       |  |  |     inet:as-number
             |                       |  |  +-- identifier?
             |                       |  |        yang:dotted-quad
             |                       |  +-- aggregator4
             |                       |  |  +-- as4?
             |                       |  |  |     inet:as-number
             |                       |  |  +-- identifier?
             |                       |  |        yang:dotted-quad
             |                       |  +-- atomic-aggregate?
             |                       |  |     boolean
             |                       |  +-- originator-id?
             |                       |  |     yang:dotted-quad
             |                       |  +-- cluster-list*
             |                       |  |     yang:dotted-quad
             |                       |  +-- aigp-metric?
             |                       |        uint64
             |                       +-- community*
             |                       |     union
             |                       +-- ext-community*
             |                       |     bct:bgp-ext-community-type
             |                       +-- ext-community-raw*
             |                       |     string
             |                       +-- ipv6-ext-community*
             |                       |     bct:bgp-ipv6-ext-community-type
             |                       +-- ipv6-ext-community-raw*
             |                       |     string
             |                       +-- large-community*
             |                       |     bct:bgp-large-community-type
             |                       +-- last-modified?
             |                       |     yang:timeticks
             |                       +-- eligible-route?
             |                       |     boolean
             |                       +-- ineligible-reason?
             |                       |     identityref
             |                       +-- unknown-attributes
             |                       |  +-- unknown-attribute*
             |                       |        [attr-type]
             |                       |     +-- attr-type     uint8
             |                       |     +-- optional?     boolean
             |                       |     +-- transitive?   boolean
             |                       |     +-- partial?      boolean
             |                       |     +-- extended?     boolean
             |                       |     +-- attr-len?     uint16
             |                       |     +-- attr-value?   binary
             |                       +-- reject-reason?
             |                             union
             +-- information?          enumeration
             +-- sequence-number?      uint64
             +-- timestamps* [timestamp-type]
             |  +-- timestamp-type    timestamp-type
             |  +-- timestamp         yang:date-and-time
             +-- extended-flags!
                +-- ipv6-peer?        boolean
                +-- post-policy?      boolean
                +-- legacy-as-path?   boolean
                +-- adj-rib-out?      boolean
                +-- filtered?         boolean
]]>
</sourcecode>
      </figure>

      <section anchor="ietf-bmp-telemetry-message-module">
        <name>BMP Telemetry Message YANG Module</name>

        <!-- ietf-bmp-telemetry-message YANG Module -->
        <figure title="BMP YANG 'ietf-bmp-telemetry-message' module.">
          <sourcecode name="ietf-bmp-telemetry-message@2026-06-30.yang"
            type="yang" markers="true">
<![CDATA[
module ietf-bmp-telemetry-message {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bmp-telemetry-message";
  prefix bmptm;

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 9911: Common YANG Data Types";
  }
  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 9911: Common YANG Data Types";
  }
  import ietf-yang-structure-ext {
    prefix sx;
    reference
      "RFC 8791: YANG Data Structure Extensions";
  }
  import ietf-routing-types {
    prefix rt-types;
    reference
      "RFC 8294: Common YANG Data Types for the Routing Area.";
  }

  import ietf-bgp-open {
    prefix bgo;
    reference
      "RFC XXXX: YANG Model for a BGP OPEN Message.";
  }
  import ietf-bgp-rib-entry {
    prefix bre;
    reference
      "RFC XXXX: YANG Model for a BGP RIB Entry.";
  }
  import ietf-bmp-tlv {
    prefix btlv;
    reference
      "RFC XXXX: YANG Model for BMP TLVs.";
  }

  organization
    "IETF Draft";
  contact
    "Author:    Thomas Graf
                <mailto:thomas.graf@swisscom.com>
                Paolo Lucente
                <mailto:paolo@ntt.net>
                Leonardo Rodoni
                <mailto:leonardo.rodoni@swisscom.com>";

  description
    "Adds BMP specific subscription metadata to the data collection
     protocol provenance of the ietf-telemetry-message envelope.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
     are to be interpreted as described in BCP 14 (RFC 2119)
     (RFC 8174) when, and only when, they appear in all
     capitals, as shown here.

     Copyright (c) 2026 IETF Trust and the persons identified as
       authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with or without
     modification, is permitted pursuant to, and subject to the license
     terms contained in, the Revised BSD License set forth in Section
     4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see the RFC
     itself for full legal notices.";

  revision 2026-06-30 {
    description
      "Initial revision.";
    reference
      "RFC XXXX";
  }

  typedef peer-type {
    type enumeration {
      enum global-instance-peer {
        value 0;
        description
          "Global Instance Peer";
        reference
          "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
      }
      enum rd-instance-peer {
        value 1;
        description
          "RD Instance Peer";
        reference
          "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
      }
      enum local-instance-peer {
        value 2;
        description
          "Local Instance Peer";
        reference
          "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
      }
      enum loc-rib-instance-peer {
        value 3;
        description
          "Loc-RIB Instance Peer";
        reference
          "RFC 9069: Support for Local RIB in the BGP Monitoring
           Protocol (BMP)";
      }
    }
    description
      "BMP Peer Type.";
    reference
      "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
  }

  grouping per-peer {
    description
      "BMP per-peer header.";
    reference
      "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
    leaf peer-type {
      type peer-type;
      mandatory true;
      description
        "BMP peer type from per-peer header.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
    }
    container peer-flags {
      when "not(../extended-flags)" {
        description
          "Present only when the Extended Flags TLV is absent.
           When extended-flags is present it is authoritative
           and peer-flags MUST NOT be emitted.";
      }
      description
        "BMP Per-Peer Header Flags decoded from the Per-Peer Header
         Flags field.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
      uses btlv:peer-header-flags;
    }
    leaf peer-distinguisher {
      type rt-types:route-distinguisher;
      mandatory true;
      description
        "BMP peer distinguisher from per-peer header.
         The routing instance on which the encapsulated PDU was
         received.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
    }
    leaf peer-address {
      type inet:ip-address;
      mandatory true;
      description
        "BMP peer IP address from per-peer header.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2. The
         remote IP address associated with the TCP session over which
         the encapsulated PDU was received.";
    }
    leaf peer-as {
      type uint32;
      mandatory true;
      description
        "BMP peer autonomous system number from per-peer header. The
         Autonomous System number of the peer from which the
         encapsulated PDU was received.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
    }
    leaf peer-bgp-id {
      type inet:ipv4-address;
      mandatory true;
      description
        "BMP Peer BGP ID from per-peer header. The BGP Identifier of
         the peer from which the encapsulated PDU was received.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.";
    }
    leaf timestamp {
      type yang:date-and-time;
      description
        "BMP timestamp from the Per-Peer Header (RFC 7854 Section 4.2).
         Represents the time the encapsulated routes were received or
         installed in the Adj-RIB-In. Absent when the value was zero
         (unavailable) in the wire header.

         // TODO: check with bmp-tlv regarding authoritative timestamp
         The Timestamp TLV (message-timestamp in btlv:common) MAY
         also be present and carries a typed timestamp. When
         message-timestamp with type 'adj-rib-in-time' is present, it
         is the authoritative value for this same event; the other
         Timestamp TLV types (trigger-time, message-export-time,
         local-rib-time, adj-rib-out-time) carry additional timing
         information with no Per-Peer Header equivalent.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.2.;
         draft-ietf-grow-bmp-tlv: Section 5.6.1.";
    }
  }

  typedef peer-down-reason-code {
    type enumeration {
      enum local-system-closed-notification {
        value 1;
        description
          "The local system closed the session. A BGP PDU containing
           a BGP NOTIFICATION message that would have been sent to
           the peer follows the reason code.";
        reference
          "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.9.";
      }
      enum local-system-closed-fsm-event {
        value 2;
        description
          "The local system closed the session. No NOTIFICATION
           message was sent. A 2-byte field containing the FSM
           Event code follows the reason code.";
        reference
          "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.9.";
      }
      enum remote-system-closed-notification {
        value 3;
        description
          "The remote system closed the session with a NOTIFICATION
           message. The BGP PDU containing the NOTIFICATION follows
           the reason code.";
        reference
          "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.9.";
      }
      enum remote-system-closed-no-data {
        value 4;
        description
          "The remote system closed the session without a NOTIFICATION
           message. Includes any unexpected termination of the
           transport session.";
        reference
          "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.9.";
      }
      enum peer-de-configured {
        value 5;
        description
          "Information for this peer will no longer be sent to the
           monitoring station for configuration reasons.";
        reference
          "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.9.";
      }
      enum local-system-closed-tlv-data-follows {
        value 6;
        description
          "The local system closed the Loc-RIB instance peer session.
           TLV data follows (see btlv:peer-down), including the
           VRF/Table Name TLV if it was present in the Peer Up.";
        reference
          "RFC 9069: Support for Local RIB in BMP, Section 5.3.";
      }
    }
    description
      "BMP Peer Down reason codes.";
    reference
      "RFC 7854: Section 4.9; RFC 9069: Section 5.3.";
  }

  grouping mirroring {
    description
      "BMP Route Mirroring Information TLV content (type 1 in the
       Route Mirroring TLVs registry). Conveys a 2-byte information
       code about the mirrored message or message stream.";
    reference
      "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.7.";
    leaf information {
      type enumeration {
        enum error-pdu {
          value 0;
          description
            "Errored PDU. The contained message was found to have
             an error causing it to be treated-as-withdraw
             (RFC 7606). A BGP Message TLV MUST also be present.";
        }
        enum message-lost {
          value 1;
          description
            "Messages Lost. One or more messages may have been
             lost, e.g., due to buffer exhaustion.";
        }
      }
      description
        "Route Mirroring Information code.";
    }
  }

  // TODO: design better grouping for statistics
  grouping statistics {
    description
      "BMP Statistics.";
    reference
      "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.8.";
    leaf statistics-type {
      type string {
      }
      description
        "BMP statistics type. Defines the type of the statistic carried
         in the Stat Data field.";
    }
    leaf statistics-data {
      type uint64;
      description
        "BMP statistics data. Defines the value of the statistic.";
    }
  }

  grouping peer-up {
    description
      "BMP Peer Up Notification fields.";
    reference
      "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.10.";
    leaf local-address {
      type inet:ip-address;
      description
        "Local address from the Peer Up Notification. Set to
         '0::' for Loc-RIB Instance Peers.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.10.";
    }
    leaf local-port {
      type inet:port-number;
      description
        "Local port from the Peer Up Notification. Set to 0
         for Loc-RIB Instance Peers.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.10.";
    }
    leaf remote-port {
      type inet:port-number;
      description
        "Remote port from the Peer Up Notification. Set to 0
         for Loc-RIB Instance Peers.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.10.";
    }

    container sent-open {
      description
        "BGP OPEN message sent by the local router to its peer.";
      reference
        "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.2.
         RFC 7854: BGP Monitoring Protocol (BMP), Section 4.10.";
      uses bgo:bgp-open;
    }
    container received-open {
      description
        "BGP OPEN message received from the peer.";
      reference
        "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.2.
         RFC 7854: BGP Monitoring Protocol (BMP), Section 4.10.";
      uses bgo:bgp-open;
    }
  }

  sx:structure message {
    description
      "Augments telemetry-message-metadata with BMP specific
       subscription metadata";

    leaf version {
      type uint8;
      mandatory true;
      description
        "BMP version from common header.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.1.";
    }

    container session-metadata {
      presence
        "BMP Initiation message information cached by a collector
         to enrich this message with router identity context.";
      description
        "Optional metadata derived from the BMP Initiation message
         for this BMP session. A collector MAY populate sys-name,
         sys-descr or a free-form string leaf-list to make this
         message self-contained for consumers that did not process
         or store the Initiation message directly.";
      uses btlv:information;
    }

    choice message-type {
      description
        "BMP message type from common header.";
      reference
        "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.1.";
      case route-monitoring {
        container route-monitoring {
          description
            "BMP Route Monitoring message. Used for initial
             synchronization of Adj-RIBs-In and for ongoing
             incremental route monitoring.";
          uses per-peer;
          uses bre:rib-entry;
          uses btlv:route-monitoring;
          uses btlv:common;
        }
      }
      case statistics-report {
        container statistics-report {
          description
            "BMP Statistics Report message. Carries one or more
             counters reflecting activity on the monitored router.";
          uses per-peer;
          uses statistics;
          uses btlv:common;
        }
      }
      case peer-down-notification {
        container peer-down-notification {
          description
            "BMP Peer Down Notification message. Indicates that a
             peering session was terminated.";
          uses per-peer;
          leaf reason {
            type peer-down-reason-code;
            mandatory true;
            description
              "Reason why the peering session was closed.";
            reference
              "RFC 7854: BGP Monitoring Protocol (BMP), Section 4.9;
               RFC 9069: Support for Local RIB in BMP, Section 5.3.";
          }
          container peer-down {
            when "../reason = 'local-system-closed-tlv-data-follows'" {
              description
                "TLV data is present only when reason code 6 is
                 used (Loc-RIB instance peer session closed).";
            }
            description
              "Peer Down TLV data following reason code 6. Contains
               the VRF/Table Name TLV if it was present in the
               corresponding Peer Up notification.";
            uses btlv:peer-down;
          }
          uses btlv:common;
        }
      }
      case peer-up-notification {
        container peer-up-notification {
          description
            "BMP Peer Up Notification message. Indicates that a
             peering session has come up.";
          uses per-peer;
          uses peer-up;
          container information {
            presence
              "Information TLVs are present in this Peer Up
               notification";
            description
              "Optional Information TLVs at the end of the Peer Up
               message. For standard peers only the string type
               (type 0) is defined; for Loc-RIB Instance Peers the
               VRF/Table Name TLV (type 3, RFC 9069) MUST be
               included when a name is configured.";
            reference
              "RFC 7854: Section 4.10;
               RFC 9069: Section 5.2.1.";
            uses btlv:information;
          }
          uses btlv:common;
        }
      }
      case initiation-message {
        container initiation-message {
          description
            "BMP Initiation Message. Provides information about the
             monitored router. MUST be the first message sent after
             the TCP session comes up. The sysDescr and sysName
             TLVs MUST be present.";
          uses btlv:information;
          uses btlv:common;
        }
      }
      case termination-message {
        container termination-message {
          description
            "BMP Termination Message. Provides a reason why the
             monitored router is closing the BMP session.";
          uses btlv:termination;
          uses btlv:common;
        }
      }
      case route-mirroring-message {
        container route-mirroring-message {
          description
            "BMP Route Mirroring Message. Used for verbatim
             duplication of messages as received, e.g., for
             full-fidelity monitoring or error reporting.";
          uses per-peer;
          uses bre:rib-entry;
          uses mirroring;
          uses btlv:common;
        }
      }
    }
  }
}
]]>
</sourcecode>
        </figure>
      </section>

      <section anchor="ietf-bgp-open-module">
        <name>BGP Open Message YANG Module</name>

        <!-- ietf-bgp-open YANG Module -->
        <figure title="BMP YANG 'ietf-bgp-open' module.">
          <sourcecode name="ietf-bgp-open@2026-06-30.yang"
            type="yang" markers="true">
<![CDATA[
module ietf-bgp-open {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-open";
  prefix bgo;

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 9911: Common YANG Data Types.";
  }

  // TODO: in the future import the single capabilities module if at idr
  // they decide to move from submodules to a modules
  import ietf-bgp {
    prefix bgp;
    reference
      "RFC XXXX: YANG Model for Border Gateway Protocol (BGP-4).";
  }

  organization
    "IETF Draft";
  contact
    "Author:    Thomas Graf
                <mailto:thomas.graf@swisscom.com>
                Paolo Lucente
                <mailto:paolo@ntt.net>
                Leonardo Rodoni
                <mailto:leonardo.rodoni@swisscom.com>";

  description
    "Defines a grouping for representing a BGP OPEN message as
     defined in RFC 4271. The BGP OPEN message is the first
     message sent by each side after a TCP connection is
     established and carries session parameters including the
     BGP version, the sender's AS number, the Hold Time, the
     BGP Identifier, and the list of optional capabilities.

     This module complements the ietf-bgp model by exposing the
     OPEN message fields in a standalone reusable grouping,
     intended for use by BMP and other BGP monitoring or
     telemetry protocols.

     Copyright (c) 2026 IETF Trust and the persons identified as
     authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Revised BSD License
     set forth in Section 4.c of the IETF Trust's Legal
     Provisions Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see
     the RFC itself for full legal notices.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
     are to be interpreted as described in BCP 14 (RFC 2119)
     (RFC 8174) when, and only when, they appear in all
     capitals, as shown here.";

  revision 2026-06-30 {
    description
      "Initial revision.";
    reference
      "RFC XXXX";
  }

  grouping bgp-open {
    description
      "Fields from a BGP OPEN message.";
    reference
      "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.2.";
    leaf version {
      type uint8;
      mandatory true;
      description
        "BGP protocol version number carried in the OPEN message.
         The current BGP version number is 4.";
      reference
        "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.2.";
    }
    leaf my-as {
      type uint32;
      mandatory true;
      description
        "Autonomous System number of the BGP OPEN message sender.";
      reference
        "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.2.
         RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
         Number Space.";
    }
    leaf hold-time {
      type uint16;
      units "seconds";
      mandatory true;
      description
        "Hold Time proposed by the sender in the BGP OPEN message.
         The Hold Time MUST be either zero or at least three seconds.";
      reference
        "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.2.";
    }
    leaf bgp-identifier {
      type inet:ipv4-address;
      mandatory true;
      description
        "BGP Identifier of the sender, set to an IP address assigned
         to that BGP speaker. The value is determined upon startup
         and is the same for every local interface and BGP peer.";
      reference
        "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 4.2.";
    }
    // TODO: check if we can ignore/need the index?
    list capabilities {
      key "code index";
      description
        "List of BGP capabilities carried in the BGP OPEN message,
         identified by the Capability Code and an index.
         The index covers the case where the same BGP Capability
         may be advertised more than once.";
      reference
        "RFC 5492: Capabilities Advertisement with BGP-4, Section 4.";
      uses bgp:bgp-capabilities-common;
    }
  }
}
]]>
</sourcecode>
        </figure>
      </section>

      <section anchor="ietf-bgp-rib-entry-module">
        <name>BGP RIB Entry YANG Module</name>

        <!-- ietf-bgp-rib-entry YANG Module -->
        <figure title="BMP YANG 'ietf-bgp-rib-entry' module.">
          <sourcecode name="ietf-bgp-rib-entry@2026-06-30.yang"
            type="yang" markers="true">
<![CDATA[
module ietf-bgp-rib-entry {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bgp-rib-entry";
  prefix bre;

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 9911: Common YANG Data Types.";
  }
  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 9911: Common YANG Data Types.";
  }
  import iana-bgp-types {
    prefix bt;
    reference
      "RFC XXXX: YANG Model for Border Gateway Protocol (BGP-4).";
  }

  // TODO: in the future import the single capabilities module if at idr
  // they decide to move from submodules to a modules
  import ietf-bgp {
    prefix bgp;
    reference
      "RFC XXXX: YANG Model for Border Gateway Protocol (BGP-4).";
  }

  organization
    "IETF Draft";
  contact
    "Author:    Thomas Graf
                <mailto:thomas.graf@swisscom.com>
                Paolo Lucente
                <mailto:paolo@ntt.net>
                Leonardo Rodoni
                <mailto:leonardo.rodoni@swisscom.com>";

  description
    "Defines a module for representing a single entry from a BGP
     Routing Information Base (RIB). The submodule supports entries
     from 5 logical RIB types per address family:

     loc-rib: An entry from the main BGP routing table for the local
     routing instance, containing best-path selections for each
     prefix. The key for the loc-rib entry corresponds either to a
     route in the adj-rib-in-post table or a route redistributed
     from another protocol.

     adj-rib-in-pre: An entry from the per-neighbor table containing
     the BGP routes received from the neighbor before any local
     input policy rules have been applied. This can be considered
     the 'raw' routes from a given neighbor.

     adj-rib-in-post: An entry from the per-neighbor table containing
     the routes received from the neighbor that are eligible for
     best-path selection after local input policy rules have been
     applied. The 'best-path' leaf is attached to the route selected
     by the BGP Decision Process (RFC 4271, Section 9.1). Such
     routes may be present in the loc-rib, described above,
     when local configuration determines that the BGP best-path will
     be used for that destination.

     adj-rib-out-pre: An entry from the per-neighbor table containing
     routes eligible for sending (advertising) to the neighbor before
     output policy rules have been applied.

     adj-rib-out-post: An entry from the per-neighbor table containing
     routes eligible for sending (advertising) to the neighbor after
     output policy rules have been applied.

     Copyright (c) 2026 IETF Trust and the persons identified as
     authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject to
     the license terms contained in, the Revised BSD License set
     forth in Section 4.c of the IETF Trust's Legal Provisions
     Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX
     (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
     for full legal notices.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
     NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
     'MAY', and 'OPTIONAL' in this document are to be interpreted as
     described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
     they appear in all capitals, as shown here.";

  revision 2026-06-30 {
    description
      "Initial Version";
    reference
      "RFC XXXX";
  }

  grouping bgp-common-route-attributes {
    description
      "BGP path attributes and communities.";
    uses bgp-path-attributes;
    uses bgp:bgp-community-attr-state;
    uses bgp:ext-community-attributes;
    uses bgp:ipv6-ext-community-attributes;
    uses bgp:large-community-attributes;
  }

  grouping bgp-path-attributes {
    description
      "BGP path attributes.";
    container attributes {
      description
        "BGP path attribute parameters.";
      leaf origin {
        type bt:bgp-origin-attr-type;
        mandatory true;
        description
          "BGP attribute defining the origin of the path information.";
        reference
          "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.1.";
      }
      container as-path {
        description
          "Enclosing container for the list of AS path segments.";
        reference
          "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.2.
           RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
           Number Space.
           RFC 5065: Autonomous System Confederations for BGP.";
        list segment {
          uses bgp:bgp-as-path-segment;
          description
            "List of AS PATH segments.";
        }
      }
      leaf next-hop {
        type inet:ip-address;
        description
          "BGP next hop attribute.";
        reference
          "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.3.";
      }
      leaf link-local-next-hop {
        type inet:ipv6-address;
        description
          "Link-local next-hop when using RFC 2545 procedures.";
        reference
          "RFC 2545: Use of BGP-4 Multiprotocol Extensions for IPv6
           Inter-Domain Routing.";
      }
      leaf med {
        type uint32;
        description
          "BGP multi-exit discriminator attribute.";
        reference
          "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.4.";
      }
      leaf local-pref {
        type uint32;
        description
          "BGP local preference attribute.";
        reference
          "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.5.";
      }
      container as4-path {
        description
          "AS4_PATH attribute for 4-octet AS numbers in Adj-RIB-In/Out.
           Not populated in Loc-RIB.";
        reference
          "RFC 6793: BGP Support for Four-octet AS Number Space.";
        list segment {
          uses bgp:bgp-as-path-segment;
          description
            "List of AS PATH segments.";
        }
      }
      container aggregator {
        description
          "BGP AGGREGATOR attribute.";
        reference
          "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.7.
           RFC 6793: BGP Support for Four-octet AS Number Space.";
        leaf as {
          type inet:as-number;
          description
            "AS number of the aggregating router.";
          reference
            "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.7.";
        }
        leaf identifier {
          type yang:dotted-quad;
          description
            "BGP Identifier of the aggregating router.";
          reference
            "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.7.";
        }
      }
      container aggregator4 {
        description
          "AS4_AGGREGATOR attribute. Not populated in Loc-RIB.";
        reference
          "RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
           Number Space.";
        leaf as4 {
          type inet:as-number;
          description
            "4-octet AS number of the aggregating router.";
          reference
            "RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
             Number Space, Section 3.";
        }
        leaf identifier {
          type yang:dotted-quad;
          description
            "BGP Identifier of the aggregating router.";
          reference
            "RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
             Number Space, Section 3.";
        }
      }
      leaf atomic-aggregate {
        type boolean;
        description
          "BGP ATOMIC_AGGREGATE attribute.";
        reference
          "RFC 4271: A Border Gateway Protocol 4 (BGP-4), Section 5.1.6.";
      }
      leaf originator-id {
        type yang:dotted-quad;
        description
          "BGP ORIGINATOR_ID attribute for route reflection.";
        reference
          "RFC 4456: BGP Route Reflection, Section 8.";
      }
      leaf-list cluster-list {
        type yang:dotted-quad;
        description
          "BGP CLUSTER_LIST attribute for route reflection.";
        reference
          "RFC 4456: BGP Route Reflection, Section 8.";
      }
      leaf aigp-metric {
        type uint64;
        description
          "BGP AIGP attribute.";
        reference
          "RFC 7311: The Accumulated IGP Metric Attribute for BGP.";
      }
    }
  }

  grouping ipv4-loc-rib-common {
    description
      "IPv4 Loc-RIB route entry.";
    container route {
      description
        "A single IPv4 Loc-RIB route entry.";
      leaf prefix {
        type inet:ipv4-prefix;
        mandatory true;
        description
          "The IPv4 prefix.";
      }
      uses bgp:bgp-loc-rib-common-keys;
      uses bgp-common-route-attributes;
      uses bgp:bgp-common-route-annotations-state;
      uses bgp:bgp-unknown-attr-top;
      uses bgp:rib-ext-route-annotations;
    }
  }

  grouping ipv6-loc-rib-common {
    description
      "IPv6 Loc-RIB route entry.";
    container route {
      description
        "A single IPv6 Loc-RIB route entry.";
      leaf prefix {
        type inet:ipv6-prefix;
        mandatory true;
        description
          "The IPv6 prefix.";
      }
      uses bgp:bgp-loc-rib-common-keys;
      uses bgp-common-route-attributes;
      uses bgp:bgp-common-route-annotations-state;
      uses bgp:bgp-unknown-attr-top;
      uses bgp:rib-ext-route-annotations;
    }
  }

  grouping ipv4-adj-rib-common {
    description
      "IPv4 Adj-RIB route entry (In-Pre, Out-Pre, Out-Post).";
    container route {
      description
        "A single IPv4 Adj-RIB route entry.";
      leaf prefix {
        type inet:ipv4-prefix;
        mandatory true;
        description
          "The IPv4 prefix.";
      }
      uses bgp:bgp-adj-rib-attr-state;
      uses bgp-common-route-attributes;
      uses bgp:bgp-common-route-annotations-state;
      uses bgp:bgp-unknown-attr-top;
      uses bgp:rib-ext-route-annotations;
    }
  }

  grouping ipv4-adj-rib-in-post {
    description
      "IPv4 Adj-RIB-In post-policy route entry.";
    container route {
      description
        "A single IPv4 Adj-RIB-In post-policy route entry.";
      leaf prefix {
        type inet:ipv4-prefix;
        mandatory true;
        description
          "The IPv4 prefix.";
      }
      uses bgp:bgp-adj-rib-attr-state;
      uses bgp-common-route-attributes;
      uses bgp:bgp-common-route-annotations-state;
      uses bgp:bgp-adj-rib-in-post-route-annotations-state;
      uses bgp:bgp-unknown-attr-top;
      uses bgp:rib-ext-route-annotations;
    }
  }

  grouping ipv6-adj-rib-common {
    description
      "IPv6 Adj-RIB route entry (In-Pre, Out-Pre, Out-Post).";
    container route {
      description
        "A single IPv6 Adj-RIB route entry.";
      leaf prefix {
        type inet:ipv6-prefix;
        mandatory true;
        description
          "The IPv6 prefix.";
      }
      uses bgp:bgp-adj-rib-attr-state;
      uses bgp-common-route-attributes;
      uses bgp:bgp-common-route-annotations-state;
      uses bgp:bgp-unknown-attr-top;
      uses bgp:rib-ext-route-annotations;
    }
  }

  grouping ipv6-adj-rib-in-post {
    description
      "IPv6 Adj-RIB-In post-policy route entry.";
    container route {
      description
        "A single IPv6 Adj-RIB-In post-policy route entry.";
      leaf prefix {
        type inet:ipv6-prefix;
        mandatory true;
        description
          "The IPv6 prefix.";
      }
      uses bgp:bgp-adj-rib-attr-state;
      uses bgp-common-route-attributes;
      uses bgp:bgp-common-route-annotations-state;
      uses bgp:bgp-adj-rib-in-post-route-annotations-state;
      uses bgp:bgp-unknown-attr-top;
      uses bgp:rib-ext-route-annotations;
    }
  }

  grouping rib-entry {
    description
      "Grouping for a BGP RIB entry organized by AFI-SAFI.";

    leaf afi-safi-type {
      type identityref {
        base bt:afi-safi-type;
      }
      mandatory true;
      description
        "AFI,SAFI name.";
    }

    container rib-entry {
      description
        "Encapsulates the route entry for a specific AFI-SAFI.";
      choice afi-safi {
        mandatory true;
        description
          "Choice of AFI-SAFI content, enforced by the afi-safi-type leaf.";

        case ipv4-unicast {
          when "derived-from-or-self(../afi-safi-type, 'bt:ipv4-unicast')";
          container ipv4-unicast {
            description
              "Routing tables for IPv4 unicast.";

            choice rib-type {
              mandatory true;
              description
                "The specific RIB table type from which the route originates.";

              case loc-rib {
                container loc-rib {
                  description
                    "Route from the main BGP routing table for the local
                     routing instance, containing best-path selections
                     for each prefix.";
                  uses ipv4-loc-rib-common;
                }
              }
              case adj-rib-in-pre {
                container adj-rib-in-pre {
                  description
                    "Route received from the neighbor before any local
                     input policy rules or filters have been applied.";
                  uses ipv4-adj-rib-common;
                }
              }
              case adj-rib-in-post {
                container adj-rib-in-post {
                  description
                    "Route received from the neighbor after local
                     input policy rules have been applied.";
                  uses ipv4-adj-rib-in-post;
                }
              }
              case adj-rib-out-pre {
                container adj-rib-out-pre {
                  description
                    "Route eligible to be sent to the neighbor
                     before output policy rules have been applied.";
                  uses ipv4-adj-rib-common;
                }
              }
              case adj-rib-out-post {
                container adj-rib-out-post {
                  description
                    "Route eligible to be sent to the neighbor
                     after output policy rules have been applied.";
                  uses ipv4-adj-rib-common;
                }
              }
            }
          }
        }

        case ipv6-unicast {
          when "derived-from-or-self(../afi-safi-type, 'bt:ipv6-unicast')";
          container ipv6-unicast {
            description
              "Routing tables for IPv6 unicast.";

            choice rib-type {
              mandatory true;
              description
                "Choice between Local RIB and Neighbor-specific Adj-RIBs.";

              case loc-rib {
                container loc-rib {
                  description
                    "Route from the main BGP routing table for the local
                     routing instance, containing best-path selections
                     for each prefix.";
                  uses ipv6-loc-rib-common;
                }
              }

              case adj-rib-in-pre {
                container adj-rib-in-pre {
                  description
                    "Route received from the neighbor before local
                     input policy rules have been applied.";
                  uses ipv6-adj-rib-common;
                }
              }
              case adj-rib-in-post {
                container adj-rib-in-post {
                  description
                    "Route received from the neighbor after local
                     input policy rules have been applied.";
                  uses ipv6-adj-rib-in-post;
                }
              }
              case adj-rib-out-pre {
                container adj-rib-out-pre {
                  description
                    "Route eligible to be sent to the neighbor
                     before output policy rules have been applied.";
                  uses ipv6-adj-rib-common;
                }
              }
              case adj-rib-out-post {
                container adj-rib-out-post {
                  description
                    "Route eligible to be sent to the neighbor
                     after output policy rules have been applied.";
                  uses ipv6-adj-rib-common;
                }
              }
            }
          }
        }
      }
    }
  }
]]>
</sourcecode>
        </figure>
      </section>

      <section anchor="ietf-bmp-tlv-module">
        <name>BMP TLV YANG Module</name>

        <!-- ietf-bmp-tlv YANG Module -->
        <figure title="BMP YANG 'ietf-bmp-tlv' module.">
          <sourcecode name="ietf-bmp-tlv@2026-06-30.yang"
            type="yang" markers="true">
<![CDATA[
module ietf-bmp-tlv {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bmp-tlv";
  prefix btlv;

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 9911: Common YANG Data Types";
  }

  organization
    "IETF Draft";
  contact
    "Author:    Thomas Graf
                <mailto:thomas.graf@swisscom.com>
                Paolo Lucente
                <mailto:paolo@ntt.net>
                Leonardo Rodoni
                <mailto:leonardo.rodoni@swisscom.com>";

  description
    "Defines TLV groupings for BMP (BGP Monitoring Protocol) messages.
     The groupings in this module correspond to TLV types defined
     across the core BMP specifications and extensions:

       - RFC 7854  (BMP base): Information TLVs, Termination TLVs,
                               Route Mirroring TLVs.
       - RFC 9069  (Loc-RIB):  VRF/Table Name TLV (type 3), Peer Down
                               reason code 6.
       - draft-ietf-grow-bmp-tlv (BMP v4): Cross-cutting TLVs
                               applicable to all message types:
                               Sequence Number (type 1), Extended Flags
                               (type 2), Timestamp (type 3). Also
                               Route Monitoring-specific TLVs: Group
                               (4), VRF/Table Name (5), Stateless
                               Parsing (6), BGP Message (7).
       - draft-ietf-grow-bmp-path-marking-tlv: Path Status TLV for
                               Route Monitoring messages.

     This module models the decoded content of TLVs (i.e., what is
     carried in each TLV's Value field), not the wire-format TLV
     headers.

     The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL',
     'SHALL NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED',
     'NOT RECOMMENDED', 'MAY', and 'OPTIONAL' in this document
     are to be interpreted as described in BCP 14 (RFC 2119)
     (RFC 8174) when, and only when, they appear in all
     capitals, as shown here.

     Copyright (c) 2026 IETF Trust and the persons identified as
       authors of the code. All rights reserved.

     Redistribution and use in source and binary forms, with or without
     modification, is permitted pursuant to, and subject to the license
     terms contained in, the Revised BSD License set forth in Section
     4.c of the IETF Trust's Legal Provisions Relating to IETF Documents
     (https://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC XXXX; see the RFC
     itself for full legal notices.";

  revision 2026-06-30 {
    description
      "Initial revision.";
    reference
      "RFC XXXX";
  }

  // ---------------------------------------------------------------
  // Typedefs
  // ---------------------------------------------------------------
  typedef timestamp-type {
    type enumeration {
      enum trigger-time {
        value 0;
        description
          "Timestamp of the event which triggered BMP to report, e.g.,
           a received message or a BGP/BMP session state transition.";
        reference
          "draft-ietf-grow-bmp-tlv: Section 5.6.1.1.1.";
      }
      enum message-export-time {
        value 1;
        description
          "Time at which the BMP message was generated for export.";
        reference
          "draft-ietf-grow-bmp-tlv: Section 5.6.1.1.2.";
      }
      enum adj-rib-in-time {
        value 2;
        description
          "Time at which the route was installed in the Adj-RIB-In,
           as per RFC 7854.";
        reference
          "draft-ietf-grow-bmp-tlv: Section 5.6.1.1.3.";
      }
      enum local-rib-time {
        value 3;
        description
          "Time at which the route was installed in the Loc-RIB,
           as per RFC 9069.";
        reference
          "draft-ietf-grow-bmp-tlv: Section 5.6.1.1.4.";
      }
      enum adj-rib-out-time {
        value 4;
        description
          "Time at which the route was installed in the Adj-RIB-Out,
           as per RFC 8671.";
        reference
          "draft-ietf-grow-bmp-tlv: Section 5.6.1.1.5.";
      }
    }
    description
      "BMP Timestamp types for the Timestamp TLV (type 3). Indicates
       which event the accompanying timestamp value refers to.";
    reference
      "draft-ietf-grow-bmp-tlv: Section 5.6.1.";
  }

  grouping path-status-flags {
    description
      "Boolean flags encoding path roles and states for a BGP route.
       Multiple flags may be true when multiple statuses apply.
       All flags absent or false indicates a path with no marking.";
    reference
      "draft-ietf-grow-bmp-path-marking-tlv: Section 3.1.";
    leaf invalid {
      type boolean;
      default false;
      description
        "Route does not enter the BGP decision process as indicated
         in Section 9.1.2 of RFC 4271.";
    }
    leaf best {
      type boolean;
      default false;
      description
        "Best route as defined in Section 9.1 of RFC 4271.";
    }
    leaf nonselected {
      type boolean;
      default false;
      description
        "Route not selected in the BGP decision process. Backup
         routes are considered nonselected, while best and primary
         routes are not.";
    }
    leaf primary {
      type boolean;
      default false;
      description
        "Path used for traffic forwarding. A prefix can have more
         than one primary path when multipath is configured. The
         best path is also a primary path.";
    }
    leaf backup {
      type boolean;
      default false;
      description
        "Path installed in the RIB but not used until some or all
         primary paths become unreachable. Used for fast
         convergence.";
    }
    leaf non-installed {
      type boolean;
      default false;
      description
        "Route not installed into the IP routing table.";
    }
    leaf best-external {
      type boolean;
      default false;
      description
        "Best external path.";
    }
    leaf add-path {
      type boolean;
      default false;
      description
        "Advertisement includes multiple paths for the same address
         prefix without the new paths implicitly replacing any
         previous ones, as per RFC 7911.";
    }
    leaf filtered-inbound-policy {
      type boolean;
      default false;
      description
        "Route filtered in the Adj-RIB-In policy.";
    }
    leaf filtered-outbound-policy {
      type boolean;
      default false;
      description
        "Route filtered in the Adj-RIB-Out policy.";
    }
    leaf stale {
      type boolean;
      default false;
      description
        "Path declared stale by the BGP Graceful Restart mechanism
         as described in Section 4.1 of RFC 4724.";
    }
    leaf suppressed {
      type boolean;
      default false;
      description
        "Path declared suppressed by the BGP Route Flap Damping
         mechanism as described in Section 2.2 of RFC 2439.";
    }
  }

  typedef path-status-reason-code {
    type enumeration {
      enum invalid-as-loop {
        value 1;
        description
          "Invalid due to AS loop as defined in Section 9.1.2 of
           RFC 4271.";
      }
      enum invalid-unresolvable-nexthop {
        value 2;
        description
          "Invalid due to unresolvable nexthop as defined in
           Section 9.1.2 of RFC 4271.";
      }
      enum not-preferred-local-preference {
        value 3;
        description
          "Not preferred because of local preference as described in
           Section 9.1.2.2 of RFC 4271.";
      }
      enum not-preferred-as-path-length {
        value 4;
        description
          "Not preferred because of AS Path Length as described in
           Section 9.1.2.2 of RFC 4271.";
      }
      enum not-preferred-origin {
        value 5;
        description
          "Not preferred because of origin as described in
           Section 9.1.2.2 of RFC 4271.";
      }
      enum not-preferred-med {
        value 6;
        description
          "Not preferred because of MED as described in
           Section 9.1.2.2 of RFC 4271.";
      }
      enum not-preferred-peer-type {
        value 7;
        description
          "Not preferred because of peer type (eBGP vs iBGP) as
           described in Section 9.1.2.2 of RFC 4271.";
      }
      enum not-preferred-igp-cost {
        value 8;
        description
          "Not preferred because of IGP cost as described in
           Section 9.1.2.2 of RFC 4271.";
      }
      enum not-preferred-router-id {
        value 9;
        description
          "Not preferred because of router ID as described in
           Section 9.1.2.2 of RFC 4271.";
      }
      enum not-preferred-peer-address {
        value 10;
        description
          "Not preferred because of peer address as described in
           Section 9.1.2.2 of RFC 4271.";
      }
      enum not-preferred-aigp {
        value 11;
        description
          "Not preferred because of AIGP as described in RFC 7311.";
      }
    }
    description
      "Reason codes for the BMP Path Status TLV. Indicates the
       reason a path has the indicated path status.";
    reference
      "draft-ietf-grow-bmp-path-marking-tlv: Section 3.2.";
  }

  // TODO: move to a separate module?
  // ---------------------------------------------------------------
  // Per-Peer Header Flags (shared by per-peer header and
  // Extended Flags TLV)
  // RFC 7854 Section 4.2 / draft-ietf-grow-bmp-tlv Section 5.6.3
  // ---------------------------------------------------------------
  grouping peer-header-flags {
    description
      "Flags from the BMP Per-Peer Header (RFC 7854 Section 4.2).";
    reference
      "RFC 7854: Section 4.2";
    leaf ipv6-peer {
      type boolean;
      default false;
      description
        "V flag: Peer address is an IPv6 address.";
      reference
        "RFC 7854: Section 4.2.";
    }
    leaf post-policy {
      type boolean;
      default false;
      description
        "L flag: true indicates post-policy Adj-RIB-In;
         false indicates pre-policy Adj-RIB-In.";
      reference
        "RFC 7854: Section 4.2.";
    }
    leaf legacy-as-path {
      type boolean;
      default false;
      description
        "A flag: Message is formatted using the legacy 2-byte
         AS_PATH format.";
      reference
        "RFC 7854: Section 4.2.";
    }
    leaf adj-rib-out {
      type boolean;
      default false;
      description
        "O flag: Message reflects Adj-RIB-Out.";
      reference
        "RFC 8671: Support for Adj-RIB-Out in BMP, Section 4.";
    }
    leaf filtered {
      type boolean;
      default false;
      description
        "F flag: Loc-RIB is filtered. Set when a filter is
         applied to Loc-RIB routes sent to the BMP collector.";
      reference
        "RFC 9069: Section 4.2.";
    }
  }

  // ---------------------------------------------------------------
  // Cross-cutting TLVs (applicable to all BMP message types)
  // draft-ietf-grow-bmp-tlv Section 5.6
  // ---------------------------------------------------------------
  grouping common {
    description
      "TLVs applicable to all BMP message types as defined in
       draft-ietf-grow-bmp-tlv Section 5.6. These TLVs carry
       per-message metadata and are allocated the same code point
       value in every TLV code point registry.";
    reference
      "draft-ietf-grow-bmp-tlv: Section 5.6.";
    leaf sequence-number {
      type uint64;
      description
        "Sequence Number TLV (type 1). Carries the per-BMP-session
         sequence number of this message starting at 0. If the
         sequence number would overflow, the BMP session MUST be
         reset.";
      reference
        "draft-ietf-grow-bmp-tlv: Section 5.6.2.";
    }
    list timestamps {
      key "timestamp-type";
      description
        "Timestamp TLV (type 3). Carries a typed timestamp for
         this BMP message. Multiple instances MAY be present,
         one per timestamp type. A timestamp MUST NOT be included
         if it is not available.";
      reference
        "draft-ietf-grow-bmp-tlv: Section 5.6.1.";
      leaf timestamp-type {
        type timestamp-type;
        description
          "Type of the timestamp, indicating which event the
           timestamp value refers to.";
      }
      leaf timestamp {
        type yang:date-and-time;
        mandatory true;
        description
          "Timestamp value expressed as a date and time.";
      }
    }
    container extended-flags {
      presence
        "Extended Flags TLV (type 2) is present in this message.
         When this container is present, the X Flag in the
         Per-Peer Header Flags is set to 1.";
      description
        "Extended Flags TLV (type 2). Carries an extended set of
         per-peer flags, extending the Flags field of the Per-Peer
         Header to a variable-length sequence of bytes. The first
         byte carries the flags defined prior to this document
         (V, L, A, O, F); subsequent bytes carry newly allocated
         flags. When this TLV is present, the X Flag in the
         Per-Peer Header Flags MUST be set to 1 to signal that
         the authoritative flags are carried here. Collectors
         that do not understand the X Flag continue to use the
         Per-Peer Header flags directly.";
      reference
        "draft-ietf-grow-bmp-tlv: Section 5.6.3.";
      // TODO: discuss extensibility of this extended-flags container...
      // Extension point for future flag bits (RFC 8791 sx:augment-structure).
      // The augment path starts from the sx:structure root of the module
      // that instantiates btlv:common, e.g. for ietf-bmp-telemetry-message:
      //
      // sx:augment-structure
      // "/bmptm:message/bmptm:route-monitoring/btlv:extended-flags" {
      // leaf <new-flag> { type boolean; default false; ... }
      // }
      //
      uses peer-header-flags;
    }
  }

  // ---------------------------------------------------------------
  // Initiation and Peer Up Information TLVs
  // RFC 7854 Section 4.4 + RFC 9069 Section 5.2.1
  // ---------------------------------------------------------------
  grouping information {
    description
      "BMP Information TLVs used in Initiation messages and Peer Up
       notifications. RFC 9069 renamed the registry to 'BMP
       Initiation and Peer Up Information TLVs', confirming both
       message types share these TLV type codes.

       For Initiation messages, sysDescr (type 1) and sysName
       (type 2) MUST be present; string (type 0) MAY appear multiple
       times; vrf-table-name is not applicable.

       For Peer Up notifications, only string (type 0) is defined in
       RFC 7854 (and may be repeated); RFC 9069 adds vrf-table-name
       (type 3) for Loc-RIB Instance Peers. If vrf-table-name is
       included in Peer Up it MUST also be included in the
       corresponding Peer Down notification.";
    reference
      "RFC 7854: Section 4.4;
       RFC 9069: Section 5.2.1.";
    leaf-list string {
      type string {
        length "1..65535";
      }
      ordered-by user;
      description
        "String TLV (type 0). Free-form UTF-8 string. Multiple
         instances are permitted; their ordering MUST be preserved
         when reported.";
      reference
        "RFC 7854: Section 4.4.";
    }
    leaf sys-descr {
      type string {
        length "1..65535";
      }
      description
        "sysDescr TLV (type 1). ASCII string whose value MUST be
         equal to the value of the sysDescr MIB-II (RFC 1213)
         object. MUST be present in Initiation messages.";
      reference
        "RFC 7854: Section 4.4.";
    }
    leaf sys-name {
      type string {
        length "1..65535";
      }
      description
        "sysName TLV (type 2). ASCII string whose value MUST be
         equal to the value of the sysName MIB-II (RFC 1213)
         object. MUST be present in Initiation messages.";
      reference
        "RFC 7854: Section 4.4.";
    }
    leaf vrf-table-name {
      type string {
        length "1..255";
      }
      description
        "VRF/Table Name TLV (type 3). UTF-8 string equal to the
         value of the VRF or table name (e.g., RD instance name)
         being conveyed. The default value 'global' MUST be used
         for the default Loc-RIB instance with a zero-filled
         distinguisher. If included in a Peer Up notification, it
         MUST also be included in the corresponding Peer Down
         notification.";
      reference
        "RFC 9069: Section 5.2.1.";
    }
  }

  // ---------------------------------------------------------------
  // Termination Message TLVs
  // RFC 7854 Section 4.5
  // ---------------------------------------------------------------
  grouping termination {
    description
      "BMP Termination Message TLVs.";
    reference
      "RFC 7854: Section 4.5.";
    leaf-list string {
      type string {
        length "1..65535";
      }
      ordered-by user;
      description
        "String TLV (type 0). Free-form UTF-8 string. Inclusion
         is optional. Multiple instances are permitted.";
      reference
        "RFC 7854: Section 4.5.";
    }
    leaf reason {
      type enumeration {
        enum administratively-closed {
          value 0;
          description
            "Session administratively closed. The session might
             be re-initiated.";
        }
        enum unspecified {
          value 1;
          description
            "Unspecified reason.";
        }
        enum out-of-resources {
          value 2;
          description
            "Out of resources. The router has exhausted resources
             available for the BMP session.";
        }
        enum redundant-connection {
          value 3;
          description
            "Redundant connection. The router has determined that
             this connection is redundant with another one.";
        }
        enum permanently-administratively-closed {
          value 4;
          description
            "Session permanently administratively closed and will
             not be re-initiated. Monitoring station should
             reduce (potentially to 0) the rate at which it
             attempts reconnection.";
        }
      }
      mandatory true;
      description
        "Reason TLV (type 1). Indicates why the session was
         terminated. Inclusion is REQUIRED.";
      reference
        "RFC 7854: Section 4.5.";
    }
  }

  // ---------------------------------------------------------------
  // Peer Down TLVs
  // RFC 9069 Section 5.3 (reason code 6 / TLV data follows)
  // ---------------------------------------------------------------
  grouping peer-down {
    description
      "BMP Peer Down TLVs. Present when the Peer Down reason code
       is 6 ('local-system-closed-tlv-data-follows'), as defined
       in RFC 9069 for Loc-RIB Instance Peers.";
    reference
      "RFC 9069: Section 5.3.";
    leaf vrf-table-name {
      type string {
        length "1..255";
      }
      description
        "VRF/Table Name TLV (type 3). UTF-8 string equal to the
         VRF or table name. MUST be included if it was present in
         the corresponding Peer Up notification.";
      reference
        "RFC 9069: Section 5.3.";
    }
  }

  // ---------------------------------------------------------------
  // Route Monitoring TLVs
  // draft-ietf-grow-bmp-tlv Section 5.2
  // draft-ietf-grow-bmp-path-marking-tlv
  // ---------------------------------------------------------------
  grouping path-status-info {
    description
      "BMP Path Status TLV for Route Monitoring messages. Conveys
       the status of a BGP path after processing by the BGP decision
       process. Carried as an indexed TLV in Route Monitoring
       messages; the index identifies the specific NLRI within the
       BGP Update PDU to which the status applies (index 0 applies
       to all NLRIs).";
    reference
      "draft-ietf-grow-bmp-path-marking-tlv: Section 2.";
    uses path-status-flags;
    leaf reason-code {
      type path-status-reason-code;
      description
        "Optional reason code indicating why the path has the
         indicated status. Absent when no reason code is carried.";
    }
  }

  grouping route-monitoring {
    description
      "TLVs specific to BMP Route Monitoring messages. These appear
       in addition to the common metadata that applies to all BMP message
       types.";
    reference
      "draft-ietf-grow-bmp-tlv: Section 5.2;
       draft-ietf-grow-bmp-path-marking-tlv.";
    container path-status {
      presence
        "Path Status TLV is present for this route";
      description
        "Path Status TLV. Conveys the BGP decision-process status
         of the route. As a per-NLRI indexed TLV this container
         represents the status applicable to the route entry in
         rib-entry.";
      uses path-status-info;
    }
    leaf vrf-table-name {
      type string {
        length "1..255";
      }
      description
        "VRF/Table Name TLV (type 5 in Route Monitoring TLVs).
         UTF-8 string equal to the VRF or table name (i.e., RD
         instance name) being conveyed, consistent with
         RFC 9069 Section 5.2.1.";
      reference
        "draft-ietf-grow-bmp-tlv: Section 5.2.2.";
    }
  }
}
]]>
</sourcecode>
        </figure>
      </section>
    </section>

    <section anchor="YANG_Message_Broker_BMP_Topic_Naming_Indexing">
      <name>YANG Message Broker BMP Indexing and Topic Naming</name>

      <t>To identify which network node produced which BMP data into
        which Message Broker Topic, Partition and Subject, BMP Message
        Keys, Partition Key, and Indexes are being introduced (<xref
          target="BMP_Message_Keys_Indexes_Solution"></xref>). These
        keys enable a deterministic distribution of BMP messages across
        Topics and Partitions enabling applications to consume only the
        needed data from specific topics and partitions.</t>

      <section anchor="BMP_Message_Keys_Indexes_Solution">
        <name>BMP Message Keys and Indexes</name>

        <t>A Message Broker uses a Message Key for indexing and enabling
          Topic Compaction. While a Message Key can also drive
          deterministic partition assignment, this document introduces a
          dedicated Partition Key for that purpose, as described in <xref
            target="BMP_Partitioning_Solution" />.</t>

        <t>Similar to <xref section="3.1" sectionFormat="of"
            target="I-D.netana-nmop-yang-message-broker-message-key" />
          for YANG-Push telemetry messages, the network node hostname
          and a set of 'ietf-bmp-telemetry-message' YANG nodes from the
          instance data are used to construct the BMP Message Key. The
          following subsections describe and illustrate the YANG nodes
          used for each BMP message type.</t>

        <t>For all BMP message types that carry a BMP Per-Peer Header
          (Peer Up, Peer Down, Statistics Report, Route Monitoring, and
          Route Mirroring), the Message Key consists of the node
          hostname and a YANG instance-identifier path encoding the
          message-type and the following per-peer header nodes to
          uniquely identify the BGP peering session:</t>

        <dl newline="true" spacing="normal">
          <dt>peer-type</dt>
          <dd>Scopes the session to its routing instance: Global
            Instance Peer, RD Instance Peer, Local Instance Peer, or
            Loc-RIB Instance Peer.</dd>

          <dt>peer-distinguisher</dt>
          <dd>The Route Distinguisher of the routing instance.
            Zero-filled for Global Instance Peers; non-zero for RD
            Instance and possibly Loc-RIB Instance Peers to distinguish
            sessions within the same VRF or routing instance.</dd>

          <dt>peer-address</dt>
          <dd>The remote IP address associated with the BGP session.</dd>

          <dt>peer-as</dt>
          <dd>The AS number of the remote BGP speaker.</dd>

          <dt>peer-bgp-id</dt>
          <dd>The BGP Identifier of the remote BGP speaker.</dd>
        </dl>

        <t>Route Monitoring and Route Mirroring messages extend the
          per-peer session key with two additional YANG nodes that
          identify the individual route within the RIB:</t>

        <dl newline="true" spacing="normal">
          <dt>prefix</dt>
          <dd>The IP prefix (IPv4 or IPv6) of the route entry.</dd>

          <dt>path-id</dt>
          <dd>The BGP ADD-PATH path identifier (RFC 7911). Zero when
            ADD-PATH is not in use.</dd>
        </dl>

        <t>Initiation and Termination messages do not carry a Per-Peer
          Header; their Message Keys consist of only the node hostname
          and the message-type path. The per-peer session key is
          consistent across all lifecycle events for the same session
          (Peer Up, Statistics Report, Route Monitoring, and Peer Down),
          enabling deterministic topic compaction over the full session
          lifecycle.</t>

        <t>The Message Key is encoded as a two-line byte string. The
          first line is the network node hostname; the second line is
          the YANG instance-identifier path. The separator between them
          is a single line feed character (LF, U+000A).</t>

        <t>Each example below illustrates the Message Key, the Message
          Broker headers carrying the Schema ID, content type, and
          Partition Key, and the corresponding Message Value.</t>

        <section anchor="bmp-initiation">
          <name>BMP Initiation</name>

          <t>The Message Key consists of only the node hostname and the
            message-type path, as described above.</t>

          <figure anchor="message-key-bmp-init-example"
            title="BMP Initiation Message Key and Headers">
            <sourcecode type="text"><![CDATA[
NOTE: The Key is a two-line byte string; the line break between the
      node hostname and the YANG path is a literal LF (U+000A).

Key:
  router-nyc-01
  /ietf-bmp-telemetry-message:message/initiation-message

Headers:
  schema-id:     1
  content-type:  application/yang-data+json
  partition-key: router-nyc-01
]]></sourcecode>
          </figure>

          <figure anchor="message-value-bmp-init-example"
            title="BMP Initiation Message Value">
            <sourcecode type="json"><![CDATA[
{
  "ietf-bmp-telemetry-message:message": {
    "version": 3,
    "initiation-message": {
      "sys-descr": "25.4.2.02I",
      "sys-name": "ipf-zbl1327-r-daisy-91"
    }
  }
}
]]></sourcecode>
          </figure>
        </section>

        <section anchor="bmp-peer-up">
          <name>BMP Peer Up</name>

          <t>The Message Key uses the per-peer session key described
            above.</t>


          <figure anchor="message-key-bmp-peer-up-example"
            title="BMP Peer Up Message Key and Headers">
            <sourcecode type="text"><![CDATA[
NOTE: The Key is a two-line byte string; the line break between the
      node hostname and the YANG path is a literal LF (U+000A).
      RFC 8792 '\' line folding applies within the YANG path.

Key:
  router-nyc-01
  /ietf-bmp-telemetry-message:message/\
peer-up-notification[peer-type='global-instance-peer']\
[peer-distinguisher='0:0:0']\
[peer-address='203.0.113.45']\
[peer-as='65002']\
[peer-bgp-id='203.0.113.1']

Headers:
  schema-id:     2
  content-type:  application/yang-data+json
  partition-key: router-nyc-01
]]></sourcecode>
          </figure>

          <figure anchor="message-value-bmp-peer-up-example"
            title="BMP Peer Up Message Value">
            <sourcecode type="json"><![CDATA[
{
  "ietf-bmp-telemetry-message:message": {
    "version": 3,
    "peer-up-notification": {
      "peer-type": "global-instance-peer",
      "peer-distinguisher": "0:0:0",
      "peer-address": "203.0.113.45",
      "peer-as": 65002,
      "peer-bgp-id": "203.0.113.1",
      "timestamp": "2026-02-15T14:35:22Z",
      "local-address": "198.51.100.10",
      "local-port": 179,
      "remote-port": 54321,
      "sent-open": {
        "version": 4,
        "my-as": 65001,
        "hold-time": 180,
        "bgp-identifier": "198.51.100.1",
        "capabilities": [
          {
            "code": 65,
            "index": 1,
            "name": "iana-bgp-types:asn32",
            "value": { "asn32": { "as": 65001 } }
          },
          {
            "code": 1,
            "index": 1,
            "name": "iana-bgp-types:mp-bgp",
            "value": {
              "mpbgp": {
                "afi": "ipv4",
                "safi": "unicast-safi",
                "name": "iana-bgp-types:ipv4-unicast"
              }
            }
          }
        ]
      },
      "received-open": {
        "version": 4,
        "my-as": 65002,
        "hold-time": 180,
        "bgp-identifier": "203.0.113.1",
        "capabilities": [
          {
            "code": 65,
            "index": 1,
            "name": "iana-bgp-types:asn32",
            "value": { "asn32": { "as": 65002 } }
          },
          {
            "code": 1,
            "index": 1,
            "name": "iana-bgp-types:mp-bgp",
            "value": {
              "mpbgp": {
                "afi": "ipv4",
                "safi": "unicast-safi",
                "name": "iana-bgp-types:ipv4-unicast"
              }
            }
          }
        ]
      },
      "sequence-number": "42",
      "timestamps": [
        {
          "timestamp-type": "message-export-time",
          "timestamp": "2026-02-15T14:35:22.125000Z"
        }
      ]
    }
  }
}
]]></sourcecode>
          </figure>
        </section>

        <section anchor="bmp-peer-down">
          <name>BMP Peer Down</name>

          <t>The Message Key uses the per-peer session key described
            above.</t>


          <figure anchor="message-key-bmp-peer-down-example"
            title="BMP Peer Down Message Key and Headers">
            <sourcecode type="text"><![CDATA[
NOTE: The Key is a two-line byte string; the line break between the
      node hostname and the YANG path is a literal LF (U+000A).
      RFC 8792 '\' line folding applies within the YANG path.

Key:
  router-nyc-01
  /ietf-bmp-telemetry-message:message/peer-down-notification\
[peer-type='loc-rib-instance-peer']\
[peer-distinguisher='0:65001:100']\
[peer-address='::']\
[peer-as='65001']\
[peer-bgp-id='192.0.2.1']

Headers:
  schema-id:     3
  content-type:  application/yang-data+json
  partition-key: router-nyc-01
]]></sourcecode>
          </figure>

          <figure anchor="message-value-bmp-peer-down-example"
            title="BMP Peer Down Message Value">
            <sourcecode type="text"><![CDATA[
{
  "ietf-bmp-telemetry-message:message": {
    "version": 3,
    "session-metadata": {
      "sys-descr": "25.4.2.02I",
      "sys-name": "router-nyc-01"
    },
    "peer-down-notification": {
      "peer-type": "loc-rib-instance-peer",
      "peer-distinguisher": "0:65001:100",
      "peer-address": "::",
      "peer-as": 65001,
      "peer-bgp-id": "192.0.2.1",
      "timestamp": "2026-02-15T15:10:00Z",
      "reason": "local-system-closed-tlv-data-follows",
      "peer-down": {
        "vrf-table-name": "customer-a"
      },
      "sequence-number": "8901",
      "timestamps": [
        {
          "timestamp-type": "trigger-time",
          "timestamp": "2026-02-15T15:09:58.200000Z"
        },
        {
          "timestamp-type": "message-export-time",
          "timestamp": "2026-02-15T15:09:58.450000Z"
        }
      ]
    }
  }
}
]]></sourcecode>
          </figure>
        </section>

        <section anchor="bmp-stats-reports">
          <name>BMP Statistic Reports</name>

          <t>The Message Key uses the per-peer session key described
            above.</t>


          <figure anchor="message-key-bmp-stats-example"
            title="BMP Statistics Report Message Key and Headers">
            <sourcecode type="text"><![CDATA[
NOTE: The Key is a two-line byte string; the line break between the
      node hostname and the YANG path is a literal LF (U+000A).
      RFC 8792 '\' line folding applies within the YANG path.

Key:
  router-nyc-01
  /ietf-bmp-telemetry-message:message/statistics-report\
[peer-type='global-instance-peer']\
[peer-distinguisher='0:0:0']\
[peer-address='203.0.113.45']\
[peer-as='65002']\
[peer-bgp-id='203.0.113.1']

Headers:
  schema-id:     4
  content-type:  application/yang-data+json
  partition-key: router-nyc-01
]]></sourcecode>
          </figure>

          <figure anchor="message-value-bmp-stats-example"
            title="BMP Statistics Report Message Value">
            <sourcecode type="text"><![CDATA[
TBD
]]></sourcecode>
          </figure>
        </section>

        <section anchor="bmp-route-monitoring">
          <name>BMP Route Monitoring</name>

          <t>The Message Key extends the per-peer session key with the
            additional <tt>prefix</tt> and <tt>path-id</tt> nodes
            described above.</t>


          <figure anchor="message-key-bmp-route-monitoring-example"
            title="BMP Route Monitoring Message Key and Headers">
            <sourcecode type="text"><![CDATA[
NOTE: The Key is a two-line byte string; the line break between the
      node hostname and the YANG path is a literal LF (U+000A).
      RFC 8792 '\' line folding applies within the YANG path.

Key:
  router-nyc-01
  /ietf-bmp-telemetry-message:message/route-monitoring\
[peer-type='global-instance-peer']\
[peer-distinguisher='0:0:0']\
[peer-address='203.0.113.45']\
[peer-as='65002']\
[peer-bgp-id='203.0.113.1']\
/rib-entry/ipv4-unicast/adj-rib-in-post/route\
[prefix='192.0.2.0/24']\
[path-id='0']

Headers:
  schema-id:     5
  content-type:  application/yang-data+json
  partition-key: router-nyc-01
]]></sourcecode>
          </figure>

          <figure anchor="message-value-bmp-route-monitoring-example"
            title="BMP Route Monitoring Message Value">
            <sourcecode type="json"><![CDATA[
{
  "ietf-bmp-telemetry-message:message": {
    "version": 3,
    "route-monitoring": {
      "peer-type": "global-instance-peer",
      "peer-distinguisher": "0:0:0",
      "peer-address": "203.0.113.45",
      "peer-as": 65002,
      "peer-bgp-id": "203.0.113.1",
      "timestamp": "2026-02-15T14:40:00Z",
      "afi-safi-type": "iana-bgp-types:ipv4-unicast",
      "rib-entry": {
        "ipv4-unicast": {
          "adj-rib-in-post": {
            "route": {
              "prefix": "192.0.2.0/24",
              "path-id": 0,
              "attributes": {
                "origin": "igp",
                "as-path": {
                  "segment": [
                    {
                      "type": "as-sequence",
                      "member": [ 65002, 65003, 65004 ]
                    }
                  ]
                },
                "next-hop": "203.0.113.45",
                "med": 100,
                "local-pref": 150
              },
              "community": [ "65001:1000", "65001:2000" ]
            }
          }
        }
      },
      "vrf-table-name": "customer-a",
      "sequence-number": "5432",
      "path-status": {
        "invalid": true,
        "nonselected": true,
        "reason-code": "invalid-as-loop"
      },
      "timestamps": [
        {
          "timestamp-type": "trigger-time",
          "timestamp": "2026-02-15T14:39:58.500000Z"
        },
        {
          "timestamp-type": "adj-rib-in-time",
          "timestamp": "2026-02-15T14:39:58.750000Z"
        }
      ],
      "extended-flags": {
        "ipv6-peer": true,
        "post-policy": true,
        "adj-rib-out": true
      }
    }
  }
}
]]></sourcecode>
          </figure>
        </section>

        <section anchor="bmp-termination">
          <name>BMP Termination</name>

          <t>The Message Key consists of only the node hostname and the
            message-type path, as described above.</t>

          <figure anchor="message-key-bmp-term-example"
            title="BMP Termination Message Key and Headers">
            <sourcecode type="text"><![CDATA[
NOTE: The Key is a two-line byte string; the line break between the
      node hostname and the YANG path is a literal LF (U+000A).

Key:
  router-nyc-01
  /ietf-bmp-telemetry-message:message/termination-message

Headers:
  schema-id:     6
  content-type:  application/yang-data+json
  partition-key: router-nyc-01
]]></sourcecode>
          </figure>

          <figure anchor="message-value-bmp-term-example"
            title="BMP Termination Message Value">
            <sourcecode type="json"><![CDATA[
{
  "ietf-bmp-telemetry-message:message": {
    "version": 3,
    "termination-message": {
      "string": [
        "Scheduled maintenance window"
      ],
      "reason": "administratively-closed",
      "sequence-number": "18567",
      "timestamps": [
        {
          "timestamp-type": "message-export-time",
          "timestamp": "2026-02-15T15:45:00.500000Z"
        }
      ]
    }
  }
}
]]></sourcecode>
          </figure>
        </section>
      </section>

      <section anchor="BMP_Partitioning_Solution">
        <name>BMP Partition Keys and Routing</name>

        <t>Since BMP requires Message ordering for a monitored BGP RIB,
          and Message Brokers ensure Message ordering on partitions, a
          Partition Key and a custom partitioner logic is being
          introduced so that all BMP messages for a particular BGP RIB
          are hashed to on one partition. The Partition Key consists of
          the hostname of the network node.</t>

        <t>In the partitioner implementation of the YANG Message Broker
          Producer, instead of the Message Key, the Partition Key MUST
          be used to deterministically hash BMP Messages to partitions. </t>
      </section>

      <section anchor="YANG_Message_Broker_BMP_Topic-Naming_Solution">
        <name>Message Broker BMP Topic Naming</name>

        <t>There are two Message Broker topics.</t>

        <ul>
          <li>bmp-state-changes-and-statistics: Containing all BMP
            messages in real-time</li>

          <li>bmp-current-state: Containing all BMP message types,
            except statistics, topic compacted.</li>
        </ul>

        <t>Optionally, an organization prefix can be prepended with a
          "-" separator. A Message Broker Consumer MAY consume either
          "bmp-state-changes-and-statistics", "bmp-current-state" or a
          subset depending on use case.</t>

        <t>If a subset is consumed, the consumer hashes the Message Key,
          applies modulo with the number of partitions, and determines
          the partition from which it should consume messages bearing
          that Message Key.</t>

        <t>To parse the Message Key, the consumer splits the byte string
          on newline (LF) characters. The first line is the node-name
          and the second the YANG path.</t>

        <t><xref target="bmp-topic-name-example" /> shows an example where
				"bmp-state-changes-and-statistics" is being used.</t>

        <figure anchor="bmp-topic-name-example"
          title="BMP Topic Name Example">
          <sourcecode type="text"><![CDATA[
netops-bmp-state-changes-and-statistics
]]></sourcecode>
        </figure>
      </section>
    </section>

    <section anchor="Message_Broker_Implementations">
      <name>Message Broker Implementations</name>

      <t>Topic, Partitioning and Message Keys are generic concepts of
        Message Brokers. There are two known Message Broker
        implementations supporting all features described in this
        document.</t>

      <section anchor="MB_Implementations_Kafka">
        <name>Apache Kafka</name>

        <t>Apache Kafka supports Message Keys, Partitioning and Log
          Compaction. Per default, the partitioner logic uses Message
          Keyes for deterministic partition Message distribution.</t>

        <t>This document introduces "partioning-key" in the Apache Kafka
          header to be used by the partitioner instead of the "key"
          (Message Key) when distributing Messages to the partitions.</t>
      </section>

      <section anchor="MB_Implementations_Pulsar">
        <name>Apache Pulsar</name>

        <t>Apache Pulsar supports Message Keys, Partitioning and Topic
          Compaction. Per default, the partitioner logic uses Message
          Keyes for deterministic partition Message distribution.
          Optionally, a dedicated ordering key can be used.</t>

        <t>This document introduces "partioning-key" which is to be used
          as ordering key.</t>
      </section>
    </section>

    <section>
      <name>IANA Considerations</name>
      <t>This document registers the following two namespace URIs in the <xref
          target="RFC3688">IETF XML Registry</xref>:</t>

      <ul>
        <li>URI: urn:ietf:params:xml:ns:yang:ietf-bmp-telemetry-message</li>
        <li>Registrant Contact: The IESG.</li>
        <li>XML: N/A; the requested URI is an XML namespace.</li>
      </ul>

      <ul>
        <li>URI: urn:ietf:params:xml:ns:yang:ietf-bgp-rib-entry</li>
        <li>Registrant Contact: The IESG.</li>
        <li>XML: N/A; the requested URI is an XML namespace.</li>
      </ul>

      <ul>
        <li>URI: urn:ietf:params:xml:ns:yang:ietf-bgp-open</li>
        <li>Registrant Contact: The IESG.</li>
        <li>XML: N/A; the requested URI is an XML namespace.</li>
      </ul>

      <ul>
        <li>URI: urn:ietf:params:xml:ns:yang:ietf-bmp-tlv</li>
        <li>Registrant Contact: The IESG.</li>
        <li>XML: N/A; the requested URI is an XML namespace.</li>
      </ul>

      <t>This document registers the following two YANG modules in the <xref
          target="RFC3688">YANG Module Names registry</xref>:</t>

      <ul>
        <li>Name: ietf-bmp-telemetry-message</li>
        <li>Namespace:
          urn:ietf:params:xml:ns:yang:ietf-bmp-telemetry-message</li>
        <li>Prefix: bmptm</li>
        <li>Reference: RFC XXXX</li>
      </ul>

      <t />

      <ul>
        <li>Name: ietf-bgp-rib-entry</li>
        <li>Namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-rib-entry</li>
        <li>Prefix: bmptm</li>
        <li>Reference: RFC XXXX</li>
      </ul>

      <ul>
        <li>Name: ietf-bgp-open</li>
        <li>Namespace: urn:ietf:params:xml:ns:yang:ietf-bgp-open</li>
        <li>Prefix: bmptm</li>
        <li>Reference: RFC XXXX</li>
      </ul>

      <ul>
        <li>Name: ietf-bmp-tlv</li>
        <li>Namespace: urn:ietf:params:xml:ns:yang:ietf-bmp-tlv</li>
        <li>Prefix: bmptm</li>
        <li>Reference: RFC XXXX</li>
      </ul>

    </section>

    <section>
      <name>Security Considerations</name>
      <t>This section is modeled after the template described in <xref
          section="3.7" sectionFormat="of"
          target="I-D.ietf-netmod-rfc8407bis" />.</t>

      <t>The "ietf-bmp-telemetry-message", "ietf-bgp-rib-entry",
        "ietf-bgp-open" and "ietf-bmp-tlv" YANG modules defines one
        combined data model that are designed to be accessed via
        YANG-based management protocols, such as NETCONF <xref
          target="RFC6141" /> and RESTCONF <xref target="RFC8040" />.
        These protocols have to use a secure transport layer (e.g., SSH <xref
          target="RFC4252" />, TLS <xref target="RFC8446" />, and QUIC <xref
          target="RFC9000" />) and have to use mutual authentication.</t>

      <t>The Network Configuration Access Control Model (NACM) <xref
          target="RFC8341" /> provides the means to restrict access for
        particular NETCONF or RESTCONF users to a preconfigured subset
        of all available NETCONF or RESTCONF protocol operations and
        content. </t>

      <t>There are a number of data nodes defined in this YANG module
        that are writable/creatable/deletable (i.e., "config true",
        which is the default). All writable data nodes are likely to be
        reasonably sensitive or vulnerable in some network environments.
        Write operations (e.g., edit-config) and delete operations to
        these data nodes without proper protection or authentication can
        have a negative effect on network operations. The following
        subtrees and data nodes have particular
        sensitivities/vulnerabilities:</t>

      <t>"There are no particularly sensitive writable data nodes."</t>

      <t>Some of the readable data nodes in this YANG module may be
        considered sensitive or vulnerable in some network environments.
        It is thus important to control read access (e.g., via get,
        get-config, or notification) to these data nodes. Specifically,
        the following subtrees and data nodes have particular
        sensitivities/ vulnerabilities:</t>

      <t>"There are no particularly sensitive readable data nodes."</t>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4252.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6141.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7854.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7950.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8671.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9069.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-nmop-terminology.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-nmop-yang-message-broker-integration.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-nmop-message-broker-telemetry-message.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.netana-nmop-yang-message-broker-message-key.xml" />
      </references>

      <references>
        <name>Informative References</name>
        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-idr-bgp-model.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-grow-bmp-yang.xml" />

        <xi:include
          href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-netmod-rfc8407bis.xml" />

        <reference anchor="Deh22"
          target="https://www.oreilly.com/library/view/data-mesh/9781492092384/">
          <front>
            <title>Data Mesh</title>

            <author fullname="Zhamak Dehghani" initials="Z."
              surname="Dehghani" />

            <date month="March" year="2022" />
          </front>

          <seriesInfo name="ISBN" value="9781492092391" />

          <refcontent>O'Reilly Media</refcontent>
        </reference>

        <reference anchor="Kaf11" target="https://kafka.apache.org/">
          <front>
            <title>Apache Kafka</title>

            <author fullname="Neha Narkhede" initials="N."
              surname="Narkhede" />

            <date month="January" year="2011" />
          </front>

          <refcontent>Apache Software Foundation</refcontent>
        </reference>

        <reference anchor="Pul16" target="https://pulsar.apache.org/">
          <front>
            <title>Apache Pulsar</title>

            <author fullname="Sijie Guo" initials="S." surname="Guo" />

            <author fullname="Matteo  Merli" initials="M."
              surname="Merli" />

            <date month="January" year="2016" />
          </front>

          <refcontent>Apache Software Foundation</refcontent>
        </reference>
      </references>
    </references>

    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>Thanks to xxx for their comments and reviews.</t>
    </section>

    <section anchor="Contributors" numbered="false">
      <name>Contributors</name>

      <t>Many thanks goes to the authors of <xref
          target="I-D.ietf-idr-bgp-model" /> from which the BGP RIB
        submodules defined in <xref section="7.6" sectionFormat="of"
          target="I-D.ietf-idr-bgp-model" /> have been obtained and
        adjusted for BMP integration.</t>

      <author fullname="Mahesh Jethanandani" initials="M."
        surname="Jethanandani">
        <organization>Arrcus</organization>
        <address>
          <postal>
            <region>CA</region>
            <country>USA</country>
          </postal>
          <email>mjethanandani@gmail.com</email>
        </address>
      </author>

      <author fullname="Keyur Patel" initials="K." surname="Patel">
        <organization>Arrcus</organization>
        <address>
          <postal>
            <region>CA</region>
            <country>USA</country>
          </postal>
          <email>keyur@arrcus.com</email>
        </address>
      </author>

      <author fullname="Susan Hares" initials="S." surname="Hares">
        <organization>Huawei</organization>
        <address>
          <postal>
            <street>7453 Hickory Hill</street>
            <city>Saline</city>
            <region>MI</region>
            <code>48176</code>
            <country>USA</country>
          </postal>
          <email>shares@ndzh.com</email>
        </address>
      </author>

      <author fullname="Jeffrey Haas" initials="J." surname="Haas">
        <organization>Juniper Networks</organization>
        <address>
          <email>jhaas@pfrc.org</email>
        </address>
      </author>
    </section>

  </back>
</rfc>