module ietf-bfd {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-bfd";
  prefix bfd;

  import ietf-bfd-types {
    prefix bfd-types;
    reference
      "RFC 9314: YANG Data Model for Bidirectional Forwarding
       Detection (BFD)";
  }
  import ietf-routing {
    prefix rt;
    reference
      "RFC 8349: A YANG Data Model for Routing Management
       (NMDA Version)";
  }

  organization
    "IETF BFD Working Group";
  contact
    "WG Web:   <https://datatracker.ietf.org/wg/bfd/>
     WG List:  <mailto:rtg-bfd@ietf.org>

     Editor:   Reshad Rahman
               <mailto:reshad@yahoo.com>

     Editor:   Lianshu Zheng
               <mailto:veronique_cheng@hotmail.com>

     Editor:   Mahesh Jethanandani
               <mailto:mjethanandani@gmail.com>";
  description
    "This module contains the YANG definition for BFD parameters as
     per RFC 5880.

     Copyright (c) 2022 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 9314; see the
     RFC itself for full legal notices.";
  reference
    "RFC 5880: Bidirectional Forwarding Detection (BFD)
     RFC 9314: YANG Data Model for Bidirectional Forwarding
     Detection (BFD)";

  revision 2022-09-22 {
    description
      "Updating reference to RFC 9314.";
    reference
      "RFC 9314: YANG Data Model for Bidirectional Forwarding
       Detection (BFD).";
  }
  revision 2021-10-21 {
    description
      "Initial revision.";
    reference
      "RFC 9127: YANG Data Model for Bidirectional Forwarding
       Detection (BFD)";
  }

  augment "/rt:routing/rt:control-plane-protocols/"
        + "rt:control-plane-protocol" {
    when "derived-from-or-self(rt:type, 'bfd-types:bfdv1')" {
      description
        "This augmentation is only valid for a control plane protocol
         instance of BFD (type 'bfdv1').";
    }
    description
      "BFD augmentation.";
    container bfd {
      description
        "BFD top-level container.";
      uses bfd-types:session-statistics-summary;
    }
  }
}
