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