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