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