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