/* autogenerated by embedmodel.py.  DO NOT EDIT */

#include <zebra.h>
#include "yang.h"

static const char model[] =
	"// SPDX-License-Identifier: BSD-2-Clause\n"
	"module frr-filter {\n"
	"  yang-version 1.1;\n"
	"  namespace \"http://frrouting.org/yang/filter\";\n"
	"  prefix frr-filter;\n"
	"\n"
	"  import ietf-inet-types {\n"
	"    prefix inet;\n"
	"  }\n"
	"  import ietf-yang-types {\n"
	"    prefix yang;\n"
	"  }\n"
	"  import frr-interface {\n"
	"    prefix frr-interface;\n"
	"  }\n"
	"\n"
	"  organization \"FRRouting\";\n"
	"  contact\n"
	"    \"FRR Users List:       <mailto:frog@lists.frrouting.org>\n"
	"     FRR Development List: <mailto:dev@lists.frrouting.org>\";\n"
	"  description\n"
	"    \"This module defines filter settings\n"
	"\n"
	"     Copyright 2020 FRRouting\n"
	"\n"
	"     Redistribution and use in source and binary forms, with or without\n"
	"     modification, are permitted provided that the following conditions\n"
	"     are met:\n"
	"\n"
	"     1. Redistributions of source code must retain the above copyright notice,\n"
	"     this list of conditions and the following disclaimer.\n"
	"\n"
	"     2. Redistributions in binary form must reproduce the above copyright\n"
	"     notice, this list of conditions and the following disclaimer in the\n"
	"     documentation and/or other materials provided with the distribution.\n"
	"\n"
	"     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"
	"     \\\"AS IS\\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n"
	"     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n"
	"     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n"
	"     HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n"
	"     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n"
	"     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n"
	"     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n"
	"     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"
	"     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"
	"     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\";\n"
	"\n"
	"  revision 2019-07-04 {\n"
	"    description \"Initial revision\";\n"
	"    reference \"FRRouting\";\n"
	"  }\n"
	"\n"
	"  /*\n"
	"   * Types.\n"
	"   */\n"
	"  typedef access-list-name {\n"
	"    type string {\n"
	"      length 1..128;\n"
	"    }\n"
	"    description \"Access list name formatting\";\n"
	"  }\n"
	"\n"
	"  typedef access-list-sequence {\n"
	"    type uint32 {\n"
	"      range \"1..4294967295\";\n"
	"    }\n"
	"    description \"Access list sequence number\";\n"
	"  }\n"
	"\n"
	"  typedef access-list-action {\n"
	"    type enumeration {\n"
	"      enum deny {\n"
	"        value 0;\n"
	"        description \"Deny an entry\";\n"
	"      }\n"
	"      enum permit {\n"
	"        value 1;\n"
	"        description \"Accept an entry\";\n"
	"      }\n"
	"    }\n"
	"    description \"Access list return action on match\";\n"
	"  }\n"
	"\n"
	"  typedef access-list-ref {\n"
	"    type leafref {\n"
	"      path \"/frr-filter:lib/frr-filter:access-list/frr-filter:name\";\n"
	"      require-instance false;\n"
	"    }\n"
	"    description \"IPv4 or IPv6 access list reference\";\n"
	"  }\n"
	"\n"
	"  typedef prefix-list-ref {\n"
	"    type leafref {\n"
	"      path \"/frr-filter:lib/frr-filter:prefix-list/frr-filter:name\";\n"
	"      require-instance false;\n"
	"    }\n"
	"    description \"IPv4 or IPv6 prefix list reference\";\n"
	"  }\n"
	"\n"
	"  /*\n"
	"   * Grouping.\n"
	"   */\n"
	"  grouping distribute-list-group {\n"
	"    description \"Distribute list grouping\";\n"
	"    list distribute-list {\n"
	"      key \"interface\";\n"
	"      description \"Distribute list configuration\";\n"
	"\n"
	"      leaf interface {\n"
	"        type union {\n"
	"          type frr-interface:interface-ref;\n"
	"          type empty;\n"
	"        }\n"
	"        description\n"
	"          \"Interface to attach list to or empty for global.\";\n"
	"      }\n"
	"\n"
	"      container in {\n"
	"        description \"Inbound filter list\";\n"
	"        leaf access-list {\n"
	"          type access-list-ref;\n"
	"          description \"inbound access list\";\n"
	"        }\n"
	"        leaf prefix-list {\n"
	"          type prefix-list-ref;\n"
	"          description \"inbound prefix list\";\n"
	"        }\n"
	"      }\n"
	"      container out {\n"
	"        description \"Outbound filter list\";\n"
	"        leaf access-list {\n"
	"          type access-list-ref;\n"
	"          description \"outbound access list\";\n"
	"        }\n"
	"        leaf prefix-list {\n"
	"          type prefix-list-ref;\n"
	"          description \"outbound prefix list\";\n"
	"        }\n"
	"      }\n"
	"    }\n"
	"  }\n"
	"\n"
	"  /*\n"
	"   * Configuration data.\n"
	"   */\n"
	"  container lib {\n"
	"    description \"Filter library\";\n"
	"    list access-list {\n"
	"      key \"type name\";\n"
	"      description \"Access list instance\";\n"
	"\n"
	"      leaf type {\n"
	"        type enumeration {\n"
	"          enum ipv4 {\n"
	"              value 0;\n"
	"              description \"Internet Protocol address version 4\";\n"
	"            }\n"
	"            enum ipv6 {\n"
	"              value 1;\n"
	"              description \"Internet Protocol address version 6\";\n"
	"          }\n"
	"          enum mac {\n"
	"            value 2;\n"
	"            description \"Media Access Control address\";\n"
	"          }\n"
	"        }\n"
	"        description \"Access list content type\";\n"
	"      }\n"
	"\n"
	"      leaf name {\n"
	"        type access-list-name;\n"
	"        description \"Access list name\";\n"
	"      }\n"
	"\n"
	"      leaf remark {\n"
	"        type string;\n"
	"        description \"Access list remark\";\n"
	"      }\n"
	"\n"
	"      list entry {\n"
	"        key \"sequence\";\n"
	"        description \"Access list entry\";\n"
	"        leaf sequence {\n"
	"          type access-list-sequence;\n"
	"          description \"Access list sequence value\";\n"
	"        }\n"
	"        leaf action {\n"
	"          type access-list-action;\n"
	"          mandatory true;\n"
	"          description \"Access list action on match\";\n"
	"        }\n"
	"\n"
	"        choice value {\n"
	"          mandatory true;\n"
	"          description \"Access list value to match\";\n"
	"\n"
	"          case ipv4-prefix {\n"
	"            when \"../type = \'ipv4\'\";\n"
	"\n"
	"            choice style {\n"
	"              mandatory true;\n"
	"              description \"Access list entry style selection: zebra or cisco.\";\n"
	"\n"
	"              case zebra {\n"
	"                leaf ipv4-prefix {\n"
	"                  type inet:ipv4-prefix;\n"
	"                  mandatory true;\n"
	"                  description \"Configure IPv4 prefix to match\";\n"
	"                }\n"
	"\n"
	"                leaf ipv4-exact-match {\n"
	"                  type boolean;\n"
	"                  default false;\n"
	"                  description \"Exact match of prefix\";\n"
	"                }\n"
	"              }\n"
	"              case cisco {\n"
	"                choice standard-value {\n"
	"                  description \"Source value to match\";\n"
	"\n"
	"                  leaf host {\n"
	"                    type inet:ipv4-address;\n"
	"                    description \"Host to match\";\n"
	"                  }\n"
	"                  container network {\n"
	"                    description \"Network to match\";\n"
	"                    leaf address {\n"
	"                      type inet:ipv4-address;\n"
	"                      mandatory true;\n"
	"                      description \"Network address part.\";\n"
	"                    }\n"
	"                    leaf mask {\n"
	"                      type inet:ipv4-address;\n"
	"                      mandatory true;\n"
	"                      description \"Network mask/wildcard part.\";\n"
	"                    }\n"
	"                  }\n"
	"                  leaf source-any {\n"
	"                    /*\n"
	"                     * Was `any`, however it conflicts with `any` leaf\n"
	"                     * outside this choice.\n"
	"                     */\n"
	"                    type empty;\n"
	"                    description \"Match any\";\n"
	"                  }\n"
	"                }\n"
	"\n"
	"                choice extended-value {\n"
	"                  description \"Destination value to match\";\n"
	"\n"
	"                  leaf destination-host {\n"
	"                    type inet:ipv4-address;\n"
	"                    description \"Host to match\";\n"
	"                  }\n"
	"                  container destination-network {\n"
	"                    description \"Destination network to match\";\n"
	"                    leaf address {\n"
	"                      type inet:ipv4-address;\n"
	"                      mandatory true;\n"
	"                      description \"Network address part.\";\n"
	"                    }\n"
	"                    leaf mask {\n"
	"                      type inet:ipv4-address;\n"
	"                      mandatory true;\n"
	"                      description \"Network mask/wildcard part.\";\n"
	"                    }\n"
	"                  }\n"
	"                  leaf destination-any {\n"
	"                    type empty;\n"
	"                    description \"Match any\";\n"
	"                  }\n"
	"                }\n"
	"              }\n"
	"            }\n"
	"          }\n"
	"          case ipv6-prefix {\n"
	"            when \"../type = \'ipv6\'\";\n"
	"\n"
	"            choice style {\n"
	"              mandatory true;\n"
	"              description \"Access list entry style selection: zebra or cisco.\";\n"
	"\n"
	"              case zebra {\n"
	"                leaf ipv6-prefix {\n"
	"                  type inet:ipv6-prefix;\n"
	"                  mandatory true;\n"
	"                  description \"Configure IPv6 prefix to match\";\n"
	"                }\n"
	"\n"
	"                leaf ipv6-exact-match {\n"
	"                  type boolean;\n"
	"                  default false;\n"
	"                  description \"Exact match of prefix\";\n"
	"                }\n"
	"              }\n"
	"\n"
	"              case cisco {\n"
	"                choice standard-value {\n"
	"                  description \"Source value to match\";\n"
	"\n"
	"                  leaf ipv6-host {\n"
	"                    type inet:ipv6-address;\n"
	"                    description \"Host to match\";\n"
	"                  }\n"
	"                  container ipv6-network {\n"
	"                    description \"Container for IPv6 network configuration.\";\n"
	"\n"
	"                    leaf address {\n"
	"                      type inet:ipv6-address;\n"
	"                      mandatory true;\n"
	"                      description \"Network address part.\";\n"
	"                    }\n"
	"                    leaf mask {\n"
	"                      type inet:ipv6-address;\n"
	"                      mandatory true;\n"
	"                      description \"Network mask/wildcard part.\";\n"
	"                    }\n"
	"                  }\n"
	"                  leaf ipv6-source-any {\n"
	"                    /*\n"
	"                     * Was `any`, however it conflicts with `any` leaf\n"
	"                     * outside this choice.\n"
	"                     */\n"
	"                    type empty;\n"
	"                    description \"Match any\";\n"
	"                  }\n"
	"                }\n"
	"\n"
	"                choice extended-value {\n"
	"                  description \"Destination value to match\";\n"
	"\n"
	"                  leaf ipv6-destination-host {\n"
	"                    type inet:ipv6-address;\n"
	"                    description \"Host to match\";\n"
	"                  }\n"
	"                  container ipv6-destination-network {\n"
	"                    description \"Container for IPv6 destination network configuration.\";\n"
	"\n"
	"                    leaf address {\n"
	"                      type inet:ipv6-address;\n"
	"                      mandatory true;\n"
	"                      description \"Network address part.\";\n"
	"                    }\n"
	"                    leaf mask {\n"
	"                      type inet:ipv6-address;\n"
	"                      mandatory true;\n"
	"                      description \"Network mask/wildcard part.\";\n"
	"                    }\n"
	"                  }\n"
	"                  leaf ipv6-destination-any {\n"
	"                    type empty;\n"
	"                    description \"Match any\";\n"
	"                  }\n"
	"                }\n"
	"\n"
	"              }\n"
	"            }\n"
	"          }\n"
	"          case mac {\n"
	"            when \"../type = \'mac\'\";\n"
	"\n"
	"            leaf mac {\n"
	"              type yang:mac-address;\n"
	"              description \"Configure MAC address to match\";\n"
	"            }\n"
	"          }\n"
	"          case any {\n"
	"            leaf any {\n"
	"              type empty;\n"
	"              description \"Match anything\";\n"
	"            }\n"
	"          }\n"
	"        }\n"
	"      }\n"
	"    }\n"
	"\n"
	"    list prefix-list {\n"
	"      key \"type name\";\n"
	"      description \"Prefix list instance\";\n"
	"      leaf type {\n"
	"        type enumeration {\n"
	"          enum ipv4 {\n"
	"            value 0;\n"
	"            description \"Internet Protocol address version 4\";\n"
	"          }\n"
	"          enum ipv6 {\n"
	"            value 1;\n"
	"            description \"Internet Protocol address version 6\";\n"
	"          }\n"
	"        }\n"
	"        description \"Prefix list type\";\n"
	"      }\n"
	"\n"
	"      leaf name {\n"
	"        type access-list-name;\n"
	"        description \"Prefix list name\";\n"
	"      }\n"
	"\n"
	"      leaf remark {\n"
	"        type string;\n"
	"        description \"Prefix list user description\";\n"
	"      }\n"
	"\n"
	"      list entry {\n"
	"        key \"sequence\";\n"
	"        description \"Prefix list entry\";\n"
	"        leaf sequence {\n"
	"          type access-list-sequence;\n"
	"          description \"Prefix list sequence value\";\n"
	"        }\n"
	"\n"
	"        leaf action {\n"
	"          type access-list-action;\n"
	"          mandatory true;\n"
	"          description \"Prefix list action on match\";\n"
	"        }\n"
	"\n"
	"        choice value {\n"
	"          mandatory true;\n"
	"          description \"Prefix list value to match\";\n"
	"\n"
	"          case ipv4-prefix {\n"
	"            leaf ipv4-prefix {\n"
	"              type inet:ipv4-prefix;\n"
	"              mandatory true;\n"
	"              description \"Configure IPv4 prefix to match\";\n"
	"            }\n"
	"\n"
	"            leaf ipv4-prefix-length-greater-or-equal {\n"
	"              type uint8 {\n"
	"                range \"0..32\";\n"
	"              }\n"
	"              description\n"
	"                \"Specifies if matching prefixes with length greater than\n"
	"                 or equal to value\";\n"
	"            }\n"
	"\n"
	"            leaf ipv4-prefix-length-lesser-or-equal {\n"
	"              type uint8 {\n"
	"                range \"0..32\";\n"
	"              }\n"
	"              description\n"
	"                \"Specifies if matching prefixes with length lesser than\n"
	"                 or equal to value\";\n"
	"            }\n"
	"          }\n"
	"          case ipv6-prefix {\n"
	"            leaf ipv6-prefix {\n"
	"              type inet:ipv6-prefix;\n"
	"              mandatory true;\n"
	"              description \"Configure IPv6 prefix to match\";\n"
	"            }\n"
	"\n"
	"            leaf ipv6-prefix-length-greater-or-equal {\n"
	"              type uint8 {\n"
	"                range \"0..128\";\n"
	"              }\n"
	"              description\n"
	"                \"Specifies if matching prefixes with length greater than\n"
	"                 or equal to value\";\n"
	"            }\n"
	"\n"
	"            leaf ipv6-prefix-length-lesser-or-equal {\n"
	"              type uint8 {\n"
	"                range \"0..128\";\n"
	"              }\n"
	"              description\n"
	"                \"Specifies if matching prefixes with length lesser than\n"
	"                 or equal to value\";\n"
	"            }\n"
	"          }\n"
	"          case any {\n"
	"            leaf any {\n"
	"              type empty;\n"
	"              description \"Match anything\";\n"
	"            }\n"
	"          }\n"
	"        }\n"
	"      }\n"
	"    }\n"
	"  }\n"
	"}\n"
	"";

static struct yang_module_embed embed = {
	.mod_name = "frr-filter",
	.mod_rev = "2019-07-04",
	.sub_mod_name = "",
	.sub_mod_rev = "",
	.data = model,
	.format = LYS_IN_YANG,
};

static void embed_register(void) __attribute__((_CONSTRUCTOR(2000)));
static void embed_register(void)
{
	yang_module_embed(&embed);
}
