dev: device and port specific args
[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 unset(VNET_SOURCES)
15 unset(VNET_HEADERS)
16 unset(VNET_API_FILES)
17 unset(VNET_MULTIARCH_SOURCES)
18
19 option(VPP_IP_FIB_MTRIE_16 "IP FIB's MTRIE Stride is 16-8-8 (if not set it's 8-8-8-8)" ON)
20
21 ##############################################################################
22 # Generic stuff
23 ##############################################################################
24 list(APPEND VNET_SOURCES
25   buffer.c
26   config.c
27   devices/devices.c
28   devices/netlink.c
29   dev/api.c
30   dev/args.c
31   dev/cli.c
32   dev/config.c
33   dev/counters.c
34   dev/dev.c
35   dev/error.c
36   dev/format.c
37   dev/handlers.c
38   dev/pci.c
39   dev/port.c
40   dev/process.c
41   dev/queue.c
42   dev/runtime.c
43   error.c
44   flow/flow.c
45   flow/flow_cli.c
46   flow/flow_api.c
47   handoff.c
48   interface.c
49   interface_api.c
50   interface_cli.c
51   interface_format.c
52   interface_output.c
53   interface/caps.c
54   interface/rx_queue.c
55   interface/tx_queue.c
56   interface/runtime.c
57   interface/monitor.c
58   interface/stats.c
59   interface_stats.c
60   misc.c
61 )
62
63 list(APPEND VNET_MULTIARCH_SOURCES
64   interface_output.c
65   interface_stats.c
66   handoff.c
67 )
68
69 list(APPEND VNET_HEADERS
70   api_errno.h
71   error.h
72   buffer.h
73   config.h
74   devices/devices.h
75   devices/netlink.h
76   dev/dev.h
77   flow/flow.h
78   global_funcs.h
79   interface/rx_queue_funcs.h
80   interface/tx_queue_funcs.h
81   interface.h
82   interface_funcs.h
83   interface_output.h
84   ip/ip4_to_ip6.h
85   ip/ip6_to_ip4.h
86   ip/ip_types_api.h
87   l3_types.h
88   plugin/plugin.h
89   pipeline.h
90   vnet.h
91   util/radix.h
92   util/refcount.h
93   format_fns.h
94   ip/ip_format_fns.h
95   ip/ip_sas.h
96   ethernet/ethernet_format_fns.h
97   ethernet/ethernet_types_api.h
98 )
99
100 list(APPEND VNET_API_FILES
101   interface.api
102   interface_types.api
103   ip/ip_types.api
104   flow/flow_types.api
105   flow/flow.api
106 )
107
108 ##############################################################################
109 # Policer infra
110 ##############################################################################
111 list(APPEND VNET_SOURCES
112   policer/node_funcs.c
113   policer/policer.c
114   policer/xlate.c
115   policer/policer_api.c
116 )
117
118 list(APPEND VNET_MULTIARCH_SOURCES
119   policer/node_funcs.c
120 )
121
122 list(APPEND VNET_HEADERS
123   policer/police.h
124   policer/policer.h
125   policer/xlate.h
126 )
127
128 list(APPEND VNET_API_FILES
129   policer/policer.api
130   policer/policer_types.api
131 )
132
133 ##############################################################################
134 # Layer 2 protocols go here
135 ##############################################################################
136
137 ##############################################################################
138 # Layer 2 protocol: Ethernet
139 ##############################################################################
140 list(APPEND VNET_SOURCES
141   ethernet/arp_packet.c
142   ethernet/ethernet_types_api.c
143   ethernet/format.c
144   ethernet/init.c
145   ethernet/interface.c
146   ethernet/mac_address.c
147   ethernet/node.c
148   ethernet/pg.c
149   ethernet/sfp.c
150   ethernet/p2p_ethernet.c
151   ethernet/p2p_ethernet_input.c
152   ethernet/p2p_ethernet_api.c
153 )
154
155 list(APPEND VNET_MULTIARCH_SOURCES
156   ethernet/node.c
157   ethernet/p2p_ethernet_input.c
158 )
159
160 list(APPEND VNET_HEADERS
161   ethernet/error.def
162   ethernet/ethernet.h
163   ethernet/mac_address.h
164   ethernet/packet.h
165   ethernet/types.def
166   ethernet/sfp.h
167   ethernet/p2p_ethernet.h
168   ethernet/arp_packet.h
169 )
170
171 list(APPEND VNET_API_FILES
172   ethernet/p2p_ethernet.api
173   ethernet/ethernet_types.api)
174
175 ##############################################################################
176 # Layer 2 protocol: Ethernet bridging
177 ##############################################################################
178 list(APPEND VNET_SOURCES
179   l2/feat_bitmap.c
180   l2/l2_api.c
181   l2/l2_arp_term.c
182   l2/l2_bd.c
183   l2/l2_bvi.c
184   l2/l2_bvi_node.c
185   l2/l2_input_classify.c
186   l2/l2_output_classify.c
187   l2/l2_efp_filter.c
188   l2/l2_fib.c
189   l2/l2_flood.c
190   l2/l2_fwd.c
191   l2/l2_input.c
192   l2/l2_input_node.c
193   l2/l2_input_vtr.c
194   l2/l2_learn.c
195   l2/l2_output.c
196   l2/l2_in_out_acl.c
197   l2/l2_in_out_feat_arc.c
198   l2/l2_patch.c
199   l2/l2_rw.c
200   l2/l2_uu_fwd.c
201   l2/l2_vtr.c
202   l2/l2_xcrw.c
203 )
204
205 list(APPEND VNET_MULTIARCH_SOURCES
206   l2/l2_bvi_node.c
207   l2/l2_fwd.c
208   l2/l2_learn.c
209   l2/l2_output.c
210   l2/l2_patch.c
211   l2/l2_in_out_feat_arc.c
212   l2/l2_input_classify.c
213   l2/l2_input_node.c
214   l2/l2_output_classify.c
215   l2/l2_flood.c
216   l2/l2_uu_fwd.c
217   l2/l2_efp_filter.c
218   l2/l2_rw.c
219   l2/l2_xcrw.c
220   l2/l2_in_out_acl.c
221   l2/l2_input_vtr.c
222 )
223
224 list(APPEND VNET_HEADERS
225   l2/feat_bitmap.h
226   l2/l2_input.h
227   l2/l2_output.h
228   l2/l2_vtr.h
229   l2/l2_input_vtr.h
230   l2/l2_efp_filter.h
231   l2/l2_fwd.h
232   l2/l2_bd.h
233   l2/l2_bvi.h
234   l2/l2_flood.h
235   l2/l2_fib.h
236   l2/l2_rw.h
237   l2/l2_xcrw.h
238   l2/l2_classify.h
239 )
240
241 list(APPEND VNET_API_FILES l2/l2.api)
242
243 ##############################################################################
244 # Layer 2 protocol: SRP
245 ##############################################################################
246 list(APPEND VNET_SOURCES
247   srp/format.c
248   srp/interface.c
249   srp/node.c
250   srp/pg.c
251 )
252
253 list(APPEND VNET_HEADERS
254   srp/packet.h
255   srp/srp.h
256 )
257
258 ##############################################################################
259 # Layer 2 protocol: PPP
260 ##############################################################################
261 list(APPEND VNET_SOURCES
262   ppp/node.c
263   ppp/pg.c
264   ppp/ppp.c
265 )
266
267 list(APPEND VNET_HEADERS
268   ppp/error.def
269   ppp/ppp.h
270   ppp/packet.h
271 )
272
273 ##############################################################################
274 # Layer 2 protocol: HDLC
275 ##############################################################################
276 list(APPEND VNET_SOURCES
277   hdlc/node.c
278   hdlc/pg.c
279   hdlc/hdlc.c
280 )
281
282 list(APPEND VNET_HEADERS
283   hdlc/error.def
284   hdlc/hdlc.h
285   hdlc/packet.h
286 )
287
288 ##############################################################################
289 # Layer 2 protocol: LLC
290 ##############################################################################
291 list(APPEND VNET_SOURCES
292   llc/llc.c
293   llc/node.c
294   llc/pg.c
295 )
296
297 list(APPEND VNET_HEADERS
298   llc/llc.h
299 )
300
301 ##############################################################################
302 # Layer 2 protocol: SNAP
303 ##############################################################################
304 list(APPEND VNET_SOURCES
305   snap/snap.c
306   snap/node.c
307   snap/pg.c
308 )
309
310 list(APPEND VNET_HEADERS
311   snap/snap.h
312 )
313
314 ##############################################################################
315 # Layer 2 / Bonding
316 ##############################################################################
317 list(APPEND VNET_SOURCES
318   bonding/cli.c
319   bonding/node.c
320   bonding/device.c
321   bonding/bond_api.c
322 )
323
324 list(APPEND VNET_HEADERS
325   bonding/node.h
326 )
327
328 list(APPEND VNET_MULTIARCH_SOURCES bonding/node.c bonding/device.c)
329 list(APPEND VNET_API_FILES bonding/bond.api)
330
331 ##############################################################################
332 # Layer 2/3 "classify"
333 ##############################################################################
334 list(APPEND VNET_SOURCES
335   classify/vnet_classify.c
336   classify/trace_classify.h
337   classify/ip_classify.c
338   classify/in_out_acl.c
339   classify/policer_classify.c
340   classify/flow_classify.c
341   classify/flow_classify_node.c
342   classify/vnet_classify.h
343   classify/classify_api.c
344 )
345
346 list(APPEND VNET_MULTIARCH_SOURCES
347   classify/ip_classify.c
348   classify/flow_classify_node.c
349 )
350
351 list(APPEND VNET_HEADERS
352   classify/vnet_classify.h
353   classify/trace_classify.h
354   classify/in_out_acl.h
355   classify/policer_classify.h
356   classify/flow_classify.h
357 )
358
359 list(APPEND VNET_API_FILES classify/classify.api)
360
361 ##############################################################################
362 # Layer 3 protocols go here
363 ##############################################################################
364
365 ##############################################################################
366 # Layer 3 protocol: IP v4/v6
367 ##############################################################################
368 list(APPEND VNET_SOURCES
369   ip/format.c
370   ip/icmp4.c
371   ip/icmp6.c
372   ip/ip46_cli.c
373   ip/ip_types_api.c
374   ip/ip46_address.c
375   ip/ip4_format.c
376   ip/ip4_forward.c
377   ip/ip4_punt_drop.c
378   ip/ip4_input.c
379   ip/ip4_options.c
380   ip/ip4_mtrie.c
381   ip/ip4_pg.c
382   ip/ip4_source_and_port_range_check.c
383   ip/reass/ip4_full_reass.c
384   ip/reass/ip4_sv_reass.c
385   ip/ip6_format.c
386   ip/ip6_forward.c
387   ip/ip6_ll_table.c
388   ip/ip6_ll_types.c
389   ip/ip6_punt_drop.c
390   ip/ip6_hop_by_hop.c
391   ip/ip6_input.c
392   ip/ip6_link.c
393   ip/ip6_pg.c
394   ip/reass/ip6_full_reass.c
395   ip/reass/ip6_sv_reass.c
396   ip/ip_api.c
397   ip/ip_checksum.c
398   ip/ip_container_proxy.c
399   ip/ip_frag.c
400   ip/ip.c
401   ip/ip_interface.c
402   ip/ip_init.c
403   ip/ip_in_out_acl.c
404   ip/ip_path_mtu.c
405   ip/ip_path_mtu_node.c
406   ip/ip_punt_drop.c
407   ip/ip_types.c
408   ip/lookup.c
409   ip/punt_api.c
410   ip/punt.c
411   ip/punt_node.c
412   ip/vtep.c
413   ip/ip_sas.c
414 )
415
416 list(APPEND VNET_MULTIARCH_SOURCES
417   ip/ip4_punt_drop.c
418   ip/reass/ip4_full_reass.c
419   ip/ip6_hop_by_hop.c
420   ip/reass/ip6_full_reass.c
421   ip/reass/ip4_sv_reass.c
422   ip/ip6_hop_by_hop.c
423   ip/reass/ip6_full_reass.c
424   ip/reass/ip6_sv_reass.c
425   ip/ip6_input.c
426   ip/ip6_punt_drop.c
427   ip/punt_node.c
428   ip/ip_in_out_acl.c
429   ip/ip_path_mtu_node.c
430 )
431
432 list(APPEND VNET_HEADERS
433   ip/format.h
434   ip/icmp46_packet.h
435   ip/icmp4.h
436   ip/icmp6.h
437   ip/igmp_packet.h
438   ip/ip4.h
439   ip/ip4_mtrie.h
440   ip/ip4_inlines.h
441   ip/ip4_packet.h
442   ip/ip46_address.h
443   ip/ip6.h
444   ip/ip6_hop_by_hop.h
445   ip/ip6_hop_by_hop_packet.h
446   ip/ip6_inlines.h
447   ip/ip6_packet.h
448   ip/ip.h
449   ip/ip_container_proxy.h
450   ip/ip_flow_hash.h
451   ip/ip_table.h
452   ip/ip_interface.h
453   ip/ip_packet.h
454   ip/ip_psh_cksum.h
455   ip/ip_source_and_port_range_check.h
456   ip/ip_types.h
457   ip/lookup.h
458   ip/ports.def
459   ip/protocols.def
460   ip/punt_error.def
461   ip/punt.h
462   ip/reass/ip4_sv_reass.h
463   ip/reass/ip6_sv_reass.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_timer.c
626   tcp/tcp.c
627 )
628
629 list(APPEND VNET_MULTIARCH_SOURCES
630   tcp/tcp_input.c
631   tcp/tcp_output.c
632   tcp/tcp_syn_filter4.c
633 )
634
635 list(APPEND VNET_HEADERS
636   tcp/tcp_packet.h
637   tcp/tcp_timer.h
638   tcp/tcp_bt.h
639   tcp/tcp_cc.h
640   tcp/tcp_debug.h
641   tcp/tcp_inlines.h
642   tcp/tcp_sack.h
643   tcp/tcp_types.h
644   tcp/tcp.h
645   tcp/tcp_error.def
646 )
647
648 list(APPEND VNET_API_FILES tcp/tcp.api)
649
650 ##############################################################################
651 # Layer 4 protocol: udp
652 ##############################################################################
653 list(APPEND VNET_SOURCES
654   udp/udp.c
655   udp/udp_cli.c
656   udp/udp_input.c
657   udp/udp_format.c
658   udp/udp_local.c
659   udp/udp_pg.c
660   udp/udp_encap_node.c
661   udp/udp_encap.c
662   udp/udp_decap.c
663   udp/udp_api.c
664   udp/udp_output.c
665 )
666
667 list(APPEND VNET_MULTIARCH_SOURCES
668   udp/udp_local.c
669   udp/udp_encap_node.c
670 )
671
672 list(APPEND VNET_HEADERS
673   udp/udp_error.def
674   udp/udp.h
675   udp/udp_encap.h
676   udp/udp_packet.h
677   udp/udp_inlines.h
678   udp/udp_local.h
679 )
680
681 list(APPEND VNET_API_FILES udp/udp.api)
682
683 ##############################################################################
684 # Tunnel protocol: gre
685 ##############################################################################
686 list(APPEND VNET_HEADERS
687   gre/packet.h
688 )
689
690 ##############################################################################
691 # Tunnel protocol: ipip
692 ##############################################################################
693 list(APPEND VNET_SOURCES
694   ipip/ipip.c
695   ipip/node.c
696   ipip/sixrd.c
697   ipip/ipip_api.c
698   ipip/ipip_cli.c
699 )
700
701 list(APPEND VNET_MULTIARCH_SOURCES
702   ipip/node.c
703 )
704
705 list(APPEND VNET_HEADERS
706   ipip/ipip.h
707 )
708
709 list(APPEND VNET_API_FILES
710   ipip/ipip.api
711 )
712
713 ##############################################################################
714 # Tunnel infra
715 ##############################################################################
716 list(APPEND VNET_SOURCES
717   tunnel/tunnel.c
718   tunnel/tunnel_types_api.c
719 )
720
721 list(APPEND VNET_API_FILES
722   tunnel/tunnel_types.api
723 )
724
725 list(APPEND VNET_HEADERS
726   tunnel/tunnel.h
727   tunnel/tunnel_dp.h
728   tunnel/tunnel_types_api.h
729 )
730
731 ##############################################################################
732 # Tunnel protocol: gre+mpls
733 ##############################################################################
734 list(APPEND VNET_SOURCES
735   mpls/mpls.c
736   mpls/mpls_lookup.c
737   mpls/mpls_output.c
738   mpls/mpls_features.c
739   mpls/mpls_input.c
740   mpls/interface.c
741   mpls/mpls_tunnel.c
742   mpls/pg.c
743   mpls/mpls_api.c
744 )
745
746 list(APPEND VNET_MULTIARCH_SOURCES
747   mpls/mpls_output.c
748   mpls/mpls_input.c
749   mpls/mpls_lookup.c
750   mpls/mpls_features.c
751 )
752
753 list(APPEND VNET_HEADERS
754   mpls/mpls.h
755   mpls/mpls_lookup.h
756   mpls/mpls_types.h
757   mpls/mpls_tunnel.h
758   mpls/packet.h
759 )
760
761 list(APPEND VNET_API_FILES mpls/mpls.api)
762
763 ##############################################################################
764 # Tunnel protocol: vxlan-gpe
765 ##############################################################################
766
767 list(APPEND VNET_SOURCES
768   vxlan-gpe/vxlan_gpe.c
769   vxlan-gpe/encap.c
770   vxlan-gpe/decap.c
771   vxlan-gpe/vxlan_gpe_api.c
772 )
773
774 list (APPEND VNET_MULTIARCH_SOURCES
775   vxlan-gpe/decap.c
776 )
777
778 list(APPEND VNET_HEADERS
779   vxlan-gpe/vxlan_gpe.h
780   vxlan-gpe/vxlan_gpe_packet.h
781   vxlan-gpe/vxlan_gpe_error.def
782 )
783
784 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
785
786 ##############################################################################
787 # ipv6 segment routing
788 ##############################################################################
789
790 list(APPEND VNET_SOURCES
791   srv6/sr.c
792   srv6/sr_localsid.c
793   srv6/sr_policy_rewrite.c
794   srv6/sr_steering.c
795   srv6/sr_api.c
796   srv6/sr_pt.c
797   srv6/sr_pt_node.c
798   srv6/sr_pt_api.c
799 )
800
801 list(APPEND VNET_HEADERS
802   srv6/sr_packet.h
803   srv6/sr.h
804   srv6/sr_pt.h
805 )
806
807 list(APPEND VNET_API_FILES
808   srv6/sr.api
809   srv6/sr_types.api
810   srv6/sr_pt.api
811 )
812
813 ##############################################################################
814 # mpls segment routing
815 ##############################################################################
816
817 list(APPEND VNET_SOURCES
818   srmpls/sr_mpls_policy.c
819   srmpls/sr_mpls_steering.c
820   srmpls/sr_mpls_api.c
821 )
822
823 list(APPEND VNET_HEADERS
824   srmpls/sr_mpls.h
825 )
826
827 list(APPEND VNET_API_FILES
828   srmpls/sr_mpls.api
829 )
830
831 ##############################################################################
832 # IPFIX / netflow v10
833 ##############################################################################
834 list(APPEND VNET_SOURCES
835   ipfix-export/flow_report.c
836   ipfix-export/flow_api.c
837 )
838
839 list(APPEND VNET_HEADERS
840   ipfix-export/flow_report.h
841   ipfix-export/ipfix_info_elements.h
842   ipfix-export/ipfix_packet.h
843 )
844
845 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
846
847 ##############################################################################
848 # HASH
849 ##############################################################################
850 list(APPEND VNET_SOURCES
851   hash/hash.c
852   hash/cli.c
853   hash/crc32_5tuple.c
854   hash/handoff_eth.c
855   hash/hash_eth.c
856 )
857
858 list(APPEND VNET_HEADERS
859   hash/hash.h
860 )
861
862 ##############################################################################
863 # GSO
864 ##############################################################################
865 list(APPEND VNET_SOURCES
866   gso/cli.c
867   gso/gso.c
868   gso/gso_api.c
869   gso/node.c
870 )
871
872 list(APPEND VNET_HEADERS
873   gso/gro.h
874   gso/gro_func.h
875   gso/hdr_offset_parser.h
876   gso/gso.h
877 )
878
879 list(APPEND VNET_API_FILES
880   gso/gso.api
881 )
882
883 ##############################################################################
884 # IPFIX classify code
885 ##############################################################################
886
887 list(APPEND VNET_SOURCES
888   ipfix-export/flow_report_classify.c
889 )
890
891 list(APPEND VNET_HEADERS
892   ipfix-export/flow_report_classify.h
893 )
894
895 ##############################################################################
896 # lawful intercept
897 ##############################################################################
898
899 list(APPEND VNET_SOURCES
900   lawful-intercept/lawful_intercept.c
901   lawful-intercept/node.c
902 )
903
904 list(APPEND VNET_MULTIARCH_SOURCES
905   lawful-intercept/node.c
906 )
907
908 list(APPEND VNET_HEADERS
909   lawful-intercept/lawful_intercept.h
910 )
911
912 ##############################################################################
913 # SPAN (port mirroring)
914 ##############################################################################
915
916 list(APPEND VNET_SOURCES
917   span/span_api.c
918   span/span.c
919   span/node.c
920 )
921
922 list(APPEND VNET_MULTIARCH_SOURCES
923   span/node.c
924 )
925
926 list(APPEND VNET_HEADERS
927   span/span.h
928 )
929
930 list(APPEND VNET_API_FILES span/span.api)
931
932 ##############################################################################
933 # Packet generator
934 ##############################################################################
935
936 list(APPEND VNET_SOURCES
937   pg/cli.c
938   pg/edit.c
939   pg/init.c
940   pg/input.c
941   pg/output.c
942   pg/stream.c
943   pg/pg_api.c
944 )
945
946 list(APPEND VNET_HEADERS
947   pg/pg.h
948   pg/edit.h
949 )
950
951 list(APPEND VNET_API_FILES pg/pg.api)
952
953 ##############################################################################
954 # virtio
955 ##############################################################################
956
957 list(APPEND VNET_SOURCES
958   devices/virtio/cli.c
959   devices/virtio/device.c
960   devices/virtio/format.c
961   devices/virtio/node.c
962   devices/virtio/pci.c
963   devices/virtio/virtio.c
964   devices/virtio/virtio_api.c
965   devices/virtio/virtio_pci_legacy.c
966   devices/virtio/virtio_pci_modern.c
967   devices/virtio/virtio_pre_input.c
968   devices/virtio/virtio_types_api.c
969 )
970
971 list(APPEND VNET_HEADERS
972   devices/virtio/pci.h
973   devices/virtio/virtio.h
974   devices/virtio/virtio_buffering.h
975   devices/virtio/virtio_std.h
976   devices/virtio/virtio_pci_legacy.h
977   devices/virtio/virtio_pci_modern.h
978   devices/virtio/vhost_std.h
979   devices/virtio/virtio_types_api.h
980 )
981
982 list(APPEND VNET_MULTIARCH_SOURCES
983   devices/virtio/node.c
984   devices/virtio/device.c
985 )
986
987 list(APPEND VNET_API_FILES
988   devices/virtio/virtio.api
989   devices/virtio/virtio_types.api
990 )
991
992 ##############################################################################
993 # tap interface (with virtio backend)
994 ##############################################################################
995
996 list(APPEND VNET_SOURCES
997   devices/tap/cli.c
998   devices/tap/tap.c
999   devices/tap/tapv2_api.c
1000 )
1001
1002 list(APPEND VNET_HEADERS
1003   devices/tap/tap.h
1004 )
1005
1006 list(APPEND VNET_API_FILES
1007   devices/tap/tapv2.api
1008 )
1009
1010 ##############################################################################
1011 # tap interface (with virtio backend)
1012 ##############################################################################
1013
1014 list(APPEND VNET_SOURCES
1015   devices/pipe/pipe_api.c
1016   devices/pipe/pipe.c
1017 )
1018
1019 list(APPEND VNET_HEADERS
1020   devices/pipe/pipe.h
1021 )
1022
1023 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1024
1025 ##############################################################################
1026 # session managmeent
1027 ##############################################################################
1028
1029 list(APPEND VNET_SOURCES
1030   session/session.c
1031   session/session_debug.c
1032   session/session_table.c
1033   session/session_rules_table.c
1034   session/session_lookup.c
1035   session/session_node.c
1036   session/session_input.c
1037   session/transport.c
1038   session/application.c
1039   session/application_worker.c
1040   session/session_cli.c
1041   session/application_interface.c
1042   session/application_local.c
1043   session/application_namespace.c
1044   session/segment_manager.c
1045   session/session_api.c
1046 )
1047
1048 list(APPEND VNET_HEADERS
1049   session/session.h
1050   session/session_table.h
1051   session/session_rules_table.h
1052   session/session_types.h
1053   session/session_lookup.h
1054   session/application.h
1055   session/transport.h
1056   session/transport_types.h
1057   session/application_interface.h
1058   session/application_local.h
1059   session/application_namespace.h
1060   session/session_debug.h
1061   session/segment_manager.h
1062   session/mma_template.h
1063   session/mma_template.c
1064   session/mma_16.h
1065   session/mma_40.h
1066 )
1067
1068 list(APPEND VNET_API_FILES session/session.api)
1069
1070 ##############################################################################
1071 # TLS protocol
1072 ##############################################################################
1073
1074 list(APPEND VNET_SOURCES
1075   tls/tls.c
1076 )
1077
1078 list(APPEND VNET_HEADERS
1079   tls/tls.h
1080   tls/tls_test.h
1081 )
1082
1083
1084 ##############################################################################
1085 # Driver feature graph arc support
1086 ##############################################################################
1087
1088 list(APPEND VNET_SOURCES
1089   feature/feature.c
1090   feature/feature_api.c
1091   feature/registration.c
1092 )
1093
1094 list(APPEND VNET_HEADERS
1095   feature/feature.h
1096 )
1097
1098 list(APPEND VNET_API_FILES feature/feature.api)
1099
1100 ##############################################################################
1101 # Unix kernel related
1102 ##############################################################################
1103
1104 # FIXME: unix/hgshm.c
1105
1106 list(APPEND VNET_SOURCES
1107   unix/gdb_funcs.c
1108   unix/tuntap.c
1109 )
1110
1111 list(APPEND VNET_HEADERS
1112   unix/tuntap.h
1113 )
1114
1115 ##############################################################################
1116 # FIB
1117 ##############################################################################
1118
1119 list(APPEND VNET_SOURCES
1120   fib/fib.c
1121   fib/ip4_fib_hash.c
1122   fib/ip4_fib.c
1123   fib/ip4_fib_16.c
1124   fib/ip4_fib_8.c
1125   fib/ip6_fib.c
1126   fib/mpls_fib.c
1127   fib/fib_table.c
1128   fib/fib_walk.c
1129   fib/fib_types.c
1130   fib/fib_node.c
1131   fib/fib_node_list.c
1132   fib/fib_entry.c
1133   fib/fib_entry_src.c
1134   fib/fib_entry_src_adj.c
1135   fib/fib_entry_src_api.c
1136   fib/fib_entry_src_drop.c
1137   fib/fib_entry_src_interface.c
1138   fib/fib_entry_src_interpose.c
1139   fib/fib_entry_src_lisp.c
1140   fib/fib_entry_src_mpls.c
1141   fib/fib_entry_src_simple.c
1142   fib/fib_entry_src_rr.c
1143   fib/fib_entry_cover.c
1144   fib/fib_entry_delegate.c
1145   fib/fib_entry_track.c
1146   fib/fib_path_list.c
1147   fib/fib_path.c
1148   fib/fib_path_ext.c
1149   fib/fib_sas.c
1150   fib/fib_source.c
1151   fib/fib_urpf_list.c
1152   fib/fib_attached_export.c
1153   fib/fib_api.c
1154   fib/fib_bfd.c
1155 )
1156
1157 list(APPEND VNET_HEADERS
1158   fib/fib.h
1159   fib/fib_api.h
1160   fib/fib_entry_track.h
1161   fib/ip4_fib.h
1162   fib/ip4_fib_8.h
1163   fib/ip4_fib_16.h
1164   fib/ip4_fib_hash.h
1165   fib/ip6_fib.h
1166   fib/fib_types.h
1167   fib/fib_table.h
1168   fib/fib_node.h
1169   fib/fib_node_list.h
1170   fib/fib_entry.h
1171   fib/fib_entry_delegate.h
1172   fib/fib_path.h
1173   fib/fib_path_list.h
1174   fib/fib_sas.h
1175   fib/fib_source.h
1176 )
1177
1178 list(APPEND VNET_API_FILES
1179   fib/fib_types.api
1180   fib/fib.api
1181 )
1182
1183 ##############################################################################
1184 # ADJ
1185 ##############################################################################
1186
1187 list(APPEND VNET_SOURCES
1188   adj/adj_nbr.c
1189   adj/adj_glean.c
1190   adj/adj_midchain.c
1191   adj/adj_midchain_node.c
1192   adj/adj_midchain_delegate.c
1193   adj/adj_mcast.c
1194   adj/adj_l2.c
1195   adj/adj_nsh.c
1196   adj/adj.c
1197   adj/rewrite.c
1198   adj/adj_bfd.c
1199   adj/adj_delegate.c
1200 )
1201
1202 list(APPEND VNET_MULTIARCH_SOURCES
1203   adj/adj_nsh.c
1204   adj/adj_l2.c
1205   adj/adj_midchain_node.c
1206 )
1207
1208 list(APPEND VNET_HEADERS
1209   adj/adj.h
1210   adj/adj_types.h
1211   adj/adj_glean.h
1212   adj/adj_nsh.h
1213   adj/adj_nbr.h
1214   adj/adj_midchain.h
1215   adj/rewrite.h
1216 )
1217
1218 ##############################################################################
1219 # Data-Plane Objects
1220 ##############################################################################
1221
1222 list(APPEND VNET_SOURCES
1223   dpo/dpo.c
1224   dpo/drop_dpo.c
1225   dpo/ip_null_dpo.c
1226   dpo/ip6_ll_dpo.c
1227   dpo/punt_dpo.c
1228   dpo/receive_dpo.c
1229   dpo/load_balance.c
1230   dpo/load_balance_map.c
1231   dpo/lookup_dpo.c
1232   dpo/classify_dpo.c
1233   dpo/replicate_dpo.c
1234   dpo/interface_rx_dpo.c
1235   dpo/interface_tx_dpo.c
1236   dpo/mpls_disposition.c
1237   dpo/mpls_label_dpo.c
1238   dpo/l3_proxy_dpo.c
1239   dpo/dvr_dpo.c
1240   dpo/pw_cw.c
1241 )
1242
1243 list(APPEND VNET_MULTIARCH_SOURCES
1244   dpo/lookup_dpo.h
1245   dpo/mpls_disposition.c
1246   dpo/dvr_dpo.c
1247   dpo/mpls_label_dpo.c
1248   dpo/interface_rx_dpo.c
1249 )
1250
1251 list(APPEND VNET_HEADERS
1252   dpo/load_balance.h
1253   dpo/load_balance_map.h
1254   dpo/drop_dpo.h
1255   dpo/lookup_dpo.h
1256   dpo/punt_dpo.h
1257   dpo/classify_dpo.h
1258   dpo/receive_dpo.h
1259   dpo/ip_null_dpo.h
1260   dpo/replicate_dpo.h
1261   dpo/dpo.h
1262 )
1263
1264 ##############################################################################
1265 # Multicast FIB
1266 ##############################################################################
1267
1268 list(APPEND VNET_SOURCES
1269   mfib/mfib_forward.c
1270   mfib/ip4_mfib.c
1271   mfib/ip6_mfib.c
1272   mfib/mfib_api.c
1273   mfib/mfib_types.c
1274   mfib/mfib_signal.c
1275   mfib/mfib_itf.c
1276   mfib/mfib_entry.c
1277   mfib/mfib_entry.c
1278   mfib/mfib_entry_cover.c
1279   mfib/mfib_entry_delegate.c
1280   mfib/mfib_entry_src.c
1281   mfib/mfib_entry_src_rr.c
1282   mfib/mfib_table.c
1283 )
1284
1285 list(APPEND VNET_MULTIARCH_SOURCES
1286   mfib/mfib_forward.c
1287 )
1288
1289 list(APPEND VNET_HEADERS
1290   mfib/ip4_mfib.h
1291   mfib/mfib_types.h
1292   mfib/mfib_table.h
1293 )
1294
1295 list(APPEND VNET_API_FILES mfib/mfib_types.api)
1296
1297 ##############################################################################
1298 # Utilities
1299 ##############################################################################
1300
1301 list(APPEND VNET_SOURCES
1302   util/radix.c
1303   util/refcount.c
1304   util/throttle.c
1305 )
1306
1307 list(APPEND VNET_HEADERS
1308   util/throttle.h
1309 )
1310
1311 ##############################################################################
1312 # QoS
1313 ##############################################################################
1314
1315 list(APPEND VNET_SOURCES
1316   qos/qos_types.c
1317   qos/qos_api.c
1318   qos/qos_egress_map.c
1319   qos/qos_record.c
1320   qos/qos_record_node.c
1321   qos/qos_store.c
1322   qos/qos_store_node.c
1323   qos/qos_mark.c
1324   qos/qos_mark_node.c
1325 )
1326
1327 list(APPEND VNET_MULTIARCH_SOURCES
1328   qos/qos_record_node.c
1329   qos/qos_mark_node.c
1330 )
1331
1332 list(APPEND VNET_API_FILES qos/qos.api)
1333
1334 ##############################################################################
1335 # BIER
1336 ##############################################################################
1337
1338 list(APPEND VNET_SOURCES
1339   bier/bier_bit_string.c
1340   bier/bier_entry.c
1341   bier/bier_fmask.c
1342   bier/bier_fmask_db.c
1343   bier/bier_input.c
1344   bier/bier_lookup.c
1345   bier/bier_output.c
1346   bier/bier_table.c
1347   bier/bier_types.c
1348   bier/bier_api.c
1349   bier/bier_drop.c
1350   bier/bier_update.c
1351   bier/bier_imp_node.c
1352   bier/bier_imp.c
1353   bier/bier_disp_entry.c
1354   bier/bier_disp_lookup_node.c
1355   bier/bier_disp_dispatch_node.c
1356   bier/bier_disp_table.c
1357   bier/bier_bift_table.c
1358 )
1359
1360 list(APPEND VNET_MULTIARCH_SOURCES
1361   bier/bier_disp_dispatch_node.c
1362   bier/bier_disp_lookup_node.c
1363   bier/bier_imp_node.c
1364 )
1365
1366 list(APPEND VNET_HEADERS
1367   bier/bier_bit_string.h
1368   bier/bier_entry.h
1369   bier/bier_fwd.h
1370   bier/bier_hdr_inlines.h
1371   bier/bier_update.h
1372   bier/bier_table.h
1373   bier/bier_types.h
1374 )
1375
1376 list(APPEND VNET_API_FILES bier/bier.api)
1377
1378 ##############################################################################
1379 # SYSLOG
1380 ##############################################################################
1381
1382 list (APPEND VNET_SOURCES
1383   syslog/syslog_api.c
1384   syslog/syslog_udp.c
1385   syslog/syslog.c
1386 )
1387
1388 list(APPEND VNET_HEADERS
1389   syslog/syslog_udp.h
1390   syslog/syslog.h
1391 )
1392
1393 list(APPEND VNET_API_FILES syslog/syslog.api)
1394
1395 ##############################################################################
1396 # Tunnel Endpoint Information Base
1397 ##############################################################################
1398
1399 list (APPEND VNET_SOURCES
1400   teib/teib_api.c
1401   teib/teib_cli.c
1402   teib/teib.c
1403 )
1404
1405 list(APPEND VNET_HEADERS
1406   teib/teib.h
1407 )
1408
1409 list(APPEND VNET_API_FILES teib/teib.api)
1410
1411 ##############################################################################
1412 # ARP/ND
1413 ##############################################################################
1414
1415 list (APPEND VNET_SOURCES
1416   arp/arp_api.c
1417   arp/arp.c
1418   arp/arp_proxy.c
1419 )
1420
1421 list(APPEND VNET_HEADERS
1422   arp/arp.h
1423 )
1424
1425 list(APPEND VNET_API_FILES arp/arp.api)
1426
1427 list (APPEND VNET_SOURCES
1428   ip6-nd/ip6_mld.c
1429   ip6-nd/ip6_nd.c
1430   ip6-nd/ip6_nd_api.c
1431   ip6-nd/ip6_nd_proxy.c
1432   ip6-nd/ip6_nd_mirror_proxy.c
1433   ip6-nd/ip6_ra.c
1434   ip6-nd/rd_cp.c
1435   ip6-nd/rd_cp_api.c
1436 )
1437
1438 list(APPEND VNET_HEADERS
1439   ip6-nd/ip6_nd.h
1440 )
1441
1442 list(APPEND VNET_API_FILES
1443   ip6-nd/ip6_nd.api
1444   ip6-nd/rd_cp.api
1445 )
1446
1447 ##############################################################################
1448 # VNET Library
1449 ##############################################################################
1450
1451 add_vpp_library(vnet
1452   SOURCES ${VNET_SOURCES}
1453   MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1454   INSTALL_HEADERS ${VNET_HEADERS}
1455   API_FILES ${VNET_API_FILES}
1456   LINK_LIBRARIES vppinfra svm vlib
1457   DEPENDS vpp_version_h api_headers
1458 )
1459
1460 ##############################################################################
1461 # vpp api test client library
1462 ##############################################################################
1463
1464 add_vpp_library (vatclient
1465   SOURCES ip/ip_types_api.c
1466   DEPENDS api_headers
1467 )
1468
1469 add_vat_test_library(vnet
1470   interface_test.c
1471   ip/ip_test.c
1472   arp/arp_test.c
1473   ip6-nd/ip6_nd_test.c
1474   srmpls/sr_mpls_test.c
1475   session/session_test.c
1476   l2/l2_test.c
1477   ipsec/ipsec_test.c
1478 )
1479
1480 ##############################################################################
1481 # VAT2 plugins
1482 ##############################################################################
1483 add_vpp_test_library(vnet
1484   ${VNET_API_FILES}
1485 )
1486
1487 ##############################################################################