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