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