misc: Move l2tp to plugin
[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/3 "classify"
366 ##############################################################################
367 list(APPEND VNET_SOURCES
368   classify/vnet_classify.c
369   classify/trace_classify.h
370   classify/ip_classify.c
371   classify/in_out_acl.c
372   classify/policer_classify.c
373   classify/flow_classify.c
374   classify/flow_classify_node.c
375   classify/vnet_classify.h
376   classify/classify_api.c
377 )
378
379 list(APPEND VNET_MULTIARCH_SOURCES
380   classify/ip_classify.c
381   classify/flow_classify_node.c
382 )
383
384 list(APPEND VNET_HEADERS
385   classify/vnet_classify.h
386   classify/trace_classify.h
387   classify/in_out_acl.h
388   classify/policer_classify.h
389   classify/flow_classify.h
390 )
391
392 list(APPEND VNET_API_FILES classify/classify.api)
393
394 ##############################################################################
395 # Layer 3 protocols go here
396 ##############################################################################
397
398 ##############################################################################
399 # Layer 3 protocol: IP v4/v6
400 ##############################################################################
401 list(APPEND VNET_SOURCES
402   ip/format.c
403   ip/icmp4.c
404   ip/icmp6.c
405   ip/ip46_cli.c
406   ip/ip_types_api.c
407   ip/ip46_address.c
408   ip/ip4_format.c
409   ip/ip4_forward.c
410   ip/ip4_punt_drop.c
411   ip/ip4_input.c
412   ip/ip4_options.c
413   ip/ip4_mtrie.c
414   ip/ip4_pg.c
415   ip/ip4_source_and_port_range_check.c
416   ip/reass/ip4_full_reass.c
417   ip/reass/ip4_sv_reass.c
418   ip/ip6_format.c
419   ip/ip6_forward.c
420   ip/ip6_ll_table.c
421   ip/ip6_ll_types.c
422   ip/ip6_punt_drop.c
423   ip/ip6_hop_by_hop.c
424   ip/ip6_input.c
425   ip/ip6_link.c
426   ip/ip6_pg.c
427   ip/reass/ip6_full_reass.c
428   ip/reass/ip6_sv_reass.c
429   ip/ip_api.c
430   ip/ip_checksum.c
431   ip/ip_frag.c
432   ip/ip.c
433   ip/ip_interface.c
434   ip/ip_init.c
435   ip/ip_in_out_acl.c
436   ip/ip_punt_drop.c
437   ip/ip_types.c
438   ip/lookup.c
439   ip/punt_api.c
440   ip/punt.c
441   ip/punt_node.c
442   ip/vtep.c
443 )
444
445 list(APPEND VNET_MULTIARCH_SOURCES
446   ip/ip4_punt_drop.c
447   ip/reass/ip4_full_reass.c
448   ip/ip6_hop_by_hop.c
449   ip/reass/ip6_full_reass.c
450   ip/reass/ip4_sv_reass.c
451   ip/ip6_hop_by_hop.c
452   ip/reass/ip6_full_reass.c
453   ip/reass/ip6_sv_reass.c
454   ip/ip6_input.c
455   ip/ip6_punt_drop.c
456   ip/punt_node.c
457   ip/ip_in_out_acl.c
458 )
459
460 list(APPEND VNET_HEADERS
461   ip/format.h
462   ip/icmp46_packet.h
463   ip/icmp4.h
464   ip/icmp6.h
465   ip/igmp_packet.h
466   ip/ip4_error.h
467   ip/ip4.h
468   ip/ip4_mtrie.h
469   ip/ip4_packet.h
470   ip/ip46_address.h
471   ip/ip6_error.h
472   ip/ip6.h
473   ip/ip6_hop_by_hop.h
474   ip/ip6_hop_by_hop_packet.h
475   ip/ip6_packet.h
476   ip/ip.h
477   ip/ip_table.h
478   ip/ip_interface.h
479   ip/ip_packet.h
480   ip/ip_source_and_port_range_check.h
481   ip/ip_types.h
482   ip/lookup.h
483   ip/ports.def
484   ip/protocols.def
485   ip/punt_error.def
486   ip/punt.h
487 )
488
489 list(APPEND VNET_API_FILES
490   ip/ip.api
491   ip/punt.api
492 )
493
494 list(APPEND VNET_MULTIARCH_SOURCES
495   ip/ip4_forward.c
496   ip/ip6_forward.c
497   ip/ip4_input.c
498 )
499
500 ##############################################################################
501 # Layer 3 neighbours
502 ##############################################################################
503 list(APPEND VNET_SOURCES
504   ip-neighbor/ip_neighbor.c
505   ip-neighbor/ip_neighbor_api.c
506   ip-neighbor/ip_neighbor_dp.c
507   ip-neighbor/ip_neighbor_types.c
508   ip-neighbor/ip_neighbor_watch.c
509   ip-neighbor/ip4_neighbor.c
510   ip-neighbor/ip6_neighbor.c
511 )
512
513 list(APPEND VNET_HEADERS
514   ip-neighbor/ip_neighbor.h
515   ip-neighbor/ip_neighbor_types.h
516 )
517
518 list(APPEND VNET_API_FILES
519   ip-neighbor/ip_neighbor.api
520 )
521
522 ##############################################################################
523 # Bidirectional Forwarding Detection
524 ##############################################################################
525
526 list(APPEND VNET_HEADERS
527   bfd/bfd_protocol.h
528   bfd/bfd_main.h
529   bfd/bfd_api.h
530   bfd/bfd_udp.h
531 )
532
533 list(APPEND VNET_SOURCES
534   bfd/bfd_api.h
535   bfd/bfd_udp.c
536   bfd/bfd_main.c
537   bfd/bfd_protocol.c
538   bfd/bfd_cli.c
539   bfd/bfd_api.c
540 )
541
542 list(APPEND VNET_API_FILES bfd/bfd.api)
543
544 ##############################################################################
545 # Crypto
546 ##############################################################################
547
548 list(APPEND VNET_SOURCES
549   crypto/cli.c
550   crypto/crypto.c
551   crypto/format.c
552   crypto/node.c
553   crypto/crypto_api.c
554 )
555
556 list(APPEND VNET_HEADERS
557   crypto/crypto.h
558 )
559
560 list(APPEND VNET_MULTIARCH_SOURCES crypto/node.c)
561
562 list(APPEND VNET_API_FILES crypto/crypto.api)
563
564 ##############################################################################
565 # Layer 3 protocol: IPSec
566 ##############################################################################
567 list(APPEND VNET_SOURCES
568   ipsec/ipsec.c
569   ipsec/ipsec_cli.c
570   ipsec/ipsec_format.c
571   ipsec/ipsec_handoff.c
572   ipsec/ipsec_input.c
573   ipsec/ipsec_itf.c
574   ipsec/ipsec_punt.c
575   ipsec/ipsec_sa.c
576   ipsec/ipsec_spd.c
577   ipsec/ipsec_spd_policy.c
578   ipsec/ipsec_tun.c
579   ipsec/ipsec_tun_in.c
580   ipsec/esp_format.c
581   ipsec/esp_encrypt.c
582   ipsec/esp_decrypt.c
583   ipsec/ah_decrypt.c
584   ipsec/ah_encrypt.c
585   ipsec/ipsec_api.c
586   ipsec/ipsec_types_api.c
587 )
588
589 list(APPEND VNET_MULTIARCH_SOURCES
590   ipsec/esp_encrypt.c
591   ipsec/esp_decrypt.c
592   ipsec/ah_decrypt.c
593   ipsec/ah_encrypt.c
594   ipsec/ipsec_handoff.c
595   ipsec/ipsec_output.c
596   ipsec/ipsec_input.c
597   ipsec/ipsec_tun_in.c
598 )
599
600 list(APPEND VNET_API_FILES ipsec/ipsec_types.api)
601 list(APPEND VNET_API_FILES ipsec/ipsec.api)
602
603 list(APPEND VNET_SOURCES
604   ipsec/ipsec_output.c
605 )
606
607 list(APPEND VNET_HEADERS
608   ipsec/ipsec.h
609   ipsec/ipsec_spd.h
610   ipsec/ipsec_spd_policy.h
611   ipsec/ipsec_sa.h
612   ipsec/ipsec_tun.h
613   ipsec/ipsec_types_api.h
614   ipsec/ipsec_punt.h
615   ipsec/esp.h
616   ipsec/ah.h
617 )
618
619 ##############################################################################
620 # Layer 3 protocol: osi
621 ##############################################################################
622 list(APPEND VNET_SOURCES
623   osi/node.c
624   osi/osi.c
625   osi/pg.c
626 )
627
628 list(APPEND VNET_HEADERS
629   osi/osi.h
630 )
631
632 ##############################################################################
633 # Layer 4 protocol: tcp
634 ##############################################################################
635 list(APPEND VNET_SOURCES
636   tcp/tcp_api.c
637   tcp/tcp_format.c
638   tcp/tcp_pg.c
639   tcp/tcp_syn_filter4.c
640   tcp/tcp_output.c
641   tcp/tcp_input.c
642   tcp/tcp_newreno.c
643   tcp/tcp_bt.c
644   tcp/tcp_cli.c
645   tcp/tcp_cubic.c
646   tcp/tcp_debug.c
647   tcp/tcp_sack.c
648   tcp/tcp.c
649 )
650
651 list(APPEND VNET_MULTIARCH_SOURCES
652   tcp/tcp_input.c
653   tcp/tcp_output.c
654   tcp/tcp_syn_filter4.c
655 )
656
657 list(APPEND VNET_HEADERS
658   tcp/tcp_packet.h
659   tcp/tcp_timer.h
660   tcp/tcp_bt.h
661   tcp/tcp_cc.h
662   tcp/tcp_debug.h
663   tcp/tcp_inlines.h
664   tcp/tcp_sack.h
665   tcp/tcp_types.h
666   tcp/tcp.h
667   tcp/tcp_error.def
668 )
669
670 list(APPEND VNET_API_FILES tcp/tcp.api)
671
672 ##############################################################################
673 # Layer 4 protocol: udp
674 ##############################################################################
675 list(APPEND VNET_SOURCES
676   udp/udp.c
677   udp/udp_cli.c
678   udp/udp_input.c
679   udp/udp_format.c
680   udp/udp_local.c
681   udp/udp_pg.c
682   udp/udp_encap_node.c
683   udp/udp_encap.c
684   udp/udp_api.c
685 )
686
687 list(APPEND VNET_MULTIARCH_SOURCES
688   udp/udp_local.c
689   udp/udp_encap_node.c
690 )
691
692 list(APPEND VNET_HEADERS
693   udp/udp_error.def
694   udp/udp.h
695   udp/udp_packet.h
696 )
697
698 list(APPEND VNET_API_FILES udp/udp.api)
699
700 ##############################################################################
701 # Tunnel protocol: gre
702 ##############################################################################
703 list(APPEND VNET_SOURCES
704   gre/gre.c
705   gre/node.c
706   gre/interface.c
707   gre/pg.c
708   gre/gre_api.c
709 )
710
711 list(APPEND VNET_MULTIARCH_SOURCES
712   gre/node.c
713   gre/gre.c
714 )
715
716 list(APPEND VNET_HEADERS
717   gre/gre.h
718   gre/packet.h
719   gre/error.def
720 )
721
722 list(APPEND VNET_API_FILES gre/gre.api)
723
724 ##############################################################################
725 # Tunnel protocol: ipip
726 ##############################################################################
727 list(APPEND VNET_SOURCES
728   ipip/ipip.c
729   ipip/node.c
730   ipip/sixrd.c
731   ipip/ipip_api.c
732   ipip/ipip_cli.c
733 )
734
735 list(APPEND VNET_MULTIARCH_SOURCES
736   ipip/node.c
737 )
738
739 list(APPEND VNET_HEADERS
740   ipip/ipip.h
741 )
742
743 list(APPEND VNET_API_FILES
744   ipip/ipip.api
745 )
746
747 ##############################################################################
748 # Tunnel infra
749 ##############################################################################
750 list(APPEND VNET_SOURCES
751   tunnel/tunnel.c
752   tunnel/tunnel_types_api.c
753 )
754
755 list(APPEND VNET_API_FILES
756   tunnel/tunnel_types.api
757 )
758
759 list(APPEND VNET_HEADERS
760   tunnel/tunnel.h
761   tunnel/tunnel_dp.h
762 )
763
764 ##############################################################################
765 # Tunnel protocol: gre+mpls
766 ##############################################################################
767 list(APPEND VNET_SOURCES
768   mpls/mpls.c
769   mpls/mpls_lookup.c
770   mpls/mpls_output.c
771   mpls/mpls_features.c
772   mpls/mpls_input.c
773   mpls/interface.c
774   mpls/mpls_tunnel.c
775   mpls/pg.c
776   mpls/mpls_api.c
777 )
778
779 list(APPEND VNET_MULTIARCH_SOURCES
780   mpls/mpls_output.c
781   mpls/mpls_input.c
782   mpls/mpls_lookup.c
783   mpls/mpls_features.c
784 )
785
786 list(APPEND VNET_HEADERS
787   mpls/mpls.h
788   mpls/mpls_types.h
789   mpls/mpls_tunnel.h
790   mpls/packet.h
791   mpls/error.def
792 )
793
794 list(APPEND VNET_API_FILES mpls/mpls.api)
795
796 ##############################################################################
797 # Tunnel protocol: vxlan-gbp
798 ##############################################################################
799 list(APPEND VNET_SOURCES
800   vxlan-gbp/decap.c
801   vxlan-gbp/encap.c
802   vxlan-gbp/vxlan_gbp_api.c
803   vxlan-gbp/vxlan_gbp.c
804   vxlan-gbp/vxlan_gbp_packet.c
805 )
806
807 list (APPEND VNET_MULTIARCH_SOURCES
808   vxlan-gbp/decap.c
809   vxlan-gbp/encap.c
810 )
811
812 list(APPEND VNET_HEADERS
813   vxlan-gbp/vxlan_gbp.h
814   vxlan-gbp/vxlan_gbp_packet.h
815   vxlan-gbp/vxlan_gbp_error.def
816 )
817
818 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
819
820 ##############################################################################
821 # Tunnel protocol: vxlan-gpe
822 ##############################################################################
823
824 list(APPEND VNET_SOURCES
825   vxlan-gpe/vxlan_gpe.c
826   vxlan-gpe/encap.c
827   vxlan-gpe/decap.c
828   vxlan-gpe/vxlan_gpe_api.c
829 )
830
831 list (APPEND VNET_MULTIARCH_SOURCES
832   vxlan-gpe/decap.c
833 )
834
835 list(APPEND VNET_HEADERS
836   vxlan-gpe/vxlan_gpe.h
837   vxlan-gpe/vxlan_gpe_packet.h
838   vxlan-gpe/vxlan_gpe_error.def
839 )
840
841 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
842
843 ##############################################################################
844 # LISP control plane: lisp-cp
845 ##############################################################################
846
847 list(APPEND VNET_SOURCES
848   lisp-cp/lisp_types.c
849   lisp-cp/lisp_cp_dpo.c
850   lisp-cp/control.c
851   lisp-cp/gid_dictionary.c
852   lisp-cp/lisp_msg_serdes.c
853   lisp-cp/packets.c
854   lisp-cp/one_cli.c
855   lisp-cp/lisp_cli.c
856   lisp-cp/one_api.c
857   lisp-cp/lisp_api.c
858   lisp-cp/lisp_types_api.c
859 )
860
861 list(APPEND VNET_HEADERS
862   lisp-cp/lisp_types.h
863   lisp-cp/packets.h
864   lisp-cp/gid_dictionary.h
865   lisp-cp/lisp_cp_messages.h
866   lisp-cp/lisp_msg_serdes.h
867   lisp-cp/control.h
868   lisp-cp/lisp_types_api.h
869 )
870
871 list(APPEND VNET_API_FILES lisp-cp/lisp_types.api)
872 list(APPEND VNET_API_FILES lisp-cp/lisp.api)
873 list(APPEND VNET_API_FILES lisp-cp/one.api)
874
875 ##############################################################################
876 # Tunnel protocol: lisp-gpe
877 ##############################################################################
878
879 list(APPEND VNET_SOURCES
880   lisp-gpe/lisp_gpe.c
881   lisp-gpe/lisp_gpe_sub_interface.c
882   lisp-gpe/lisp_gpe_adjacency.c
883   lisp-gpe/lisp_gpe_tunnel.c
884   lisp-gpe/lisp_gpe_fwd_entry.c
885   lisp-gpe/lisp_gpe_tenant.c
886   lisp-gpe/interface.c
887   lisp-gpe/decap.c
888   lisp-gpe/lisp_gpe_api.c
889 )
890
891 list(APPEND VNET_HEADERS
892   lisp-gpe/lisp_gpe.h
893   lisp-gpe/lisp_gpe_fwd_entry.h
894   lisp-gpe/lisp_gpe_tenant.h
895   lisp-gpe/lisp_gpe_packet.h
896   lisp-gpe/lisp_gpe_error.def
897 )
898
899 list(APPEND VNET_API_FILES lisp-gpe/lisp_gpe.api)
900
901 ##############################################################################
902 # ipv6 segment routing
903 ##############################################################################
904
905 list(APPEND VNET_SOURCES
906   srv6/sr.c
907   srv6/sr_localsid.c
908   srv6/sr_policy_rewrite.c
909   srv6/sr_steering.c
910   srv6/sr_api.c
911 )
912
913 list(APPEND VNET_HEADERS
914   srv6/sr_packet.h
915   srv6/sr.h
916 )
917
918 list(APPEND VNET_API_FILES
919   srv6/sr.api
920   srv6/sr_types.api
921 )
922
923 ##############################################################################
924 # mpls segment routing
925 ##############################################################################
926
927 list(APPEND VNET_SOURCES
928   srmpls/sr_mpls_policy.c
929   srmpls/sr_mpls_steering.c
930   srmpls/sr_mpls_api.c
931 )
932
933 list(APPEND VNET_HEADERS
934   srmpls/sr_mpls.h
935 )
936
937 list(APPEND VNET_API_FILES
938   srmpls/sr_mpls.api
939   srv6/sr_types.api
940 )
941
942 ##############################################################################
943 # IPFIX / netflow v10
944 ##############################################################################
945 list(APPEND VNET_SOURCES
946   ipfix-export/flow_report.c
947   ipfix-export/flow_api.c
948 )
949
950 list(APPEND VNET_HEADERS
951   ipfix-export/flow_report.h
952   ipfix-export/ipfix_info_elements.h
953   ipfix-export/ipfix_packet.h
954 )
955
956 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
957
958 ##############################################################################
959 # GSO
960 ##############################################################################
961 list(APPEND VNET_SOURCES
962   gso/cli.c
963   gso/gso.c
964   gso/gso_api.c
965   gso/node.c
966 )
967
968 list(APPEND VNET_HEADERS
969   gso/gro.h
970   gso/gro_func.h
971   gso/hdr_offset_parser.h
972   gso/gso.h
973 )
974
975 list(APPEND VNET_API_FILES
976   gso/gso.api
977 )
978
979 ##############################################################################
980 # IPFIX classify code
981 ##############################################################################
982
983 list(APPEND VNET_SOURCES
984   ipfix-export/flow_report_classify.c
985 )
986
987 list(APPEND VNET_HEADERS
988   ipfix-export/flow_report_classify.h
989 )
990
991 ##############################################################################
992 # lawful intercept
993 ##############################################################################
994
995 list(APPEND VNET_SOURCES
996   lawful-intercept/lawful_intercept.c
997   lawful-intercept/node.c
998 )
999
1000 list(APPEND VNET_MULTIARCH_SOURCES
1001   lawful-intercept/node.c
1002 )
1003
1004 list(APPEND VNET_HEADERS
1005   lawful-intercept/lawful_intercept.h
1006 )
1007
1008 ##############################################################################
1009 # SPAN (port mirroring)
1010 ##############################################################################
1011
1012 list(APPEND VNET_SOURCES
1013   span/span_api.c
1014   span/span.c
1015   span/node.c
1016 )
1017
1018 list(APPEND VNET_MULTIARCH_SOURCES
1019   span/node.c
1020 )
1021
1022 list(APPEND VNET_HEADERS
1023   span/span.h
1024 )
1025
1026 list(APPEND VNET_API_FILES span/span.api)
1027
1028 ##############################################################################
1029 # Packet generator
1030 ##############################################################################
1031
1032 list(APPEND VNET_SOURCES
1033   pg/cli.c
1034   pg/edit.c
1035   pg/init.c
1036   pg/input.c
1037   pg/output.c
1038   pg/stream.c
1039   pg/pg_api.c
1040 )
1041
1042 list(APPEND VNET_HEADERS
1043   pg/pg.h
1044   pg/edit.h
1045 )
1046
1047 list(APPEND VNET_API_FILES pg/pg.api)
1048
1049 ##############################################################################
1050 # virtio
1051 ##############################################################################
1052
1053 list(APPEND VNET_SOURCES
1054   devices/virtio/cli.c
1055   devices/virtio/device.c
1056   devices/virtio/format.c
1057   devices/virtio/node.c
1058   devices/virtio/pci.c
1059   devices/virtio/vhost_user.c
1060   devices/virtio/vhost_user_input.c
1061   devices/virtio/vhost_user_output.c
1062   devices/virtio/vhost_user_api.c
1063   devices/virtio/virtio.c
1064   devices/virtio/virtio_api.c
1065   devices/virtio/virtio_pci_legacy.c
1066   devices/virtio/virtio_pci_modern.c
1067   devices/virtio/virtio_types_api.c
1068 )
1069
1070 list(APPEND VNET_HEADERS
1071   devices/virtio/pci.h
1072   devices/virtio/virtio.h
1073   devices/virtio/virtio_std.h
1074   devices/virtio/virtio_pci_legacy.h
1075   devices/virtio/virtio_pci_modern.h
1076   devices/virtio/vhost_std.h
1077   devices/virtio/vhost_user.h
1078   devices/virtio/virtio_types_api.h
1079 )
1080
1081 list(APPEND VNET_MULTIARCH_SOURCES
1082   devices/virtio/vhost_user_input.c
1083   devices/virtio/vhost_user_output.c
1084   devices/virtio/node.c
1085   devices/af_packet/node.c
1086   devices/virtio/device.c
1087 )
1088
1089 list(APPEND VNET_API_FILES
1090   devices/virtio/vhost_user.api
1091   devices/virtio/virtio.api
1092   devices/virtio/virtio_types.api
1093 )
1094
1095 ##############################################################################
1096 # tap interface (with virtio backend)
1097 ##############################################################################
1098
1099 list(APPEND VNET_SOURCES
1100   devices/tap/cli.c
1101   devices/tap/tap.c
1102   devices/tap/tapv2_api.c
1103 )
1104
1105 list(APPEND VNET_HEADERS
1106   devices/tap/tap.h
1107 )
1108
1109 list(APPEND VNET_API_FILES
1110   devices/tap/tapv2.api
1111 )
1112
1113 ##############################################################################
1114 # tap interface (with virtio backend)
1115 ##############################################################################
1116
1117 list(APPEND VNET_SOURCES
1118   devices/pipe/pipe_api.c
1119   devices/pipe/pipe.c
1120 )
1121
1122 list(APPEND VNET_HEADERS
1123   devices/pipe/pipe.h
1124 )
1125
1126 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1127
1128 ##############################################################################
1129 # session managmeent
1130 ##############################################################################
1131
1132 list(APPEND VNET_SOURCES
1133   session/session.c
1134   session/session_debug.c
1135   session/session_table.c
1136   session/session_rules_table.c
1137   session/session_lookup.c
1138   session/session_node.c
1139   session/transport.c
1140   session/application.c
1141   session/application_worker.c
1142   session/session_cli.c
1143   session/application_interface.c
1144   session/application_local.c
1145   session/application_namespace.c
1146   session/segment_manager.c
1147   session/session_api.c
1148 )
1149
1150 list(APPEND VNET_HEADERS
1151   session/session.h
1152   session/session_table.h
1153   session/session_rules_table.h
1154   session/session_types.h
1155   session/session_lookup.h
1156   session/application.h
1157   session/transport.h
1158   session/transport_types.h
1159   session/application_interface.h
1160   session/application_local.h
1161   session/application_namespace.h
1162   session/session_debug.h
1163   session/segment_manager.h
1164   session/mma_template.h
1165   session/mma_template.c
1166   session/mma_16.h
1167   session/mma_40.h
1168 )
1169
1170 list(APPEND VNET_API_FILES session/session.api)
1171
1172 ##############################################################################
1173 # TLS protocol
1174 ##############################################################################
1175
1176 list(APPEND VNET_SOURCES
1177   tls/tls.c
1178 )
1179
1180 list(APPEND VNET_HEADERS
1181   tls/tls.h
1182   tls/tls_test.h
1183 )
1184
1185 ##############################################################################
1186 # Linux packet interface
1187 ##############################################################################
1188
1189 list(APPEND VNET_SOURCES
1190   devices/af_packet/af_packet.c
1191   devices/af_packet/device.c
1192   devices/af_packet/node.c
1193   devices/af_packet/cli.c
1194   devices/af_packet/af_packet_api.c
1195 )
1196
1197 list(APPEND VNET_MULTIARCH_SOURCES
1198   devices/af_packet/device.c
1199 )
1200
1201 list(APPEND VNET_HEADERS
1202   devices/af_packet/af_packet.h
1203 )
1204
1205 list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
1206
1207 ##############################################################################
1208 # Driver feature graph arc support
1209 ##############################################################################
1210
1211 list(APPEND VNET_SOURCES
1212   feature/feature.c
1213   feature/feature_api.c
1214   feature/registration.c
1215 )
1216
1217 list(APPEND VNET_HEADERS
1218   feature/feature.h
1219 )
1220
1221 list(APPEND VNET_API_FILES feature/feature.api)
1222
1223 ##############################################################################
1224 # Unix kernel related
1225 ##############################################################################
1226
1227 # FIXME: unix/hgshm.c
1228
1229 list(APPEND VNET_SOURCES
1230   unix/gdb_funcs.c
1231   unix/tuntap.c
1232 )
1233
1234 list(APPEND VNET_HEADERS
1235   unix/tuntap.h
1236 )
1237
1238 ##############################################################################
1239 # FIB
1240 ##############################################################################
1241
1242 list(APPEND VNET_SOURCES
1243   fib/fib.c
1244   fib/ip4_fib.c
1245   fib/ip6_fib.c
1246   fib/mpls_fib.c
1247   fib/fib_table.c
1248   fib/fib_walk.c
1249   fib/fib_types.c
1250   fib/fib_node.c
1251   fib/fib_node_list.c
1252   fib/fib_entry.c
1253   fib/fib_entry_src.c
1254   fib/fib_entry_src_adj.c
1255   fib/fib_entry_src_api.c
1256   fib/fib_entry_src_drop.c
1257   fib/fib_entry_src_interface.c
1258   fib/fib_entry_src_interpose.c
1259   fib/fib_entry_src_lisp.c
1260   fib/fib_entry_src_mpls.c
1261   fib/fib_entry_src_simple.c
1262   fib/fib_entry_src_rr.c
1263   fib/fib_entry_cover.c
1264   fib/fib_entry_delegate.c
1265   fib/fib_entry_track.c
1266   fib/fib_path_list.c
1267   fib/fib_path.c
1268   fib/fib_path_ext.c
1269   fib/fib_source.c
1270   fib/fib_urpf_list.c
1271   fib/fib_attached_export.c
1272   fib/fib_api.c
1273   fib/fib_bfd.c
1274 )
1275
1276 list(APPEND VNET_HEADERS
1277   fib/fib.h
1278   fib/fib_api.h
1279   fib/ip4_fib.h
1280   fib/ip6_fib.h
1281   fib/fib_types.h
1282   fib/fib_table.h
1283   fib/fib_node.h
1284   fib/fib_node_list.h
1285   fib/fib_entry.h
1286   fib/fib_entry_delegate.h
1287   fib/fib_source.h
1288 )
1289
1290 list(APPEND VNET_API_FILES fib/fib_types.api)
1291
1292 ##############################################################################
1293 # ADJ
1294 ##############################################################################
1295
1296 list(APPEND VNET_SOURCES
1297   adj/adj_nbr.c
1298   adj/adj_glean.c
1299   adj/adj_midchain.c
1300   adj/adj_midchain_delegate.c
1301   adj/adj_mcast.c
1302   adj/adj_l2.c
1303   adj/adj_nsh.c
1304   adj/adj.c
1305   adj/rewrite.c
1306   adj/adj_bfd.c
1307   adj/adj_delegate.c
1308 )
1309
1310 list(APPEND VNET_MULTIARCH_SOURCES
1311   adj/adj_nsh.c
1312   adj/adj_l2.c
1313   adj/adj_midchain.c
1314 )
1315
1316 list(APPEND VNET_HEADERS
1317   adj/adj.h
1318   adj/adj_types.h
1319   adj/adj_glean.h
1320   adj/adj_nsh.h
1321   adj/adj_nbr.h
1322   adj/adj_midchain.h
1323   adj/rewrite.h
1324 )
1325
1326 ##############################################################################
1327 # Data-Plane Objects
1328 ##############################################################################
1329
1330 list(APPEND VNET_SOURCES
1331   dpo/dpo.c
1332   dpo/drop_dpo.c
1333   dpo/ip_null_dpo.c
1334   dpo/ip6_ll_dpo.c
1335   dpo/punt_dpo.c
1336   dpo/receive_dpo.c
1337   dpo/load_balance.c
1338   dpo/load_balance_map.c
1339   dpo/lookup_dpo.c
1340   dpo/classify_dpo.c
1341   dpo/replicate_dpo.c
1342   dpo/interface_rx_dpo.c
1343   dpo/interface_tx_dpo.c
1344   dpo/mpls_disposition.c
1345   dpo/mpls_label_dpo.c
1346   dpo/l3_proxy_dpo.c
1347   dpo/dvr_dpo.c
1348   dpo/pw_cw.c
1349 )
1350
1351 list(APPEND VNET_MULTIARCH_SOURCES
1352   dpo/lookup_dpo.h
1353   dpo/mpls_disposition.c
1354   dpo/dvr_dpo.c
1355   dpo/mpls_label_dpo.c
1356   dpo/interface_rx_dpo.c
1357 )
1358
1359 list(APPEND VNET_HEADERS
1360   dpo/load_balance.h
1361   dpo/drop_dpo.h
1362   dpo/lookup_dpo.h
1363   dpo/punt_dpo.h
1364   dpo/classify_dpo.h
1365   dpo/receive_dpo.h
1366   dpo/ip_null_dpo.h
1367   dpo/replicate_dpo.h
1368   dpo/dpo.h
1369 )
1370
1371 ##############################################################################
1372 # Multicast FIB
1373 ##############################################################################
1374
1375 list(APPEND VNET_SOURCES
1376   mfib/mfib_forward.c
1377   mfib/ip4_mfib.c
1378   mfib/ip6_mfib.c
1379   mfib/mfib_api.c
1380   mfib/mfib_types.c
1381   mfib/mfib_signal.c
1382   mfib/mfib_itf.c
1383   mfib/mfib_entry.c
1384   mfib/mfib_entry.c
1385   mfib/mfib_entry_cover.c
1386   mfib/mfib_entry_delegate.c
1387   mfib/mfib_entry_src.c
1388   mfib/mfib_entry_src_rr.c
1389   mfib/mfib_table.c
1390 )
1391
1392 list(APPEND VNET_MULTIARCH_SOURCES
1393   mfib/mfib_forward.c
1394 )
1395
1396 list(APPEND VNET_HEADERS
1397   mfib/ip4_mfib.h
1398   mfib/mfib_types.h
1399   mfib/mfib_table.h
1400 )
1401
1402 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1403
1404 ##############################################################################
1405 # Utilities
1406 ##############################################################################
1407
1408 list(APPEND VNET_SOURCES
1409   util/radix.c
1410   util/refcount.c
1411   util/throttle.c
1412   util/trajectory.c
1413 )
1414
1415 list(APPEND VNET_HEADERS
1416   util/throttle.h
1417 )
1418
1419 ##############################################################################
1420 # QoS
1421 ##############################################################################
1422
1423 list(APPEND VNET_SOURCES
1424   qos/qos_types.c
1425   qos/qos_api.c
1426   qos/qos_egress_map.c
1427   qos/qos_record.c
1428   qos/qos_record_node.c
1429   qos/qos_store.c
1430   qos/qos_store_node.c
1431   qos/qos_mark.c
1432   qos/qos_mark_node.c
1433 )
1434
1435 list(APPEND VNET_MULTIARCH_SOURCES
1436   qos/qos_record_node.c
1437   qos/qos_mark_node.c
1438 )
1439
1440 list(APPEND VNET_API_FILES qos/qos.api)
1441
1442 ##############################################################################
1443 # BIER
1444 ##############################################################################
1445
1446 list(APPEND VNET_SOURCES
1447   bier/bier_bit_string.c
1448   bier/bier_entry.c
1449   bier/bier_fmask.c
1450   bier/bier_fmask_db.c
1451   bier/bier_input.c
1452   bier/bier_lookup.c
1453   bier/bier_output.c
1454   bier/bier_table.c
1455   bier/bier_types.c
1456   bier/bier_api.c
1457   bier/bier_drop.c
1458   bier/bier_update.c
1459   bier/bier_imp_node.c
1460   bier/bier_imp.c
1461   bier/bier_disp_entry.c
1462   bier/bier_disp_lookup_node.c
1463   bier/bier_disp_dispatch_node.c
1464   bier/bier_disp_table.c
1465   bier/bier_bift_table.c
1466 )
1467
1468 list(APPEND VNET_MULTIARCH_SOURCES
1469   bier/bier_disp_dispatch_node.c
1470   bier/bier_disp_lookup_node.c
1471   bier/bier_imp_node.c
1472 )
1473
1474 list(APPEND VNET_HEADERS
1475   bier/bier_types.h
1476   bier/bier_entry.h
1477   bier/bier_update.h
1478   bier/bier_table.h
1479 )
1480
1481 list(APPEND VNET_API_FILES bier/bier.api)
1482
1483 ##############################################################################
1484 # SYSLOG
1485 ##############################################################################
1486
1487 list (APPEND VNET_SOURCES
1488   syslog/syslog_api.c
1489   syslog/syslog_udp.c
1490   syslog/syslog.c
1491 )
1492
1493 list(APPEND VNET_HEADERS
1494   syslog/syslog_udp.h
1495   syslog/syslog.h
1496 )
1497
1498 list(APPEND VNET_API_FILES syslog/syslog.api)
1499
1500 ##############################################################################
1501 # Tunnel Endpoint Information Base
1502 ##############################################################################
1503
1504 list (APPEND VNET_SOURCES
1505   teib/teib_api.c
1506   teib/teib_cli.c
1507   teib/teib.c
1508 )
1509
1510 list(APPEND VNET_HEADERS
1511   teib/teib.h
1512 )
1513
1514 list(APPEND VNET_API_FILES teib/teib.api)
1515
1516 ##############################################################################
1517 # ARP/ND
1518 ##############################################################################
1519
1520 list (APPEND VNET_SOURCES
1521   arp/arp_api.c
1522   arp/arp.c
1523   arp/arp_proxy.c
1524 )
1525
1526 list(APPEND VNET_HEADERS
1527   arp/arp.h
1528 )
1529
1530 list(APPEND VNET_API_FILES arp/arp.api)
1531
1532 list (APPEND VNET_SOURCES
1533   ip6-nd/ip6_mld.c
1534   ip6-nd/ip6_nd.c
1535   ip6-nd/ip6_nd_api.c
1536   ip6-nd/ip6_nd_proxy.c
1537   ip6-nd/ip6_ra.c
1538   ip6-nd/rd_cp.c
1539   ip6-nd/rd_cp_api.c
1540 )
1541
1542 list(APPEND VNET_HEADERS
1543   ip6-nd/ip6_nd.h
1544 )
1545
1546 list(APPEND VNET_API_FILES
1547   ip6-nd/ip6_nd.api
1548   ip6-nd/rd_cp.api
1549 )
1550
1551 ##############################################################################
1552 # VNET Library
1553 ##############################################################################
1554
1555 add_vpp_library(vnet
1556   SOURCES ${VNET_SOURCES}
1557   MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1558   INSTALL_HEADERS ${VNET_HEADERS}
1559   API_FILES ${VNET_API_FILES}
1560   LINK_LIBRARIES vppinfra svm vlib ${OPENSSL_LIBRARIES}
1561   DEPENDS vpp_version_h api_headers
1562 )
1563
1564 ##############################################################################
1565 # vpp api test client library
1566 ##############################################################################
1567
1568 add_vpp_library (vatclient
1569   SOURCES ip/ip_types_api.c
1570   DEPENDS api_headers
1571 )
1572
1573 ##############################################################################