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