netconfcentral logo

ietf-pim-base@2018-04-16



  module ietf-pim-base {

    yang-version 1.1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-pim-base";

    prefix pim-base;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-yang-types {
      prefix yang;
    }
    import ietf-routing-types {
      prefix rt-types;
    }
    import ietf-interfaces {
      prefix if;
    }
    import ietf-routing {
      prefix rt;
    }
    import ietf-bfd-types {
      prefix bfd-types;
    }

    organization "IETF PIM Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/pim/>
WG List:  <mailto:pim@ietf.org>

Editor:   Xufeng Liu
	  <mailto:xufeng.liu.ietf@gmail.com>

Editor:   Pete McAllister
	  <mailto:pete.mcallister@metaswitch.com>

Editor:   Anish Peter
	  <mailto:anish.ietf@gmail.com>

Editor:   Mahesh Sivakumar
	  <mailto:sivakumar.mahesh@gmail.com>

Editor:   Yisong Liu
	  <mailto:liuyisong@huawei.com>

Editor:   Fangwei Hu
	  <mailto:hu.fangwei@zte.com.cn>";

    description
      "The module defines a collection of YANG definitions common for
all PIM (Protocol Independent Multicast) modes.

Copyright (c) 2018 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 Simplified BSD License set
forth in Section 4.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(http://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 "2018-04-16" {
      description "Initial revision.";
      reference
        "RFC XXXX: A YANG Data Model for PIM";

    }


    feature bfd {
      description
        "Support BFD (Bidirectional Forwarding Detection).";
      reference
        "RFC5880: Bidirectional Forwarding Detection (BFD)";

    }

    feature global-graceful-restart {
      description
        "Global configuration for graceful restart support as per
RFC5306.";
    }

    feature intf-dr-priority {
      description
        "Support configuration of interface DR (Designated Router)
priority.";
      reference
        "RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.3.2.";

    }

    feature intf-hello-holdtime {
      description
        "Support configuration of interface hello holdtime.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.3.3.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.11.";

    }

    feature intf-hello-interval {
      description
        "Support configuration of interface hello interval.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.8.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.11.";

    }

    feature intf-hello-multiplier {
      description
        "Support configuration of interface hello multiplier.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.8.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.11.";

    }

    feature intf-jp-interval {
      description
        "Support configuration of interface join prune interval.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.8.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.11.";

    }

    feature intf-jp-holdtime {
      description
        "Support configuration of interface join prune holdtime.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.8.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.11.";

    }

    feature intf-jp-multiplier {
      description
        "Support configuration of interface join prune multiplier.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.8.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.11.";

    }

    feature intf-propagation-delay {
      description
        "Support configuration of interface propagation delay.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.3.5.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.3.3.";

    }

    feature intf-override-interval {
      description
        "Support configuration of interface override interval.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.3.3.
         RFC5015: Bidirectional Protocol Independent Multicast
        (BIDIR-PIM). Sec. 3.6.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.11.";

    }

    feature per-af-graceful-restart {
      description
        "Per address family configuration for graceful restart support
as per RFC5306.";
    }

    typedef interface-event-type {
      type enumeration {
        enum "up" {
          value 0;
          description
            "Neighbor status changed to up.";
        }
        enum "down" {
          value 1;
          description
            "Neighbor status changed to down.";
        }
        enum "new-dr" {
          value 2;
          description
            "A new DR (Designated Router) was elected on the connected
network.";
        }
        enum "new-df" {
          value 3;
          description
            "A new DF (Designated Forwarder) was elected on the
connected network.";
        }
      }
      description
        "Operational status event type for notifications.";
    }

    typedef neighbor-event-type {
      type enumeration {
        enum "up" {
          value 0;
          description
            "Neighbor status changed to up.";
        }
        enum "down" {
          value 1;
          description
            "Neighbor status changed to down.";
        }
      }
      description
        "Operational status event type for notifications.";
    }

    identity pim-mode {
      base 
      description
        "The PIM mode in which a group is operating.";
    }

    identity pim-none {
      base pim-mode;
      description "PIM is not operating.";
    }

    identity pim-bidir {
      base pim-mode;
      description
        "PIM operates in the Bidirectional Mode.";
    }

    identity pim-dm {
      base pim-mode;
      description
        "PIM operates in the Dense Mode (DM).";
    }

    identity pim-sm {
      base pim-mode;
      description
        "PIM operates in the Sparse Mode (SM).";
    }

    identity pim-asm {
      base pim-sm;
      description
        "PIM operates in the Sparse Mode with Any Source Multicast
(ASM).";
    }

    identity pim-ssm {
      base pim-sm;
      description
        "PIM operates in the Sparse Mode with Source-Specific
Multicast (SSM).";
    }

    grouping graceful-restart-container {
      description
        "A grouping defining a container of graceful restart
attributes.";
      container graceful-restart {
        description
          "Container of graceful restart attributes.";
        leaf enabled {
          type boolean;
          default "false";
          description
            "Enable or disable graceful restart.";
        }

        leaf duration {
          type uint16;
          units "seconds";
          default "60";
          description
            "Maximum time for graceful restart to finish.";
        }
      }  // container graceful-restart
    }  // grouping graceful-restart-container

    grouping multicast-route-attributes {
      description
        "A grouping defining multicast route attributes.";
      leaf expiration {
        type rt-types:timer-value-seconds16;
        description
          "When the route will expire.";
      }

      leaf incoming-interface {
        type if:interface-ref;
        description
          "Reference to an entry in the global interface
list.";
      }

      leaf is-spt {
        type boolean;
        description
          "'true' if SPT (Shortest Path Tree) bit is set to indicate
forwarding is taking place on the (S,G) Shortest Path Tree
(SPT).";
        reference
          "RFC7761: Protocol Independent Multicast - Sparse Mode
          (PIM-SM): Protocol Specification (Revised). Sec. 4.1.3.";

      }

      leaf mode {
        type identityref {
          base pim-mode;
        }
        description "PIM mode.";
      }

      leaf msdp-learned {
        type boolean;
        description
          "'true' if route is learned from MSDP (Multicast Source
 Discovery Protocol).";
      }

      leaf rp-address {
        type inet:ip-address;
        description
          "RP (Rendezvous Point) address.";
      }

      leaf rpf-neighbor {
        type inet:ip-address;
        description
          "RPF (Reverse Path Forwarding) neighbor address.";
      }

      leaf up-time {
        type rt-types:timeticks64;
        description
          "The number of time ticks (hundredths of a second) since the
route last transitioned into the active state.";
      }

      list outgoing-interface {
        key "name";
        description
          "A list of outgoing interfaces.";
        leaf name {
          type if:interface-ref;
          description "Interface name.";
        }

        leaf expiration {
          type rt-types:timer-value-seconds16;
          description "Expiring time.";
        }

        leaf up-time {
          type rt-types:timeticks64;
          description
            "The number of time ticks (hundredths of a second) since
the oper-status of the interface was last changed to
'up'.";
        }

        leaf jp-state {
          type enumeration {
            enum "no-info" {
              value 0;
              description
                "The interface has no (*,G) Join state and no timers
running.";
            }
            enum "join" {
              value 1;
              description
                "The interface has Join state.";
            }
            enum "prune-pending" {
              value 2;
              description
                "The router has received a Prune on this interface from
a downstream neighbor and is waiting to see whether
the prune will be overridden by another downstream
router.  For forwarding purposes, the Prune-Pending
state functions exactly like the Join state.";
            }
          }
          description "Join-prune state.";
        }
      }  // list outgoing-interface
    }  // grouping multicast-route-attributes

    grouping neighbor-state-af-attributes {
      description
        "A grouping defining neighbor per address family attributes.";
      leaf bfd-state {
        type bfd-types:state;
        description
          "BFD (Bidirectional Forwarding Detection) status.";
      }

      leaf expiration {
        type rt-types:timer-value-seconds16;
        description
          "Neighbor expiring time.";
      }

      leaf dr-priority {
        type uint32;
        description
          "DR (Designated Router) priority as the preference in the DR
election process.";
      }

      leaf gen-id {
        type uint32;
        description
          "The value of the Generation ID in the last Hello message
from the neighbor.";
      }

      container lan-prune-delay {
        description
          "The information of the LAN Prune Delay option in the Hello
message from the neighbor.";
        leaf present {
          type boolean;
          description
            "'true' if the LAN Prune Delay option is present in the
last Hello message from the neighbor.";
        }

        leaf override-interval {
          when "../present = 'true'" {
            description
              "Available only when the leaf present is 'true'.";
          }
          type uint16;
          units "milliseconds";
          description
            "The value of the Override_Interval field of the LAN Prune
Delay option in the last Hello message from the neighbor.
The neighbor uses this value to indicate a short period
after a Join or Prune to allow other routers on the LAN
to override the Join or Prune.";
        }

        leaf propagation-delay {
          when "../present = 'true'" {
            description
              "Available only when the leaf present is 'true'.";
          }
          type uint16;
          units "milliseconds";
          description
            "The value of the Propagation_Delay field of the LAN Prune
Delay option in the last Hello message from the neighbor.
The value is the propagation delay over the local link
expected by the neighbor.";
        }

        leaf t-bit {
          when "../present = 'true'" {
            description
              "Available only when the leaf present is 'true'.";
          }
          type boolean;
          description
            "'true' if the T bit is set in the LAN Prune Delay option
in the last Hello message from the neighbor. This flag
indicates the neighbor's capability to disable Join
message suppression.";
        }
      }  // container lan-prune-delay

      leaf up-time {
        type rt-types:timeticks64;
        description
          "The number of time ticks (hundredths of a second) since
the neighbor relationship has been formed as reachable
without beeing timed out.";
      }
    }  // grouping neighbor-state-af-attributes

    grouping pim-instance-af-state-ref {
      description
        "An absolute reference to a PIM instance address family.";
      leaf instance-af-ref {
        type leafref {
          path
            "/rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:address-family/pim-base:address-family";
        }
        description
          "Reference to a PIM instance address family.";
      }
    }  // grouping pim-instance-af-state-ref

    grouping pim-interface-state-ref {
      description
        "An absolute reference to a PIM interface state.";
      leaf interface-ref {
        type leafref {
          path
            "/rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:interfaces/pim-base:interface/pim-base:name";
        }
        description
          "Reference to a PIM interface.";
      }
    }  // grouping pim-interface-state-ref

    grouping statistics-sent-received {
      description
        "A grouping defining sent and received statistics
on PIM messages.";
      reference
        "RFC3973: Protocol Independent Multicast - Dense Mode
        (PIM-DM): Protocol Specification (Revised). Sec. 4.7.1.
         RFC5015: Bidirectional Protocol Independent Multicast
        (BIDIR-PIM). Sec. 3.7.
         RFC7761: Protocol Independent Multicast - Sparse Mode
        (PIM-SM): Protocol Specification (Revised). Sec. 4.9.";

      leaf assert {
        type yang:counter64;
        description
          "The number of Assert messages, with the message Type
of 5 in RFC3973 and RFC7761.";
      }

      leaf bsr {
        type yang:counter64;
        description
          "The number of Bootstrap messages, with the message Type
of 4 in RFC3973 and RFC7761.";
      }

      leaf candidate-rp-advertisement {
        type yang:counter64;
        description
          "The number of Candidate RP Advertisement messages, with the
message Type of 8 in RFC3973 and RFC7761.";
      }

      leaf df-election {
        type yang:counter64;
        description
          "The number of DF (Designated Forwarder) Election messages,
with the message Type of 10 in RFC5015.";
      }

      leaf graft {
        type yang:counter64;
        description
          "The number of Graft messages, with the message Type
of 6 in RFC3973 and RFC7761.";
      }

      leaf graft-ack {
        type yang:counter64;
        description
          "The number of Graft-Ack messages, with the message Type
of 7 in RFC3973 and RFC7761.";
      }

      leaf hello {
        type yang:counter64;
        description
          "The number of Hello messages, with the message Type
of 0 in RFC3973 and RFC7761.";
      }

      leaf join-prune {
        type yang:counter64;
        description
          "The number of Join/Prune messages, with the message Type
of 3 in RFC3973 and RFC7761.";
      }

      leaf register {
        type yang:counter64;
        description
          "The number of Register messages, with the message Type
of 1 in RFC3973 and RFC7761.";
      }

      leaf register-stop {
        type yang:counter64;
        description
          "The number of Register Stop messages, with the message Type
of 2 in RFC3973 and RFC7761.";
      }

      leaf state-refresh {
        type yang:counter64;
        description
          "The number of State Refresh messages, with the message Type
of 9 in RFC3973.";
      }
    }  // grouping statistics-sent-received

    augment /rt:routing/rt:control-plane-protocols {
      description
        "PIM augmentation to the routing instance model.";
      container pim {
        presence "Enables the PIM protocol.";
        description
          "PIM configuration and operational data.";
        uses graceful-restart-container;

        list address-family {
          key "address-family";
          description
            "Each list entry for one address family.";
          uses rt:address-family;

          uses graceful-restart-container;

          container statistics {
            config false;
            description
              "A container defining statistics attributes.";
            leaf discontinuity-time {
              type yang:date-and-time;
              description
                "The time on the most recent occasion at which any one
or more of the statistic counters suffered a
discontinuity. If no such discontinuities have
occurred since the last re-initialization of the local
management subsystem, then this node contains the time
the local management subsystem re-initialized
itself.";
            }

            container error {
              description
                "Containing error statistics.";
              uses statistics-sent-received {
                description
                  "Statistic counters on the PIM messages per PIM
message Type. Each leaf attribute counts the number
of PIM messages that were of a particular Type (such
as Hello) and contained errors preventing them from
being processed by PIM.

Such messages are also counted by the corresponding
counter of the same Type (such as Hello) in the
'received' container.";
              }

              leaf checksum {
                type yang:counter64;
                description
                  "The number of PIM messages that were passed to PIM
and contained checksum errors.";
              }

              leaf format {
                type yang:counter64;
                description
                  "The number of PIM messages that passed checksum
validation but contained format errors, including
the errors such as PIM Version, Type, and message
length.";
              }
            }  // container error

            container queue {
              description
                "Containing queue statistics.";
              leaf size {
                type uint32;
                description
                  "The size of the input queue.";
              }

              leaf overflow {
                type yang:counter32;
                description
                  "The number of the input queue overflows.";
              }
            }  // container queue

            container received {
              description
                "Containing statistics of received messages.";
              uses statistics-sent-received;
            }  // container received

            container sent {
              description
                "Containing statistics of sent messages.";
              uses statistics-sent-received;
            }  // container sent
          }  // container statistics

          container topology-tree-info {
            config false;
            description
              "Containing topology tree information.";
            list ipv4-route {
              when
                "../../address-family = 'rt:ipv4'" {
                description
                  "Only applicable to IPv4 address family.";
              }
              key "group source-address is-rpt";
              description
                "A list of IPv4 routes.";
              leaf group {
                type rt-types:ipv4-multicast-group-address;
                description "Group address.";
              }

              leaf source-address {
                type rt-types:ipv4-multicast-source-address;
                description
                  "Source address.";
              }

              leaf is-rpt {
                type boolean;
                description
                  "'true' if the tree is RPT (Rendezvous-Point Tree).";
              }

              uses multicast-route-attributes;
            }  // list ipv4-route

            list ipv6-route {
              when
                "../../address-family = 'rt:ipv6'" {
                description
                  "Only applicable to IPv6 address family.";
              }
              key "group source-address is-rpt";
              description
                "A list of IPv6 routes.";
              leaf group {
                type rt-types:ipv6-multicast-group-address;
                description "Group address.";
              }

              leaf source-address {
                type rt-types:ipv6-multicast-source-address;
                description
                  "Source address.";
              }

              leaf is-rpt {
                type boolean;
                description
                  "'true' if the tree is RPT (Rendezvous-Point Tree).";
              }

              uses multicast-route-attributes;
            }  // list ipv6-route
          }  // container topology-tree-info
        }  // list address-family

        container interfaces {
          description
            "Containing a list of interfaces.";
          list interface {
            key "name";
            description
              "List of pim interfaces.";
            leaf name {
              type if:interface-ref;
              description
                "Reference to an entry in the global interface
list.";
            }

            list address-family {
              key "address-family";
              description
                "Each list entry for one address family.";
              uses rt:address-family;

              container bfd {
                if-feature bfd;
                description
                  "BFD (Bidirectional Forwarding Detection)
operation.";
                uses bfd-types:client-cfg-parms;
              }  // container bfd

              leaf dr-priority {
                if-feature intf-dr-priority;
                type uint32;
                default "1";
                description
                  "DR (Designated Router) priority as the preference in
the DR election process.";
              }

              leaf hello-interval {
                if-feature intf-hello-interval;
                type rt-types:timer-value-seconds16;
                default "30";
                description
                  "Periodic interval for Hello messages.
If 'infinity' or 'not-set' is used, no periodic
Hello messages are sent.";
                reference
                  "RFC3973: Protocol Independent Multicast - Dense Mode
                  (PIM-DM): Protocol Specification (Revised).
                  Sec. 4.8.
                   RFC7761: Protocol Independent Multicast - Sparse
                  Mode (PIM-SM): Protocol Specification (Revised).
                  Sec. 4.11.";

              }

              choice hello-holdtime-or-multiplier {
                description
                  "Holdtime is timer value to time out the neighbor
state when the timer expires.
The holdtime value can be specified either by the
given holdtime value or by the calculation of the
hello-interval multiplied by the given value of the
multiplier.";
                case holdtime {
                  if-feature intf-hello-holdtime;
                  leaf hello-holdtime {
                    type rt-types:timer-value-seconds16;
                    default "105";
                    description
                      "Hello holdtime is the amount of time to keep
the neighbor reachable until a new Hello message
is received.";
                  }
                }  // case holdtime

                case multiplier {
                  if-feature intf-hello-multiplier;
                  leaf hello-multiplier {
                    type rt-types:timer-multiplier;
                    default "3";
                    description
                      "Hello multiplier is the number by which the
hello interval is multplied to obtain the Hello
holdtime.
The value of the Hello holdtime is calculated
as:
hello-holdtime =
(multiplier + 0.5) * (hello-interval)";
                  }
                }  // case multiplier
              }  // choice hello-holdtime-or-multiplier

              leaf jp-interval {
                if-feature intf-jp-interval;
                type rt-types:timer-value-seconds16;
                default "60";
                description
                  "Periodic interval between Join/Prune messages.
If 'infinity' or 'not-set' is used, no periodic
Join/Prune messages are sent.";
              }

              choice jp-holdtime-or-multiplier {
                description
                  "Join/Prune holdtime is the amount of time a receiver
must keep the Join/Prune state alive.
The holdtime value can be specified either by the
given holdtime value or by the calculation of the
jp-interval multiplied by the given value of the
multiplier.";
                case holdtime {
                  if-feature intf-jp-holdtime;
                  leaf jp-holdtime {
                    type rt-types:timer-value-seconds16;
                    default "210";
                    description
                      "Join/Prune holdtime is the amount of time a
receiver must keep the Join/Prune state alive.";
                  }
                }  // case holdtime

                case multiplier {
                  if-feature intf-jp-multiplier;
                  leaf jp-multiplier {
                    type rt-types:timer-multiplier;
                    default "3";
                    description
                      "Join prune multiplier is the number by which the
join prune interval is multplied to obtain the
Join/Prune holdtime.
The value of the Join/Prune holdtime is
calculated as:
jp-holdtime =
(multiplier + 0.5) * (jp-interval)";
                  }
                }  // case multiplier
              }  // choice jp-holdtime-or-multiplier

              leaf override-interval {
                if-feature intf-override-interval;
                type uint16;
                units "milliseconds";
                default "2500";
                description
                  "A short period after a Join or Prune to allow other
routers on the LAN to override the Join or Prune.";
              }

              leaf propagation-delay {
                if-feature intf-propagation-delay;
                type uint16;
                units "milliseconds";
                default "500";
                description
                  "Expected propagation delay over the local link.";
              }

              leaf oper-status {
                type enumeration {
                  enum "up" {
                    value 0;
                    description
                      "The interface is ready to pass PIM messages.";
                  }
                  enum "down" {
                    value 1;
                    description
                      "The interface does not pass PIM messages.";
                  }
                }
                config false;
                description
                  "PIM operational status on the interface.
This status is PIM specific and separate from the
operational status of the underlying interface.";
              }

              leaf gen-id {
                type uint32;
                config false;
                description
                  "The value of the Generation ID this router uses to
insert in the PIM Hello message sent on this
interface.";
              }

              leaf hello-expiration {
                type rt-types:timer-value-seconds16;
                config false;
                description
                  "Hello interval expiration time.";
              }

              container ipv4 {
                when
                  "../address-family = 'rt:ipv4'" {
                  description
                    "Only applicable to IPv4 address family.";
                }
                config false;
                description
                  "Interface state attributes for IPv4.";
                leaf-list address {
                  type inet:ipv4-address;
                  description
                    "List of addresses on which PIM is operating.";
                }

                leaf dr-address {
                  type inet:ipv4-address;
                  description
                    "DR (Designated Router) address.";
                }
              }  // container ipv4

              container ipv6 {
                when
                  "../address-family = 'rt:ipv6'" {
                  description
                    "Only applicable to IPv6 address family.";
                }
                config false;
                description
                  "Interface state attributes for IPv6.";
                leaf-list address {
                  type inet:ipv6-address;
                  description
                    "List of addresses on which PIM is operating.";
                }

                leaf dr-address {
                  type inet:ipv6-address;
                  description
                    "DR (Designated Router) address.";
                }
              }  // container ipv6

              container neighbors {
                config false;
                description
                  "Information learned from neighbors through this
interface.";
                list ipv4-neighbor {
                  when
                    "../../address-family = 'rt:ipv4'" {
                    description
                      "Only applicable to IPv4 address family.";
                  }
                  key "address";
                  description
                    "Neighbor state information.";
                  leaf address {
                    type inet:ipv4-address;
                    description
                      "Neighbor address.";
                  }

                  uses neighbor-state-af-attributes;
                }  // list ipv4-neighbor

                list ipv6-neighbor {
                  when
                    "../../address-family = 'rt:ipv6'" {
                    description
                      "Only applicable to IPv6 address family.";
                  }
                  key "address";
                  description
                    "Neighbor state information.";
                  leaf address {
                    type inet:ipv6-address;
                    description
                      "Neighbor address.";
                  }

                  uses neighbor-state-af-attributes;
                }  // list ipv6-neighbor
              }  // container neighbors
            }  // list address-family
          }  // list interface
        }  // container interfaces
      }  // container pim
    }

    notification pim-neighbor-event {
      description
        "Notification event for neighbor.";
      leaf event-type {
        type neighbor-event-type;
        description "Event type.";
      }

      uses pim-interface-state-ref;

      leaf interface-af-ref {
        type leafref {
          path "/rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:interfaces/pim-base:interface[pim-base:name = current()/../interface-ref]/pim-base:address-family/pim-base:address-family";
        }
        description
          "Reference to a PIM interface address family.";
      }

      leaf neighbor-ipv4-ref {
        when
          "../interface-af-ref = 'rt:ipv4'" {
          description
            "Only applicable to IPv4 address family.";
        }
        type leafref {
          path "/rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:interfaces/pim-base:interface[pim-base:name = current()/../interface-ref]/pim-base:address-family[pim-base:address-family = current()/../interface-af-ref]/pim-base:neighbors/pim-base:ipv4-neighbor/pim-base:address";
        }
        description
          "Reference to a PIM IPv4 neighbor.";
      }

      leaf neighbor-ipv6-ref {
        when
          "../interface-af-ref = 'rt:ipv6'" {
          description
            "Only applicable to IPv6 address family.";
        }
        type leafref {
          path "/rt:routing/rt:control-plane-protocols/pim-base:pim/pim-base:interfaces/pim-base:interface[pim-base:name = current()/../interface-ref]/pim-base:address-family[pim-base:address-family = current()/../interface-af-ref]/pim-base:neighbors/pim-base:ipv6-neighbor/pim-base:address";
        }
        description
          "Reference to a PIM IPv6 neighbor.";
      }

      leaf up-time {
        type rt-types:timeticks64;
        description
          "The number of time ticks (hundredths of a second) since
the neighbor relationship has been formed as reachable
without beeing timed out.";
      }
    }  // notification pim-neighbor-event

    notification pim-interface-event {
      description
        "Notification event for interface.";
      leaf event-type {
        type interface-event-type;
        description "Event type.";
      }

      uses pim-interface-state-ref;

      container ipv4 {
        description
          "Containing IPv4 information.";
        leaf-list address {
          type inet:ipv4-address;
          description "List of addresses.";
        }

        leaf dr-address {
          type inet:ipv4-address;
          description
            "DR (Designated Router) address.";
        }
      }  // container ipv4

      container ipv6 {
        description
          "Containing IPv6 information.";
        leaf-list address {
          type inet:ipv6-address;
          description "List of addresses.";
        }

        leaf dr-address {
          type inet:ipv6-address;
          description
            "DR (Designated Router) address.";
        }
      }  // container ipv6
    }  // notification pim-interface-event
  }  // module ietf-pim-base