flow: add vnet/flow formal API
[vpp.git] / src / vnet / CMakeLists.txt
1 # Copyright (c) 2018-2020 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 add_definitions (-DWITH_LIBSSL=1)
15 include_directories(${OPENSSL_INCLUDE_DIR})
16
17 unset(VNET_SOURCES)
18 unset(VNET_HEADERS)
19 unset(VNET_API_FILES)
20 unset(VNET_MULTIARCH_SOURCES)
21
22 ##############################################################################
23 # Generic stuff
24 ##############################################################################
25 list(APPEND VNET_SOURCES
26   buffer.c
27   config.c
28   devices/devices.c
29   devices/netlink.c
30   flow/flow.c
31   flow/flow_cli.c
32   flow/flow_api.c
33   handoff.c
34   interface.c
35   interface_api.c
36   interface_cli.c
37   interface_format.c
38   interface_output.c
39   interface_stats.c
40   misc.c
41 )
42
43 list(APPEND VNET_MULTIARCH_SOURCES
44   interface_output.c
45   interface_stats.c
46   handoff.c
47 )
48
49 list(APPEND VNET_HEADERS
50   api_errno.h
51   buffer.h
52   config.h
53   devices/devices.h
54   devices/netlink.h
55   flow/flow.h
56   global_funcs.h
57   handoff.h
58   interface.h
59   interface_funcs.h
60   interface_output.h
61   ip/ip4_to_ip6.h
62   ip/ip6_to_ip4.h
63   ip/ip_types_api.h
64   l3_types.h
65   plugin/plugin.h
66   pipeline.h
67   vnet.h
68   vnet_all_api_h.h
69   vnet_msg_enum.h
70   util/radix.h
71   util/refcount.h
72   format_fns.h
73   ip/ip_format_fns.h
74   ethernet/ethernet_format_fns.h
75 )
76
77 list(APPEND VNET_API_FILES
78   interface.api
79   interface_types.api
80   ip/ip_types.api
81   flow/flow_types.api
82   flow/flow.api
83 )
84
85 ##############################################################################
86 # Policer infra
87 ##############################################################################
88 list(APPEND VNET_SOURCES
89   policer/node_funcs.c
90   policer/policer.c
91   policer/xlate.c
92   policer/policer_api.c
93 )
94
95 list(APPEND VNET_MULTIARCH_SOURCES
96   policer/node_funcs.c
97 )
98
99 list(APPEND VNET_HEADERS
100   policer/police.h
101   policer/policer.h
102   policer/xlate.h
103 )
104
105 list(APPEND VNET_API_FILES
106   policer/policer.api
107   policer/policer_types.api
108 )
109
110 ##############################################################################
111 # Binary API compatibility until vpp 20.12, see the ADL plugin...
112 ##############################################################################
113
114 list(APPEND VNET_SOURCES
115   cop/cop_api.c
116 )
117
118 list(APPEND VNET_API_FILES cop/cop.api)
119
120 ##############################################################################
121 # Layer 2 protocols go here
122 ##############################################################################
123
124 ##############################################################################
125 # Layer 2 protocol: Ethernet
126 ##############################################################################
127 list(APPEND VNET_SOURCES
128   ethernet/arp_packet.c
129   ethernet/ethernet_types_api.c
130   ethernet/format.c
131   ethernet/init.c
132   ethernet/interface.c
133   ethernet/mac_address.c
134   ethernet/node.c
135   ethernet/pg.c
136   ethernet/sfp.c
137   ethernet/p2p_ethernet.c
138   ethernet/p2p_ethernet_input.c
139   ethernet/p2p_ethernet_api.c
140 )
141
142 list(APPEND VNET_MULTIARCH_SOURCES
143   ethernet/node.c
144   ethernet/p2p_ethernet_input.c
145 )
146
147 list(APPEND VNET_HEADERS
148   ethernet/error.def
149   ethernet/ethernet.h
150   ethernet/mac_address.h
151   ethernet/packet.h
152   ethernet/types.def
153   ethernet/sfp.h
154   ethernet/p2p_ethernet.h
155   ethernet/arp_packet.h
156 )
157
158 list(APPEND VNET_API_FILES
159   ethernet/p2p_ethernet.api
160   ethernet/ethernet_types.api)
161
162 ##############################################################################
163 # Layer 2 protocol: Ethernet bridging
164 ##############################################################################
165 list(APPEND VNET_SOURCES
166   l2/feat_bitmap.c
167   l2/l2_api.c
168   l2/l2_arp_term.c
169   l2/l2_bd.c
170   l2/l2_bvi.c
171   l2/l2_bvi_node.c
172   l2/l2_input_classify.c
173   l2/l2_output_classify.c
174   l2/l2_efp_filter.c
175   l2/l2_fib.c
176   l2/l2_flood.c
177   l2/l2_fwd.c
178   l2/l2_input.c
179   l2/l2_input_vtr.c
180   l2/l2_learn.c
181   l2/l2_output.c
182   l2/l2_in_out_acl.c
183   l2/l2_in_out_feat_arc.c
184   l2/l2_patch.c
185   l2/l2_rw.c
186   l2/l2_uu_fwd.c
187   l2/l2_vtr.c
188   l2/l2_xcrw.c
189 )
190
191 list(APPEND VNET_MULTIARCH_SOURCES
192   l2/l2_bvi_node.c
193   l2/l2_fwd.c
194   l2/l2_learn.c
195   l2/l2_output.c
196   l2/l2_patch.c
197   l2/l2_in_out_feat_arc.c
198   l2/l2_input_classify.c
199   l2/l2_input.c
200   l2/l2_output_classify.c
201   l2/l2_flood.c
202   l2/l2_uu_fwd.c
203   l2/l2_efp_filter.c
204   l2/l2_rw.c
205   l2/l2_xcrw.c
206   l2/l2_in_out_acl.c
207   l2/l2_input_vtr.c
208 )
209
210 list(APPEND VNET_HEADERS
211   l2/feat_bitmap.h
212   l2/l2_input.h
213   l2/l2_output.h
214   l2/l2_vtr.h
215   l2/l2_input_vtr.h
216   l2/l2_efp_filter.h
217   l2/l2_fwd.h
218   l2/l2_bd.h
219   l2/l2_bvi.h
220   l2/l2_flood.h
221   l2/l2_fib.h
222   l2/l2_rw.h
223   l2/l2_xcrw.h
224   l2/l2_classify.h
225 )
226
227 list(APPEND VNET_API_FILES l2/l2.api)
228
229 ##############################################################################
230 # Layer 2 protocol: SRP
231 ##############################################################################
232 list(APPEND VNET_SOURCES
233   srp/format.c
234   srp/interface.c
235   srp/node.c
236   srp/pg.c
237 )
238
239 list(APPEND VNET_HEADERS
240   srp/packet.h
241   srp/srp.h
242 )
243
244 ##############################################################################
245 # Layer 2 protocol: PPP
246 ##############################################################################
247 list(APPEND VNET_SOURCES
248   ppp/node.c
249   ppp/pg.c
250   ppp/ppp.c
251 )
252
253 list(APPEND VNET_HEADERS
254   ppp/error.def
255   ppp/ppp.h
256   ppp/packet.h
257 )
258
259 ##############################################################################
260 # Layer 2 protocol: HDLC
261 ##############################################################################
262 list(APPEND VNET_SOURCES
263   hdlc/node.c
264   hdlc/pg.c
265   hdlc/hdlc.c
266 )
267
268 list(APPEND VNET_HEADERS
269   hdlc/error.def
270   hdlc/hdlc.h
271   hdlc/packet.h
272 )
273
274 ##############################################################################
275 # Layer 2 protocol: LLC
276 ##############################################################################
277 list(APPEND VNET_SOURCES
278   llc/llc.c
279   llc/node.c
280   llc/pg.c
281 )
282
283 list(APPEND VNET_HEADERS
284   llc/llc.h
285 )
286
287 ##############################################################################
288 # Layer 2 protocol: SNAP
289 ##############################################################################
290 list(APPEND VNET_SOURCES
291   snap/snap.c
292   snap/node.c
293   snap/pg.c
294 )
295
296 list(APPEND VNET_HEADERS
297   snap/snap.h
298 )
299
300 ##############################################################################
301 # Layer 2 / vxlan
302 ##############################################################################
303 list(APPEND VNET_SOURCES
304   vxlan/vxlan.c
305   vxlan/encap.c
306   vxlan/decap.c
307   vxlan/vxlan_api.c
308 )
309
310 list(APPEND VNET_MULTIARCH_SOURCES
311   vxlan/encap.c
312 )
313
314 list(APPEND VNET_HEADERS
315   vxlan/vxlan.h
316   vxlan/vxlan_packet.h
317   vxlan/vxlan_error.def
318 )
319
320 list(APPEND VNET_MULTIARCH_SOURCES vxlan/decap.c)
321
322 list(APPEND VNET_API_FILES vxlan/vxlan.api)
323
324 ##############################################################################
325 # Layer 2 / Geneve
326 ##############################################################################
327 list(APPEND VNET_SOURCES
328   geneve/geneve.c
329   geneve/encap.c
330   geneve/decap.c
331   geneve/geneve_api.c
332 )
333
334 list(APPEND VNET_MULTIARCH_SOURCES
335   geneve/encap.c
336   geneve/decap.c
337 )
338
339 list(APPEND VNET_HEADERS
340   geneve/geneve.h
341   geneve/geneve_packet.h
342   geneve/geneve_error.def
343 )
344
345 list(APPEND VNET_API_FILES geneve/geneve.api)
346
347 ##############################################################################
348 # Layer 2 / Bonding
349 ##############################################################################
350 list(APPEND VNET_SOURCES
351   bonding/cli.c
352   bonding/node.c
353   bonding/device.c
354   bonding/bond_api.c
355 )
356
357 list(APPEND VNET_HEADERS
358   bonding/node.h
359 )
360
361 list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
362 list(APPEND VNET_API_FILES bonding/bond.api)
363
364 ##############################################################################
365 # Layer 2 / LLDP
366 ##############################################################################
367 list(APPEND VNET_SOURCES
368   lldp/lldp_input.c
369   lldp/lldp_node.c
370   lldp/lldp_output.c
371   lldp/lldp_cli.c
372   lldp/lldp_api.c
373 )
374
375 list(APPEND VNET_HEADERS
376   lldp/lldp_protocol.h
377   lldp/lldp.h
378 )
379
380 list(APPEND VNET_API_FILES lldp/lldp.api)
381
382 ##############################################################################
383 # Layer 2/3 "classify"
384 ##############################################################################
385 list(APPEND VNET_SOURCES
386   classify/vnet_classify.c
387   classify/trace_classify.h
388   classify/ip_classify.c
389   classify/in_out_acl.c
390   classify/policer_classify.c
391   classify/flow_classify.c
392   classify/flow_classify_node.c
393   classify/vnet_classify.h
394   classify/classify_api.c
395 )
396
397 list(APPEND VNET_MULTIARCH_SOURCES
398   classify/ip_classify.c
399   classify/flow_classify_node.c
400 )
401
402 list(APPEND VNET_HEADERS
403   classify/vnet_classify.h
404   classify/trace_classify.h
405   classify/in_out_acl.h
406   classify/policer_classify.h
407   classify/flow_classify.h
408 )
409
410 list(APPEND VNET_API_FILES classify/classify.api)
411
412 ##############################################################################
413 # Layer 3 protocols go here
414 ##############################################################################
415
416 ##############################################################################
417 # Layer 3 protocol: IP v4/v6
418 ##############################################################################
419 list(APPEND VNET_SOURCES
420   ip/format.c
421   ip/icmp4.c
422   ip/icmp6.c
423   ip/ip46_cli.c
424   ip/ip_types_api.c
425   ip/ip46_address.c
426   ip/ip4_format.c
427   ip/ip4_forward.c
428   ip/ip4_punt_drop.c
429   ip/ip4_input.c
430   ip/ip4_options.c
431   ip/ip4_mtrie.c
432   ip/ip4_pg.c
433   ip/ip4_source_and_port_range_check.c
434   ip/reass/ip4_full_reass.c
435   ip/reass/ip4_sv_reass.c
436   ip/ip6_format.c
437   ip/ip6_forward.c
438   ip/ip6_ll_table.c
439   ip/ip6_ll_types.c
440   ip/ip6_punt_drop.c
441   ip/ip6_hop_by_hop.c
442   ip/ip6_input.c
443   ip/ip6_link.c
444   ip/ip6_pg.c
445   ip/reass/ip6_full_reass.c
446   ip/reass/ip6_sv_reass.c
447   ip/ip_api.c
448   ip/ip_checksum.c
449   ip/ip_frag.c
450   ip/ip.c
451   ip/ip_interface.c
452   ip/ip_init.c
453   ip/ip_in_out_acl.c
454   ip/ip_punt_drop.c
455   ip/ip_types.c
456   ip/lookup.c
457   ip/punt_api.c
458   ip/punt.c
459   ip/punt_node.c
460   ip/vtep.c
461 )
462
463 list(APPEND VNET_MULTIARCH_SOURCES
464   ip/ip4_punt_drop.c
465   ip/reass/ip4_full_reass.c
466   ip/ip6_hop_by_hop.c
467   ip/reass/ip6_full_reass.c
468   ip/reass/ip4_sv_reass.c
469   ip/ip6_hop_by_hop.c
470   ip/reass/ip6_full_reass.c
471   ip/reass/ip6_sv_reass.c
472   ip/ip6_input.c
473   ip/ip6_punt_drop.c
474   ip/punt_node.c
475   ip/ip_in_out_acl.c
476 )
477
478 list(APPEND VNET_HEADERS
479   ip/format.h
480   ip/icmp46_packet.h
481   ip/icmp4.h
482   ip/icmp6.h
483   ip/igmp_packet.h
484   ip/ip4_error.h
485   ip/ip4.h
486   ip/ip4_mtrie.h
487   ip/ip4_packet.h
488   ip/ip46_address.h
489   ip/ip6_error.h
490   ip/ip6.h
491   ip/ip6_hop_by_hop.h
492   ip/ip6_hop_by_hop_packet.h
493   ip/ip6_packet.h
494   ip/ip.h
495   ip/ip_table.h
496   ip/ip_interface.h
497   ip/ip_packet.h
498   ip/ip_source_and_port_range_check.h
499   ip/ip_types.h
500   ip/lookup.h
501   ip/ports.def
502   ip/protocols.def
503   ip/punt_error.def
504   ip/punt.h
505 )
506
507 list(APPEND VNET_API_FILES
508   ip/ip.api
509   ip/punt.api
510 )
511
512 list(APPEND VNET_MULTIARCH_SOURCES
513   ip/ip4_forward.c
514   ip/ip6_forward.c
515   ip/ip4_input.c
516 )
517
518 ##############################################################################
519 # Layer 3 neighbours
520 ##############################################################################
521 list(APPEND VNET_SOURCES
522   ip-neighbor/ip_neighbor.c
523   ip-neighbor/ip_neighbor_api.c
524   ip-neighbor/ip_neighbor_dp.c
525   ip-neighbor/ip_neighbor_types.c
526   ip-neighbor/ip_neighbor_watch.c
527   ip-neighbor/ip4_neighbor.c
528   ip-neighbor/ip6_neighbor.c
529 )
530
531 list(APPEND VNET_HEADERS
532   ip-neighbor/ip_neighbor.h
533   ip-neighbor/ip_neighbor_types.h
534 )
535
536 list(APPEND VNET_API_FILES
537   ip-neighbor/ip_neighbor.api
538 )
539
540 ##############################################################################
541 # Bidirectional Forwarding Detection
542 ##############################################################################
543
544 list(APPEND VNET_HEADERS
545   bfd/bfd_protocol.h
546   bfd/bfd_main.h
547   bfd/bfd_api.h
548   bfd/bfd_udp.h
549 )
550
551 list(APPEND VNET_SOURCES
552   bfd/bfd_api.h
553   bfd/bfd_udp.c
554   bfd/bfd_main.c
555   bfd/bfd_protocol.c
556   bfd/bfd_cli.c
557   bfd/bfd_api.c
558 )
559
560 list(APPEND VNET_API_FILES bfd/bfd.api)
561
562 ##############################################################################
563 # Crypto
564 ##############################################################################
565
566 list(APPEND VNET_SOURCES
567   crypto/cli.c
568   crypto/crypto.c
569   crypto/format.c
570   crypto/node.c
571 )
572
573 list(APPEND VNET_HEADERS
574   crypto/crypto.h
575 )
576
577 list(APPEND VNET_MULTIARCH_SOURCES crypto/node.c)
578
579 ##############################################################################
580 # Layer 3 protocol: IPSec
581 ##############################################################################
582 list(APPEND VNET_SOURCES
583   ipsec/ipsec.c
584   ipsec/ipsec_cli.c
585   ipsec/ipsec_format.c
586   ipsec/ipsec_handoff.c
587   ipsec/ipsec_input.c
588   ipsec/ipsec_itf.c
589   ipsec/ipsec_punt.c
590   ipsec/ipsec_sa.c
591   ipsec/ipsec_spd.c
592   ipsec/ipsec_spd_policy.c
593   ipsec/ipsec_tun.c
594   ipsec/ipsec_tun_in.c
595   ipsec/esp_format.c
596   ipsec/esp_encrypt.c
597   ipsec/esp_decrypt.c
598   ipsec/ah_decrypt.c
599   ipsec/ah_encrypt.c
600   ipsec/ipsec_api.c
601   ipsec/ipsec_types_api.c
602 )
603
604 list(APPEND VNET_MULTIARCH_SOURCES
605   ipsec/esp_encrypt.c
606   ipsec/esp_decrypt.c
607   ipsec/ah_decrypt.c
608   ipsec/ah_encrypt.c
609   ipsec/ipsec_handoff.c
610   ipsec/ipsec_output.c
611   ipsec/ipsec_input.c
612   ipsec/ipsec_tun_in.c
613 )
614
615 list(APPEND VNET_API_FILES ipsec/ipsec_types.api)
616 list(APPEND VNET_API_FILES ipsec/ipsec.api)
617
618 list(APPEND VNET_SOURCES
619   ipsec/ipsec_output.c
620 )
621
622 list(APPEND VNET_HEADERS
623   ipsec/ipsec.h
624   ipsec/ipsec_spd.h
625   ipsec/ipsec_spd_policy.h
626   ipsec/ipsec_sa.h
627   ipsec/ipsec_tun.h
628   ipsec/ipsec_types_api.h
629   ipsec/ipsec_punt.h
630   ipsec/esp.h
631   ipsec/ah.h
632 )
633
634 ##############################################################################
635 # Layer 3 protocol: osi
636 ##############################################################################
637 list(APPEND VNET_SOURCES
638   osi/node.c
639   osi/osi.c
640   osi/pg.c
641 )
642
643 list(APPEND VNET_HEADERS
644   osi/osi.h
645 )
646
647 ##############################################################################
648 # Layer 4 protocol: tcp
649 ##############################################################################
650 list(APPEND VNET_SOURCES
651   tcp/tcp_api.c
652   tcp/tcp_format.c
653   tcp/tcp_pg.c
654   tcp/tcp_syn_filter4.c
655   tcp/tcp_output.c
656   tcp/tcp_input.c
657   tcp/tcp_newreno.c
658   tcp/tcp_bt.c
659   tcp/tcp_cli.c
660   tcp/tcp_cubic.c
661   tcp/tcp_debug.c
662   tcp/tcp_sack.c
663   tcp/tcp.c
664 )
665
666 list(APPEND VNET_MULTIARCH_SOURCES
667   tcp/tcp_input.c
668   tcp/tcp_output.c
669   tcp/tcp_syn_filter4.c
670 )
671
672 list(APPEND VNET_HEADERS
673   tcp/tcp_packet.h
674   tcp/tcp_timer.h
675   tcp/tcp_bt.h
676   tcp/tcp_cc.h
677   tcp/tcp_debug.h
678   tcp/tcp_inlines.h
679   tcp/tcp_sack.h
680   tcp/tcp_types.h
681   tcp/tcp.h
682   tcp/tcp_error.def
683 )
684
685 list(APPEND VNET_API_FILES tcp/tcp.api)
686
687 ##############################################################################
688 # Layer 4 protocol: udp
689 ##############################################################################
690 list(APPEND VNET_SOURCES
691   udp/udp.c
692   udp/udp_cli.c
693   udp/udp_input.c
694   udp/udp_format.c
695   udp/udp_local.c
696   udp/udp_pg.c
697   udp/udp_encap_node.c
698   udp/udp_encap.c
699   udp/udp_api.c
700 )
701
702 list(APPEND VNET_MULTIARCH_SOURCES
703   udp/udp_local.c
704   udp/udp_encap_node.c
705 )
706
707 list(APPEND VNET_HEADERS
708   udp/udp_error.def
709   udp/udp.h
710   udp/udp_packet.h
711 )
712
713 list(APPEND VNET_API_FILES udp/udp.api)
714
715 ##############################################################################
716 # Tunnel protocol: gre
717 ##############################################################################
718 list(APPEND VNET_SOURCES
719   gre/gre.c
720   gre/node.c
721   gre/interface.c
722   gre/pg.c
723   gre/gre_api.c
724 )
725
726 list(APPEND VNET_MULTIARCH_SOURCES
727   gre/node.c
728   gre/gre.c
729 )
730
731 list(APPEND VNET_HEADERS
732   gre/gre.h
733   gre/packet.h
734   gre/error.def
735 )
736
737 list(APPEND VNET_API_FILES gre/gre.api)
738
739 ##############################################################################
740 # Tunnel protocol: ipip
741 ##############################################################################
742 list(APPEND VNET_SOURCES
743   ipip/ipip.c
744   ipip/node.c
745   ipip/sixrd.c
746   ipip/ipip_api.c
747   ipip/ipip_cli.c
748 )
749
750 list(APPEND VNET_MULTIARCH_SOURCES
751   ipip/node.c
752 )
753
754 list(APPEND VNET_HEADERS
755   ipip/ipip.h
756 )
757
758 list(APPEND VNET_API_FILES
759   ipip/ipip.api
760 )
761
762 ##############################################################################
763 # Tunnel infra
764 ##############################################################################
765 list(APPEND VNET_SOURCES
766   tunnel/tunnel.c
767   tunnel/tunnel_types_api.c
768 )
769
770 list(APPEND VNET_API_FILES
771   tunnel/tunnel_types.api
772 )
773
774 list(APPEND VNET_HEADERS
775   tunnel/tunnel.h
776   tunnel/tunnel_dp.h
777 )
778
779 ##############################################################################
780 # Tunnel protocol: l2tpv3
781 ##############################################################################
782 list(APPEND VNET_SOURCES
783   l2tp/l2tp.c
784   l2tp/encap.c
785   l2tp/decap.c
786   l2tp/pg.c
787   l2tp/l2tp_api.c
788 )
789
790 list(APPEND VNET_MULTIARCH_SOURCES
791   l2tp/encap.c
792   l2tp/decap.c
793 )
794
795 list(APPEND VNET_HEADERS
796   l2tp/l2tp.h
797   l2tp/packet.h
798 )
799
800 list(APPEND VNET_API_FILES l2tp/l2tp.api)
801
802 ##############################################################################
803 # Tunnel protocol: gre+mpls
804 ##############################################################################
805 list(APPEND VNET_SOURCES
806   mpls/mpls.c
807   mpls/mpls_lookup.c
808   mpls/mpls_output.c
809   mpls/mpls_features.c
810   mpls/mpls_input.c
811   mpls/interface.c
812   mpls/mpls_tunnel.c
813   mpls/pg.c
814   mpls/mpls_api.c
815 )
816
817 list(APPEND VNET_MULTIARCH_SOURCES
818   mpls/mpls_output.c
819   mpls/mpls_input.c
820   mpls/mpls_lookup.c
821   mpls/mpls_features.c
822 )
823
824 list(APPEND VNET_HEADERS
825   mpls/mpls.h
826   mpls/mpls_types.h
827   mpls/mpls_tunnel.h
828   mpls/packet.h
829   mpls/error.def
830 )
831
832 list(APPEND VNET_API_FILES mpls/mpls.api)
833
834 ##############################################################################
835 # Tunnel protocol: vxlan-gbp
836 ##############################################################################
837 list(APPEND VNET_SOURCES
838   vxlan-gbp/decap.c
839   vxlan-gbp/encap.c
840   vxlan-gbp/vxlan_gbp_api.c
841   vxlan-gbp/vxlan_gbp.c
842   vxlan-gbp/vxlan_gbp_packet.c
843 )
844
845 list (APPEND VNET_MULTIARCH_SOURCES
846   vxlan-gbp/decap.c
847   vxlan-gbp/encap.c
848 )
849
850 list(APPEND VNET_HEADERS
851   vxlan-gbp/vxlan_gbp.h
852   vxlan-gbp/vxlan_gbp_packet.h
853   vxlan-gbp/vxlan_gbp_error.def
854 )
855
856 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
857
858 ##############################################################################
859 # Tunnel protocol: vxlan-gpe
860 ##############################################################################
861
862 list(APPEND VNET_SOURCES
863   vxlan-gpe/vxlan_gpe.c
864   vxlan-gpe/encap.c
865   vxlan-gpe/decap.c
866   vxlan-gpe/vxlan_gpe_api.c
867 )
868
869 list (APPEND VNET_MULTIARCH_SOURCES
870   vxlan-gpe/decap.c
871 )
872
873 list(APPEND VNET_HEADERS
874   vxlan-gpe/vxlan_gpe.h
875   vxlan-gpe/vxlan_gpe_packet.h
876   vxlan-gpe/vxlan_gpe_error.def
877 )
878
879 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
880
881 ##############################################################################
882 # LISP control plane: lisp-cp
883 ##############################################################################
884
885 list(APPEND VNET_SOURCES
886   lisp-cp/lisp_types.c
887   lisp-cp/lisp_cp_dpo.c
888   lisp-cp/control.c
889   lisp-cp/gid_dictionary.c
890   lisp-cp/lisp_msg_serdes.c
891   lisp-cp/packets.c
892   lisp-cp/one_cli.c
893   lisp-cp/lisp_cli.c
894   lisp-cp/one_api.c
895   lisp-cp/lisp_api.c
896   lisp-cp/lisp_types_api.c
897 )
898
899 list(APPEND VNET_HEADERS
900   lisp-cp/lisp_types.h
901   lisp-cp/packets.h
902   lisp-cp/gid_dictionary.h
903   lisp-cp/lisp_cp_messages.h
904   lisp-cp/lisp_msg_serdes.h
905   lisp-cp/control.h
906   lisp-cp/lisp_types_api.h
907 )
908
909 list(APPEND VNET_API_FILES lisp-cp/lisp_types.api)
910 list(APPEND VNET_API_FILES lisp-cp/lisp.api)
911 list(APPEND VNET_API_FILES lisp-cp/one.api)
912
913 ##############################################################################
914 # Tunnel protocol: lisp-gpe
915 ##############################################################################
916
917 list(APPEND VNET_SOURCES
918   lisp-gpe/lisp_gpe.c
919   lisp-gpe/lisp_gpe_sub_interface.c
920   lisp-gpe/lisp_gpe_adjacency.c
921   lisp-gpe/lisp_gpe_tunnel.c
922   lisp-gpe/lisp_gpe_fwd_entry.c
923   lisp-gpe/lisp_gpe_tenant.c
924   lisp-gpe/interface.c
925   lisp-gpe/decap.c
926   lisp-gpe/lisp_gpe_api.c
927 )
928
929 list(APPEND VNET_HEADERS
930   lisp-gpe/lisp_gpe.h
931   lisp-gpe/lisp_gpe_fwd_entry.h
932   lisp-gpe/lisp_gpe_tenant.h
933   lisp-gpe/lisp_gpe_packet.h
934   lisp-gpe/lisp_gpe_error.def
935 )
936
937 list(APPEND VNET_API_FILES lisp-gpe/lisp_gpe.api)
938
939 ##############################################################################
940 # ipv6 segment routing
941 ##############################################################################
942
943 list(APPEND VNET_SOURCES
944   srv6/sr.c
945   srv6/sr_localsid.c
946   srv6/sr_policy_rewrite.c
947   srv6/sr_steering.c
948   srv6/sr_api.c
949 )
950
951 list(APPEND VNET_HEADERS
952   srv6/sr_packet.h
953   srv6/sr.h
954 )
955
956 list(APPEND VNET_API_FILES
957   srv6/sr.api
958   srv6/sr_types.api
959 )
960
961 ##############################################################################
962 # mpls segment routing
963 ##############################################################################
964
965 list(APPEND VNET_SOURCES
966   srmpls/sr_mpls_policy.c
967   srmpls/sr_mpls_steering.c
968   srmpls/sr_mpls_api.c
969 )
970
971 list(APPEND VNET_HEADERS
972   srmpls/sr_mpls.h
973 )
974
975 list(APPEND VNET_API_FILES
976   srmpls/sr_mpls.api
977   srv6/sr_types.api
978 )
979
980 ##############################################################################
981 # IPFIX / netflow v10
982 ##############################################################################
983 list(APPEND VNET_SOURCES
984   ipfix-export/flow_report.c
985   ipfix-export/flow_api.c
986 )
987
988 list(APPEND VNET_HEADERS
989   ipfix-export/flow_report.h
990   ipfix-export/ipfix_info_elements.h
991   ipfix-export/ipfix_packet.h
992 )
993
994 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
995
996 ##############################################################################
997 # GSO
998 ##############################################################################
999 list(APPEND VNET_SOURCES
1000   gso/cli.c
1001   gso/gso.c
1002   gso/gso_api.c
1003   gso/node.c
1004 )
1005
1006 list(APPEND VNET_HEADERS
1007   gso/gro.h
1008   gso/gro_func.h
1009   gso/hdr_offset_parser.h
1010   gso/gso.h
1011 )
1012
1013 list(APPEND VNET_API_FILES
1014   gso/gso.api
1015 )
1016
1017 ##############################################################################
1018 # IPFIX classify code
1019 ##############################################################################
1020
1021 list(APPEND VNET_SOURCES
1022   ipfix-export/flow_report_classify.c
1023 )
1024
1025 list(APPEND VNET_HEADERS
1026   ipfix-export/flow_report_classify.h
1027 )
1028
1029 ##############################################################################
1030 # lawful intercept
1031 ##############################################################################
1032
1033 list(APPEND VNET_SOURCES
1034   lawful-intercept/lawful_intercept.c
1035   lawful-intercept/node.c
1036 )
1037
1038 list(APPEND VNET_MULTIARCH_SOURCES
1039   lawful-intercept/node.c
1040 )
1041
1042 list(APPEND VNET_HEADERS
1043   lawful-intercept/lawful_intercept.h
1044 )
1045
1046 ##############################################################################
1047 # SPAN (port mirroring)
1048 ##############################################################################
1049
1050 list(APPEND VNET_SOURCES
1051   span/span_api.c
1052   span/span.c
1053   span/node.c
1054 )
1055
1056 list(APPEND VNET_MULTIARCH_SOURCES
1057   span/node.c
1058 )
1059
1060 list(APPEND VNET_HEADERS
1061   span/span.h
1062 )
1063
1064 list(APPEND VNET_API_FILES span/span.api)
1065
1066 ##############################################################################
1067 # Packet generator
1068 ##############################################################################
1069
1070 list(APPEND VNET_SOURCES
1071   pg/cli.c
1072   pg/edit.c
1073   pg/init.c
1074   pg/input.c
1075   pg/output.c
1076   pg/stream.c
1077   pg/pg_api.c
1078 )
1079
1080 list(APPEND VNET_HEADERS
1081   pg/pg.h
1082   pg/edit.h
1083 )
1084
1085 list(APPEND VNET_API_FILES pg/pg.api)
1086
1087 ##############################################################################
1088 # virtio
1089 ##############################################################################
1090
1091 list(APPEND VNET_SOURCES
1092   devices/virtio/cli.c
1093   devices/virtio/device.c
1094   devices/virtio/format.c
1095   devices/virtio/node.c
1096   devices/virtio/pci.c
1097   devices/virtio/vhost_user.c
1098   devices/virtio/vhost_user_input.c
1099   devices/virtio/vhost_user_output.c
1100   devices/virtio/vhost_user_api.c
1101   devices/virtio/virtio.c
1102   devices/virtio/virtio_api.c
1103   devices/virtio/virtio_pci_legacy.c
1104   devices/virtio/virtio_pci_modern.c
1105   devices/virtio/virtio_types_api.c
1106 )
1107
1108 list(APPEND VNET_HEADERS
1109   devices/virtio/pci.h
1110   devices/virtio/virtio.h
1111   devices/virtio/virtio_pci_legacy.h
1112   devices/virtio/virtio_pci_modern.h
1113   devices/virtio/vhost_user.h
1114   devices/virtio/virtio_types_api.h
1115 )
1116
1117 list(APPEND VNET_MULTIARCH_SOURCES
1118   devices/virtio/vhost_user_input.c
1119   devices/virtio/vhost_user_output.c
1120   devices/virtio/node.c
1121   devices/af_packet/node.c
1122   devices/virtio/device.c
1123 )
1124
1125 list(APPEND VNET_API_FILES
1126   devices/virtio/vhost_user.api
1127   devices/virtio/virtio.api
1128   devices/virtio/virtio_types.api
1129 )
1130
1131 ##############################################################################
1132 # tap interface (with virtio backend)
1133 ##############################################################################
1134
1135 list(APPEND VNET_SOURCES
1136   devices/tap/cli.c
1137   devices/tap/tap.c
1138   devices/tap/tapv2_api.c
1139 )
1140
1141 list(APPEND VNET_HEADERS
1142   devices/tap/tap.h
1143 )
1144
1145 list(APPEND VNET_API_FILES devices/tap/tapv2.api)
1146
1147 ##############################################################################
1148 # tap interface (with virtio backend)
1149 ##############################################################################
1150
1151 list(APPEND VNET_SOURCES
1152   devices/pipe/pipe_api.c
1153   devices/pipe/pipe.c
1154 )
1155
1156 list(APPEND VNET_HEADERS
1157   devices/pipe/pipe.h
1158 )
1159
1160 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1161
1162 ##############################################################################
1163 # session managmeent
1164 ##############################################################################
1165
1166 list(APPEND VNET_SOURCES
1167   session/session.c
1168   session/session_debug.c
1169   session/session_table.c
1170   session/session_rules_table.c
1171   session/session_lookup.c
1172   session/session_node.c
1173   session/transport.c
1174   session/application.c
1175   session/application_worker.c
1176   session/session_cli.c
1177   session/application_interface.c
1178   session/application_local.c
1179   session/application_namespace.c
1180   session/segment_manager.c
1181   session/session_api.c
1182 )
1183
1184 list(APPEND VNET_HEADERS
1185   session/session.h
1186   session/session_table.h
1187   session/session_rules_table.h
1188   session/session_types.h
1189   session/session_lookup.h
1190   session/application.h
1191   session/transport.h
1192   session/transport_types.h
1193   session/application_interface.h
1194   session/application_local.h
1195   session/application_namespace.h
1196   session/session_debug.h
1197   session/segment_manager.h
1198   session/mma_template.h
1199   session/mma_template.c
1200   session/mma_16.h
1201   session/mma_40.h
1202 )
1203
1204 list(APPEND VNET_API_FILES session/session.api)
1205
1206 ##############################################################################
1207 # TLS protocol
1208 ##############################################################################
1209
1210 list(APPEND VNET_SOURCES
1211   tls/tls.c
1212 )
1213
1214 list(APPEND VNET_HEADERS
1215   tls/tls.h
1216   tls/tls_test.h
1217 )
1218
1219 ##############################################################################
1220 # Linux packet interface
1221 ##############################################################################
1222
1223 list(APPEND VNET_SOURCES
1224   devices/af_packet/af_packet.c
1225   devices/af_packet/device.c
1226   devices/af_packet/node.c
1227   devices/af_packet/cli.c
1228   devices/af_packet/af_packet_api.c
1229 )
1230
1231 list(APPEND VNET_MULTIARCH_SOURCES
1232   devices/af_packet/device.c
1233 )
1234
1235 list(APPEND VNET_HEADERS
1236   devices/af_packet/af_packet.h
1237 )
1238
1239 list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
1240
1241 ##############################################################################
1242 # Driver feature graph arc support
1243 ##############################################################################
1244
1245 list(APPEND VNET_SOURCES
1246   feature/feature.c
1247   feature/feature_api.c
1248   feature/registration.c
1249 )
1250
1251 list(APPEND VNET_HEADERS
1252   feature/feature.h
1253 )
1254
1255 list(APPEND VNET_API_FILES feature/feature.api)
1256
1257 ##############################################################################
1258 # Unix kernel related
1259 ##############################################################################
1260
1261 # FIXME: unix/hgshm.c
1262
1263 list(APPEND VNET_SOURCES
1264   unix/gdb_funcs.c
1265   unix/tuntap.c
1266 )
1267
1268 list(APPEND VNET_HEADERS
1269   unix/tuntap.h
1270 )
1271
1272 ##############################################################################
1273 # FIB
1274 ##############################################################################
1275
1276 list(APPEND VNET_SOURCES
1277   fib/fib.c
1278   fib/ip4_fib.c
1279   fib/ip6_fib.c
1280   fib/mpls_fib.c
1281   fib/fib_table.c
1282   fib/fib_walk.c
1283   fib/fib_types.c
1284   fib/fib_node.c
1285   fib/fib_node_list.c
1286   fib/fib_entry.c
1287   fib/fib_entry_src.c
1288   fib/fib_entry_src_adj.c
1289   fib/fib_entry_src_api.c
1290   fib/fib_entry_src_drop.c
1291   fib/fib_entry_src_interface.c
1292   fib/fib_entry_src_interpose.c
1293   fib/fib_entry_src_lisp.c
1294   fib/fib_entry_src_mpls.c
1295   fib/fib_entry_src_simple.c
1296   fib/fib_entry_src_rr.c
1297   fib/fib_entry_cover.c
1298   fib/fib_entry_delegate.c
1299   fib/fib_entry_track.c
1300   fib/fib_path_list.c
1301   fib/fib_path.c
1302   fib/fib_path_ext.c
1303   fib/fib_source.c
1304   fib/fib_urpf_list.c
1305   fib/fib_attached_export.c
1306   fib/fib_api.c
1307   fib/fib_bfd.c
1308 )
1309
1310 list(APPEND VNET_HEADERS
1311   fib/fib.h
1312   fib/fib_api.h
1313   fib/ip4_fib.h
1314   fib/ip6_fib.h
1315   fib/fib_types.h
1316   fib/fib_table.h
1317   fib/fib_node.h
1318   fib/fib_node_list.h
1319   fib/fib_entry.h
1320   fib/fib_entry_delegate.h
1321   fib/fib_source.h
1322 )
1323
1324 list(APPEND VNET_API_FILES fib/fib_types.api)
1325
1326 ##############################################################################
1327 # ADJ
1328 ##############################################################################
1329
1330 list(APPEND VNET_SOURCES
1331   adj/adj_nbr.c
1332   adj/adj_glean.c
1333   adj/adj_midchain.c
1334   adj/adj_midchain_delegate.c
1335   adj/adj_mcast.c
1336   adj/adj_l2.c
1337   adj/adj_nsh.c
1338   adj/adj.c
1339   adj/rewrite.c
1340   adj/adj_bfd.c
1341   adj/adj_delegate.c
1342 )
1343
1344 list(APPEND VNET_MULTIARCH_SOURCES
1345   adj/adj_nsh.c
1346   adj/adj_l2.c
1347   adj/adj_midchain.c
1348 )
1349
1350 list(APPEND VNET_HEADERS
1351   adj/adj.h
1352   adj/adj_types.h
1353   adj/adj_glean.h
1354   adj/adj_nsh.h
1355   adj/adj_nbr.h
1356   adj/adj_midchain.h
1357   adj/rewrite.h
1358 )
1359
1360 ##############################################################################
1361 # Data-Plane Objects
1362 ##############################################################################
1363
1364 list(APPEND VNET_SOURCES
1365   dpo/dpo.c
1366   dpo/drop_dpo.c
1367   dpo/ip_null_dpo.c
1368   dpo/ip6_ll_dpo.c
1369   dpo/punt_dpo.c
1370   dpo/receive_dpo.c
1371   dpo/load_balance.c
1372   dpo/load_balance_map.c
1373   dpo/lookup_dpo.c
1374   dpo/classify_dpo.c
1375   dpo/replicate_dpo.c
1376   dpo/interface_rx_dpo.c
1377   dpo/interface_tx_dpo.c
1378   dpo/mpls_disposition.c
1379   dpo/mpls_label_dpo.c
1380   dpo/l3_proxy_dpo.c
1381   dpo/dvr_dpo.c
1382   dpo/pw_cw.c
1383 )
1384
1385 list(APPEND VNET_MULTIARCH_SOURCES
1386   dpo/lookup_dpo.h
1387   dpo/mpls_disposition.c
1388   dpo/dvr_dpo.c
1389   dpo/mpls_label_dpo.c
1390   dpo/interface_rx_dpo.c
1391 )
1392
1393 list(APPEND VNET_HEADERS
1394   dpo/load_balance.h
1395   dpo/drop_dpo.h
1396   dpo/lookup_dpo.h
1397   dpo/punt_dpo.h
1398   dpo/classify_dpo.h
1399   dpo/receive_dpo.h
1400   dpo/ip_null_dpo.h
1401   dpo/replicate_dpo.h
1402   dpo/dpo.h
1403 )
1404
1405 ##############################################################################
1406 # Multicast FIB
1407 ##############################################################################
1408
1409 list(APPEND VNET_SOURCES
1410   mfib/mfib_forward.c
1411   mfib/ip4_mfib.c
1412   mfib/ip6_mfib.c
1413   mfib/mfib_api.c
1414   mfib/mfib_types.c
1415   mfib/mfib_signal.c
1416   mfib/mfib_itf.c
1417   mfib/mfib_entry.c
1418   mfib/mfib_entry.c
1419   mfib/mfib_entry_cover.c
1420   mfib/mfib_entry_delegate.c
1421   mfib/mfib_entry_src.c
1422   mfib/mfib_entry_src_rr.c
1423   mfib/mfib_table.c
1424 )
1425
1426 list(APPEND VNET_MULTIARCH_SOURCES
1427   mfib/mfib_forward.c
1428 )
1429
1430 list(APPEND VNET_HEADERS
1431   mfib/ip4_mfib.h
1432   mfib/mfib_types.h
1433   mfib/mfib_table.h
1434 )
1435
1436 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1437
1438 ##############################################################################
1439 # Utilities
1440 ##############################################################################
1441
1442 list(APPEND VNET_SOURCES
1443   util/radix.c
1444   util/refcount.c
1445   util/throttle.c
1446   util/trajectory.c
1447 )
1448
1449 list(APPEND VNET_HEADERS
1450   util/throttle.h
1451 )
1452
1453 ##############################################################################
1454 # QoS
1455 ##############################################################################
1456
1457 list(APPEND VNET_SOURCES
1458   qos/qos_types.c
1459   qos/qos_api.c
1460   qos/qos_egress_map.c
1461   qos/qos_record.c
1462   qos/qos_record_node.c
1463   qos/qos_store.c
1464   qos/qos_store_node.c
1465   qos/qos_mark.c
1466   qos/qos_mark_node.c
1467 )
1468
1469 list(APPEND VNET_MULTIARCH_SOURCES
1470   qos/qos_record_node.c
1471   qos/qos_mark_node.c
1472 )
1473
1474 list(APPEND VNET_API_FILES qos/qos.api)
1475
1476 ##############################################################################
1477 # BIER
1478 ##############################################################################
1479
1480 list(APPEND VNET_SOURCES
1481   bier/bier_bit_string.c
1482   bier/bier_entry.c
1483   bier/bier_fmask.c
1484   bier/bier_fmask_db.c
1485   bier/bier_input.c
1486   bier/bier_lookup.c
1487   bier/bier_output.c
1488   bier/bier_table.c
1489   bier/bier_types.c
1490   bier/bier_api.c
1491   bier/bier_drop.c
1492   bier/bier_update.c
1493   bier/bier_imp_node.c
1494   bier/bier_imp.c
1495   bier/bier_disp_entry.c
1496   bier/bier_disp_lookup_node.c
1497   bier/bier_disp_dispatch_node.c
1498   bier/bier_disp_table.c
1499   bier/bier_bift_table.c
1500 )
1501
1502 list(APPEND VNET_MULTIARCH_SOURCES
1503   bier/bier_disp_dispatch_node.c
1504   bier/bier_disp_lookup_node.c
1505   bier/bier_imp_node.c
1506 )
1507
1508 list(APPEND VNET_HEADERS
1509   bier/bier_types.h
1510   bier/bier_entry.h
1511   bier/bier_update.h
1512   bier/bier_table.h
1513 )
1514
1515 list(APPEND VNET_API_FILES bier/bier.api)
1516
1517 ##############################################################################
1518 # SYSLOG
1519 ##############################################################################
1520
1521 list (APPEND VNET_SOURCES
1522   syslog/syslog_api.c
1523   syslog/syslog_udp.c
1524   syslog/syslog.c
1525 )
1526
1527 list(APPEND VNET_HEADERS
1528   syslog/syslog_udp.h
1529   syslog/syslog.h
1530 )
1531
1532 list(APPEND VNET_API_FILES syslog/syslog.api)
1533
1534 ##############################################################################
1535 # Tunnel Endpoint Information Base
1536 ##############################################################################
1537
1538 list (APPEND VNET_SOURCES
1539   teib/teib_api.c
1540   teib/teib_cli.c
1541   teib/teib.c
1542 )
1543
1544 list(APPEND VNET_HEADERS
1545   teib/teib.h
1546 )
1547
1548 list(APPEND VNET_API_FILES teib/teib.api)
1549
1550 ##############################################################################
1551 # ARP/ND
1552 ##############################################################################
1553
1554 list (APPEND VNET_SOURCES
1555   arp/arp_api.c
1556   arp/arp.c
1557   arp/arp_proxy.c
1558 )
1559
1560 list(APPEND VNET_HEADERS
1561   arp/arp.h
1562 )
1563
1564 list(APPEND VNET_API_FILES arp/arp.api)
1565
1566 list (APPEND VNET_SOURCES
1567   ip6-nd/ip6_mld.c
1568   ip6-nd/ip6_nd.c
1569   ip6-nd/ip6_nd_api.c
1570   ip6-nd/ip6_nd_proxy.c
1571   ip6-nd/ip6_ra.c
1572   ip6-nd/rd_cp.c
1573   ip6-nd/rd_cp_api.c
1574 )
1575
1576 list(APPEND VNET_HEADERS
1577   ip6-nd/ip6_nd.h
1578 )
1579
1580 list(APPEND VNET_API_FILES
1581   ip6-nd/ip6_nd.api
1582   ip6-nd/rd_cp.api
1583 )
1584
1585 ##############################################################################
1586 # VNET Library
1587 ##############################################################################
1588
1589 add_vpp_library(vnet
1590   SOURCES ${VNET_SOURCES}
1591   MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1592   INSTALL_HEADERS ${VNET_HEADERS}
1593   API_FILES ${VNET_API_FILES}
1594   LINK_LIBRARIES vppinfra svm vlib ${OPENSSL_LIBRARIES}
1595   DEPENDS vpp_version_h api_headers
1596 )
1597
1598 ##############################################################################
1599 # vpp api test client library
1600 ##############################################################################
1601
1602 add_vpp_library (vatclient
1603   SOURCES ip/ip_types_api.c
1604   DEPENDS api_headers
1605 )
1606
1607 ##############################################################################