/src/frr/yang/frr-bgp-bmp.yang.c
Line  | Count  | Source  | 
1  |  | /* autogenerated by embedmodel.py.  DO NOT EDIT */  | 
2  |  |  | 
3  |  | #include <zebra.h>  | 
4  |  | #include "yang.h"  | 
5  |  |  | 
6  |  | static const char model[] =  | 
7  |  |   "// SPDX-License-Identifier: BSD-2-Clause\n"  | 
8  |  |   "submodule frr-bgp-bmp {\n" | 
9  |  |   "  yang-version 1.1;\n"  | 
10  |  |   "\n"  | 
11  |  |   "  belongs-to frr-bgp {\n" | 
12  |  |   "    prefix \"bgp\";\n"  | 
13  |  |   "  }\n"  | 
14  |  |   "\n"  | 
15  |  |   "  import ietf-inet-types {\n" | 
16  |  |   "    prefix inet;\n"  | 
17  |  |   "  }\n"  | 
18  |  |   "\n"  | 
19  |  |   "  import frr-bgp-types {\n" | 
20  |  |   "    prefix frr-bt;\n"  | 
21  |  |   "  }\n"  | 
22  |  |   "\n"  | 
23  |  |   "  include \"frr-bgp-common-multiprotocol\";\n"  | 
24  |  |   "\n"  | 
25  |  |   "  organization\n"  | 
26  |  |   "    \"FRRouting\";\n"  | 
27  |  |   "  contact\n"  | 
28  |  |   "    \"FRR Users List: <mailto:frog@lists.frrouting.org> FRR Development\n"  | 
29  |  |   "     List: <mailto:dev@lists.frrouting.org>\";\n"  | 
30  |  |   "  description\n"  | 
31  |  |   "    \"This submodule defines a model for managing FRR BGP BMP.\n"  | 
32  |  |   "\n"  | 
33  |  |   "     Copyright 2020 FRRouting\n"  | 
34  |  |   "\n"  | 
35  |  |   "     Redistribution and use in source and binary forms, with or without\n"  | 
36  |  |   "     modification, are permitted provided that the following conditions\n"  | 
37  |  |   "     are met:\n"  | 
38  |  |   "\n"  | 
39  |  |   "     1. Redistributions of source code must retain the above copyright notice,\n"  | 
40  |  |   "     this list of conditions and the following disclaimer.\n"  | 
41  |  |   "\n"  | 
42  |  |   "     2. Redistributions in binary form must reproduce the above copyright\n"  | 
43  |  |   "     notice, this list of conditions and the following disclaimer in the\n"  | 
44  |  |   "     documentation and/or other materials provided with the distribution.\n"  | 
45  |  |   "\n"  | 
46  |  |   "     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"  | 
47  |  |   "     \\\"AS IS\\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n"  | 
48  |  |   "     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n"  | 
49  |  |   "     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n"  | 
50  |  |   "     HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n"  | 
51  |  |   "     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n"  | 
52  |  |   "     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n"  | 
53  |  |   "     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n"  | 
54  |  |   "     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"  | 
55  |  |   "     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"  | 
56  |  |   "     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\";\n"  | 
57  |  |   "\n"  | 
58  |  |   "  revision 2019-12-03 {\n" | 
59  |  |   "    description\n"  | 
60  |  |   "      \"Initial revision.\";\n"  | 
61  |  |   "  }\n"  | 
62  |  |   "\n"  | 
63  |  |   "  grouping bmp-incoming-session {\n" | 
64  |  |   "    container incoming-session {\n" | 
65  |  |   "      list session-list {\n" | 
66  |  |   "        key \"address tcp-port\";\n"  | 
67  |  |   "        leaf address {\n" | 
68  |  |   "          type inet:ip-address;\n"  | 
69  |  |   "          description\n"  | 
70  |  |   "            \"IPv4 address to listen on.\";\n"  | 
71  |  |   "        }\n"  | 
72  |  |   "\n"  | 
73  |  |   "        leaf tcp-port {\n" | 
74  |  |   "          type uint32;\n"  | 
75  |  |   "        }\n"  | 
76  |  |   "      }\n"  | 
77  |  |   "    }\n"  | 
78  |  |   "  }\n"  | 
79  |  |   "\n"  | 
80  |  |   "  grouping bmp-outgoing-session {\n" | 
81  |  |   "    container outgoing-session {\n" | 
82  |  |   "      list session-list {\n" | 
83  |  |   "        key \"hostname tcp-port\";\n"  | 
84  |  |   "        leaf hostname {\n" | 
85  |  |   "          type string;\n"  | 
86  |  |   "        }\n"  | 
87  |  |   "\n"  | 
88  |  |   "        leaf tcp-port {\n" | 
89  |  |   "          type uint32;\n"  | 
90  |  |   "        }\n"  | 
91  |  |   "\n"  | 
92  |  |   "        leaf min-retry-time {\n" | 
93  |  |   "          type uint32 {\n" | 
94  |  |   "            range \"100..86400000\";\n"  | 
95  |  |   "          }\n"  | 
96  |  |   "          units \"milliseconds\";\n"  | 
97  |  |   "          default \"30000\";\n"  | 
98  |  |   "          description\n"  | 
99  |  |   "            \"Minimum connection retry interval.\";\n"  | 
100  |  |   "        }\n"  | 
101  |  |   "\n"  | 
102  |  |   "        leaf max-retry-time {\n" | 
103  |  |   "          type uint32 {\n" | 
104  |  |   "            range \"100..86400000\";\n"  | 
105  |  |   "          }\n"  | 
106  |  |   "          units \"milliseconds\";\n"  | 
107  |  |   "          default \"720000\";\n"  | 
108  |  |   "          description\n"  | 
109  |  |   "            \"Maximum connection retry interval.\";\n"  | 
110  |  |   "        }\n"  | 
111  |  |   "      }\n"  | 
112  |  |   "    }\n"  | 
113  |  |   "  }\n"  | 
114  |  |   "\n"  | 
115  |  |   "  grouping bmp-afi-safis {\n" | 
116  |  |   "    container afi-safis {\n" | 
117  |  |   "      description\n"  | 
118  |  |   "        \"List of address-families associated with the BGP\n"  | 
119  |  |   "         instance.\";\n"  | 
120  |  |   "      list afi-safi {\n" | 
121  |  |   "        key \"afi-safi-name\";\n"  | 
122  |  |   "        description\n"  | 
123  |  |   "          \"AFI, SAFI configuration available for the\n"  | 
124  |  |   "           neighbour or group.\";\n"  | 
125  |  |   "        uses mp-afi-safi-config;\n"  | 
126  |  |   "\n"  | 
127  |  |   "        uses mp-all-afi-safi-list-contents;\n"  | 
128  |  |   "      }\n"  | 
129  |  |   "    }\n"  | 
130  |  |   "  }\n"  | 
131  |  |   "\n"  | 
132  |  |   "  grouping bmp-afi-safi-common-config {\n" | 
133  |  |   "    container common-config {\n" | 
134  |  |   "      leaf pre-policy {\n" | 
135  |  |   "        type boolean;\n"  | 
136  |  |   "        default \"false\";\n"  | 
137  |  |   "        description\n"  | 
138  |  |   "          \"Send state before policy and filter processing.\";\n"  | 
139  |  |   "      }\n"  | 
140  |  |   "\n"  | 
141  |  |   "      leaf post-policy {\n" | 
142  |  |   "        type boolean;\n"  | 
143  |  |   "        default \"false\";\n"  | 
144  |  |   "        description\n"  | 
145  |  |   "          \"Send state after policy and filter processing.\";\n"  | 
146  |  |   "      }\n"  | 
147  |  |   "    }\n"  | 
148  |  |   "  }\n"  | 
149  |  |   "\n"  | 
150  |  |   "  grouping global-bmp-config {\n" | 
151  |  |   "    description\n"  | 
152  |  |   "      \"Structural grouping used to include filter\n"  | 
153  |  |   "       configuration for BMP.\";\n"  | 
154  |  |   "    container bmp-config {\n" | 
155  |  |   "      description\n"  | 
156  |  |   "        \"BMP related parameters.\";\n"  | 
157  |  |   "      list target-list {\n" | 
158  |  |   "        key \"target-name\";\n"  | 
159  |  |   "        leaf target-name {\n" | 
160  |  |   "          type string;\n"  | 
161  |  |   "          description\n"  | 
162  |  |   "            \"Targets group name.\";\n"  | 
163  |  |   "        }\n"  | 
164  |  |   "\n"  | 
165  |  |   "        uses bmp-incoming-session;\n"  | 
166  |  |   "\n"  | 
167  |  |   "        uses bmp-outgoing-session;\n"  | 
168  |  |   "\n"  | 
169  |  |   "        leaf mirror {\n" | 
170  |  |   "          type boolean;\n"  | 
171  |  |   "          default \"false\";\n"  | 
172  |  |   "          description\n"  | 
173  |  |   "            \"When set to \'TRUE\' it send BMP route mirroring messages.\";\n"  | 
174  |  |   "        }\n"  | 
175  |  |   "\n"  | 
176  |  |   "        leaf stats-time {\n" | 
177  |  |   "          type uint32 {\n" | 
178  |  |   "            range \"100..86400000\";\n"  | 
179  |  |   "          }\n"  | 
180  |  |   "          units \"milliseconds\";\n"  | 
181  |  |   "          description\n"  | 
182  |  |   "            \"Interval to send BMP Stats.\";\n"  | 
183  |  |   "        }\n"  | 
184  |  |   "\n"  | 
185  |  |   "        leaf ipv4-access-list {\n" | 
186  |  |   "          type frr-bt:access-list-ref;\n"  | 
187  |  |   "          description\n"  | 
188  |  |   "            \"Access list to restrict BMP sessions.\";\n"  | 
189  |  |   "        }\n"  | 
190  |  |   "\n"  | 
191  |  |   "        leaf ipv6-access-list {\n" | 
192  |  |   "          type frr-bt:access-list-ref;\n"  | 
193  |  |   "          description\n"  | 
194  |  |   "            \"Access list to restrict BMP sessions.\";\n"  | 
195  |  |   "        }\n"  | 
196  |  |   "\n"  | 
197  |  |   "        uses bmp-afi-safis;\n"  | 
198  |  |   "      }\n"  | 
199  |  |   "\n"  | 
200  |  |   "      leaf mirror-buffer-limit {\n" | 
201  |  |   "        type uint32 {\n" | 
202  |  |   "          range \"0..4294967294\";\n"  | 
203  |  |   "        }\n"  | 
204  |  |   "        units \"bytes\";\n"  | 
205  |  |   "        description\n"  | 
206  |  |   "          \"Maximum memory used for buffered mirroring messages.\";\n"  | 
207  |  |   "      }\n"  | 
208  |  |   "    }\n"  | 
209  |  |   "  }\n"  | 
210  |  |   "}\n"  | 
211  |  |   "";  | 
212  |  |  | 
213  |  | static struct yang_module_embed embed = { | 
214  |  |   .mod_name = "frr-bgp",  | 
215  |  |   .mod_rev = "",  | 
216  |  |   .sub_mod_name = "frr-bgp-bmp",  | 
217  |  |   .sub_mod_rev = "2019-12-03",  | 
218  |  |   .data = model,  | 
219  |  |   .format = LYS_IN_YANG,  | 
220  |  | };  | 
221  |  |  | 
222  |  | static void embed_register(void) __attribute__((_CONSTRUCTOR(2000)));  | 
223  |  | static void embed_register(void)  | 
224  | 2  | { | 
225  | 2  |   yang_module_embed(&embed);  | 
226  | 2  | }  |