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