deprecate VLIB_NODE_FUNCTION_MULTIARCH
[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 # Layer 3 protocol: IPSec
535 ##############################################################################
536 list(APPEND VNET_SOURCES
537   ipsec/ipsec.c
538   ipsec/ipsec_cli.c
539   ipsec/ipsec_format.c
540   ipsec/ipsec_input.c
541   ipsec/ipsec_if.c
542   ipsec/ipsec_if_in.c
543   ipsec/ipsec_sa.c
544   ipsec/ipsec_spd.c
545   ipsec/ipsec_spd_policy.c
546   ipsec/esp_format.c
547   ipsec/esp_encrypt.c
548   ipsec/esp_decrypt.c
549   ipsec/ah_decrypt.c
550   ipsec/ah_encrypt.c
551   ipsec/ipsec_api.c
552 )
553
554 list(APPEND VNET_MULTIARCH_SOURCES
555   ipsec/esp_encrypt.c
556   ipsec/esp_decrypt.c
557   ipsec/ah_decrypt.c
558   ipsec/ah_encrypt.c
559   ipsec/ipsec_if_in.c
560   ipsec/ipsec_output.c
561   ipsec/ipsec_input.c
562 )
563
564 list(APPEND VNET_API_FILES ipsec/ipsec.api)
565
566 list(APPEND VNET_SOURCES
567   ipsec/ipsec_output.c
568 )
569
570 list(APPEND VNET_HEADERS
571   ipsec/ipsec.h
572   ipsec/ipsec_spd.h
573   ipsec/ipsec_spd_policy.h
574   ipsec/ipsec_sa.h
575   ipsec/ipsec_if.h
576   ipsec/esp.h
577   ipsec/ah.h
578 )
579
580 ##############################################################################
581 # Layer 3 protocol: osi
582 ##############################################################################
583 list(APPEND VNET_SOURCES
584   osi/node.c
585   osi/osi.c
586   osi/pg.c
587 )
588
589 list(APPEND VNET_HEADERS
590   osi/osi.h
591 )
592
593 ##############################################################################
594 # Layer 4 protocol: tcp
595 ##############################################################################
596 list(APPEND VNET_SOURCES
597   tcp/tcp_api.c
598   tcp/tcp_format.c
599   tcp/tcp_pg.c
600   tcp/tcp_syn_filter4.c
601   tcp/tcp_output.c
602   tcp/tcp_input.c
603   tcp/tcp_newreno.c
604   tcp/tcp_cubic.c
605   tcp/tcp.c
606 )
607
608 list(APPEND VNET_MULTIARCH_SOURCES
609   tcp/tcp_input.c
610   tcp/tcp_output.c
611   tcp/tcp_syn_filter4.c
612 )
613
614 list(APPEND VNET_HEADERS
615   tcp/tcp_packet.h
616   tcp/tcp_timer.h
617   tcp/tcp_debug.h
618   tcp/tcp.h
619   tcp/tcp_error.def
620 )
621
622 list(APPEND VNET_API_FILES tcp/tcp.api)
623
624 ##############################################################################
625 # Layer 4 protocol: udp
626 ##############################################################################
627 list(APPEND VNET_SOURCES
628   udp/udp.c
629   udp/udp_input.c
630   udp/udp_format.c
631   udp/udp_local.c
632   udp/udp_pg.c
633   udp/udp_encap_node.c
634   udp/udp_encap.c
635   udp/udp_api.c
636 )
637
638 list(APPEND VNET_MULTIARCH_SOURCES
639   udp/udp_local.c
640   udp/udp_encap_node.c
641 )
642
643 list(APPEND VNET_HEADERS
644   udp/udp_error.def
645   udp/udp.h
646   udp/udp_packet.h
647 )
648
649 list(APPEND VNET_API_FILES udp/udp.api)
650
651 ##############################################################################
652 # Layer 4 protocol: sctp
653 ##############################################################################
654 list(APPEND VNET_SOURCES
655   sctp/sctp_api.c
656   sctp/sctp.c
657   sctp/sctp_pg.c
658   sctp/sctp_input.c
659   sctp/sctp_output.c
660   sctp/sctp_output_node.c
661   sctp/sctp_format.c
662 )
663
664 list(APPEND VNET_MULTIARCH_SOURCES
665   sctp/sctp_output_node.c
666   sctp/sctp_input.c
667 )
668
669 list(APPEND VNET_HEADERS
670   sctp/sctp_error.def
671   sctp/sctp_packet.h
672   sctp/sctp_timer.h
673   sctp/sctp.h
674 )
675
676 list(APPEND VNET_API_FILES sctp/sctp.api)
677
678 ##############################################################################
679 # Tunnel protocol: gre
680 ##############################################################################
681 list(APPEND VNET_SOURCES
682   gre/gre.c
683   gre/node.c
684   gre/interface.c
685   gre/pg.c
686   gre/gre_api.c
687 )
688
689 list(APPEND VNET_MULTIARCH_SOURCES
690   gre/node.c
691   gre/gre.c
692 )
693
694 list(APPEND VNET_HEADERS
695   gre/gre.h
696   gre/packet.h
697   gre/error.def
698 )
699
700 list(APPEND VNET_API_FILES gre/gre.api)
701
702 ##############################################################################
703 # Tunnel protocol: ipip
704 ##############################################################################
705 list(APPEND VNET_SOURCES
706   ipip/ipip.c
707   ipip/node.c
708   ipip/sixrd.c
709   ipip/ipip_api.c
710   ipip/ipip_cli.c
711 )
712
713 list(APPEND VNET_MULTIARCH_SOURCES
714   ipip/node.c
715 )
716
717 list(APPEND VNET_HEADERS
718   ipip/ipip.h
719 )
720
721 list(APPEND VNET_API_FILES ipip/ipip.api)
722
723 ##############################################################################
724 # Tunnel protocol: l2tpv3
725 ##############################################################################
726 list(APPEND VNET_SOURCES
727   l2tp/l2tp.c
728   l2tp/encap.c
729   l2tp/decap.c
730   l2tp/pg.c
731   l2tp/l2tp_api.c
732 )
733
734 list(APPEND VNET_MULTIARCH_SOURCES
735   l2tp/encap.c
736   l2tp/decap.c
737 )
738
739 list(APPEND VNET_HEADERS
740   l2tp/l2tp.h
741   l2tp/packet.h
742 )
743
744 list(APPEND VNET_API_FILES l2tp/l2tp.api)
745
746 ##############################################################################
747 # Tunnel protocol: gre+mpls
748 ##############################################################################
749 list(APPEND VNET_SOURCES
750   mpls/mpls.c
751   mpls/mpls_lookup.c
752   mpls/mpls_output.c
753   mpls/mpls_features.c
754   mpls/mpls_input.c
755   mpls/interface.c
756   mpls/mpls_tunnel.c
757   mpls/pg.c
758   mpls/mpls_api.c
759 )
760
761 list(APPEND VNET_MULTIARCH_SOURCES
762   mpls/mpls_output.c
763   mpls/mpls_input.c
764   mpls/mpls_lookup.c
765   mpls/mpls_features.c
766 )
767
768 list(APPEND VNET_HEADERS
769   mpls/mpls.h
770   mpls/mpls_types.h
771   mpls/mpls_tunnel.h
772   mpls/packet.h
773   mpls/error.def
774 )
775
776 list(APPEND VNET_API_FILES mpls/mpls.api)
777
778 ##############################################################################
779 # Tunnel protocol: vxlan-gbp
780 ##############################################################################
781 list(APPEND VNET_SOURCES
782   vxlan-gbp/decap.c
783   vxlan-gbp/encap.c
784   vxlan-gbp/vxlan_gbp_api.c
785   vxlan-gbp/vxlan_gbp.c
786   vxlan-gbp/vxlan_gbp_packet.c
787 )
788
789 list (APPEND VNET_MULTIARCH_SOURCES
790   vxlan-gbp/decap.c
791   vxlan-gbp/encap.c
792 )
793
794 list(APPEND VNET_HEADERS
795   vxlan-gbp/vxlan_gbp.h
796   vxlan-gbp/vxlan_gbp_packet.h
797   vxlan-gbp/vxlan_gbp_error.def
798 )
799
800 list(APPEND VNET_API_FILES vxlan-gbp/vxlan_gbp.api)
801
802 ##############################################################################
803 # Tunnel protocol: vxlan-gpe
804 ##############################################################################
805
806 list(APPEND VNET_SOURCES
807   vxlan-gpe/vxlan_gpe.c
808   vxlan-gpe/encap.c
809   vxlan-gpe/decap.c
810   vxlan-gpe/vxlan_gpe_api.c
811 )
812
813 list (APPEND VNET_MULTIARCH_SOURCES
814   vxlan-gpe/decap.c
815 )
816
817 list(APPEND VNET_HEADERS
818   vxlan-gpe/vxlan_gpe.h
819   vxlan-gpe/vxlan_gpe_packet.h
820   vxlan-gpe/vxlan_gpe_error.def
821 )
822
823 list(APPEND VNET_API_FILES vxlan-gpe/vxlan_gpe.api)
824
825 ##############################################################################
826 # Tunnel protocol: ipsec+gre
827 ##############################################################################
828 list(APPEND VNET_SOURCES
829   ipsec-gre/ipsec_gre.c
830   ipsec-gre/node.c
831   ipsec-gre/interface.c
832   ipsec-gre/ipsec_gre_api.c
833 )
834
835 list(APPEND VNET_MULTIARCH_SOURCES
836   ipsec-gre/node.c
837 )
838
839 list(APPEND VNET_HEADERS
840   ipsec-gre/ipsec_gre.h
841   ipsec-gre/error.def
842 )
843
844 list(APPEND VNET_API_FILES ipsec-gre/ipsec_gre.api)
845
846 ##############################################################################
847 # LISP control plane: lisp-cp
848 ##############################################################################
849
850 list(APPEND VNET_SOURCES
851   lisp-cp/lisp_types.c
852   lisp-cp/lisp_cp_dpo.c
853   lisp-cp/control.c
854   lisp-cp/gid_dictionary.c
855   lisp-cp/lisp_msg_serdes.c
856   lisp-cp/packets.c
857   lisp-cp/one_cli.c
858   lisp-cp/lisp_cli.c
859   lisp-cp/one_api.c
860   lisp-cp/lisp_api.c
861 )
862
863 list(APPEND VNET_HEADERS
864   lisp-cp/lisp_types.h
865   lisp-cp/packets.h
866   lisp-cp/gid_dictionary.h
867   lisp-cp/lisp_cp_messages.h
868   lisp-cp/lisp_msg_serdes.h
869   lisp-cp/control.h
870 )
871
872 list(APPEND VNET_API_FILES lisp-cp/lisp.api)
873 list(APPEND VNET_API_FILES lisp-cp/one.api)
874
875 ##############################################################################
876 # Tunnel protocol: lisp-gpe
877 ##############################################################################
878
879 list(APPEND VNET_SOURCES
880   lisp-gpe/lisp_gpe.c
881   lisp-gpe/lisp_gpe_sub_interface.c
882   lisp-gpe/lisp_gpe_adjacency.c
883   lisp-gpe/lisp_gpe_tunnel.c
884   lisp-gpe/lisp_gpe_fwd_entry.c
885   lisp-gpe/lisp_gpe_tenant.c
886   lisp-gpe/interface.c
887   lisp-gpe/decap.c
888   lisp-gpe/lisp_gpe_api.c
889 )
890
891 list(APPEND VNET_HEADERS
892   lisp-gpe/lisp_gpe.h
893   lisp-gpe/lisp_gpe_fwd_entry.h
894   lisp-gpe/lisp_gpe_tenant.h
895   lisp-gpe/lisp_gpe_packet.h
896   lisp-gpe/lisp_gpe_error.def
897 )
898
899 list(APPEND VNET_API_FILES lisp-gpe/lisp_gpe.api)
900
901 ##############################################################################
902 # DHCP client
903 ##############################################################################
904 list(APPEND VNET_SOURCES
905   dhcp/client.c
906   dhcp/dhcp_client_detect.c
907   dhcp/dhcp6_client_common_dp.c
908   dhcp/dhcp6_pd_client_dp.c
909   dhcp/dhcp6_pd_client_cp.c
910   dhcp/dhcp6_ia_na_client_dp.c
911   dhcp/dhcp6_ia_na_client_cp.c
912   dhcp/dhcp_api.c
913 )
914
915 list(APPEND VNET_MULTIARCH_SOURCES
916   dhcp/dhcp_client_detect.c
917 )
918
919 list(APPEND VNET_HEADERS
920   dhcp/client.h
921   dhcp/dhcp6_client_common_dp.h
922   dhcp/dhcp6_pd_client_dp.h
923   dhcp/dhcp6_ia_na_client_dp.h
924 )
925
926 list(APPEND VNET_API_FILES
927   dhcp/dhcp.api
928   dhcp/dhcp6_pd_client_cp.api
929   dhcp/dhcp6_ia_na_client_cp.api
930 )
931
932 ##############################################################################
933 # DHCP proxy
934 ##############################################################################
935 list(APPEND VNET_SOURCES
936   dhcp/dhcp6_proxy_node.c
937   dhcp/dhcp4_proxy_node.c
938   dhcp/dhcp_proxy.c
939 )
940
941 list(APPEND VNET_HEADERS
942   dhcp/dhcp4_packet.h
943   dhcp/dhcp6_packet.h
944   dhcp/dhcp_proxy.h
945   dhcp/dhcp6_proxy_error.def
946   dhcp/dhcp4_proxy_error.def
947 )
948
949 ##############################################################################
950 # ipv6 segment routing
951 ##############################################################################
952
953 list(APPEND VNET_SOURCES
954   srv6/sr.c
955   srv6/sr_localsid.c
956   srv6/sr_policy_rewrite.c
957   srv6/sr_steering.c
958   srv6/sr_api.c
959 )
960
961 list(APPEND VNET_HEADERS
962   srv6/sr_packet.h
963   srv6/sr.h
964 )
965
966 list(APPEND VNET_API_FILES srv6/sr.api)
967
968 ##############################################################################
969 # mpls segment routing
970 ##############################################################################
971
972 list(APPEND VNET_SOURCES
973   srmpls/sr_mpls_policy.c
974   srmpls/sr_mpls_steering.c
975   srmpls/sr_mpls_api.c
976 )
977
978 list(APPEND VNET_HEADERS
979   srmpls/sr_mpls.h
980 )
981
982 list(APPEND VNET_API_FILES srmpls/sr_mpls.api)
983
984 ##############################################################################
985 # IPFIX / netflow v10
986 ##############################################################################
987 list(APPEND VNET_SOURCES
988   ipfix-export/flow_report.c
989   ipfix-export/flow_api.c
990 )
991
992 list(APPEND VNET_HEADERS
993   ipfix-export/flow_report.h
994   ipfix-export/ipfix_info_elements.h
995   ipfix-export/ipfix_packet.h
996 )
997
998 list(APPEND VNET_API_FILES ipfix-export/ipfix_export.api)
999
1000 ##############################################################################
1001 # IPFIX classify code
1002 ##############################################################################
1003
1004 list(APPEND VNET_SOURCES
1005   ipfix-export/flow_report_classify.c
1006 )
1007
1008 list(APPEND VNET_HEADERS
1009   ipfix-export/flow_report_classify.h
1010 )
1011
1012 ##############################################################################
1013 # lawful intercept
1014 ##############################################################################
1015
1016 list(APPEND VNET_SOURCES
1017   lawful-intercept/lawful_intercept.c
1018   lawful-intercept/node.c
1019 )
1020
1021 list(APPEND VNET_MULTIARCH_SOURCES
1022   lawful-intercept/node.c
1023 )
1024
1025 list(APPEND VNET_HEADERS
1026   lawful-intercept/lawful_intercept.h
1027 )
1028
1029 ##############################################################################
1030 # SPAN (port mirroring)
1031 ##############################################################################
1032
1033 list(APPEND VNET_SOURCES
1034   span/span_api.c
1035   span/span.c
1036   span/node.c
1037 )
1038
1039 list(APPEND VNET_MULTIARCH_SOURCES
1040   span/node.c
1041 )
1042
1043 list(APPEND VNET_HEADERS
1044   span/span.h
1045 )
1046
1047 list(APPEND VNET_API_FILES span/span.api)
1048
1049 ##############################################################################
1050 # DNS proxy, API
1051 ##############################################################################
1052 list(APPEND VNET_SOURCES
1053   dns/dns.c
1054   dns/dns.h
1055   dns/dns_packet.h
1056   dns/reply_node.c
1057   dns/request_node.c
1058   dns/resolver_process.c
1059 )
1060
1061 list(APPEND VNET_HEADERS
1062   dns/dns.h
1063 )
1064
1065 list(APPEND VNET_API_FILES dns/dns.api)
1066
1067 ##############################################################################
1068 # Packet generator
1069 ##############################################################################
1070
1071 list(APPEND VNET_SOURCES
1072   pg/cli.c
1073   pg/edit.c
1074   pg/init.c
1075   pg/input.c
1076   pg/output.c
1077   pg/stream.c
1078   pg/pg_api.c
1079 )
1080
1081 list(APPEND VNET_HEADERS
1082   pg/pg.h
1083   pg/edit.h
1084 )
1085
1086 list(APPEND VNET_API_FILES pg/pg.api)
1087
1088 ##############################################################################
1089 # virtio
1090 ##############################################################################
1091
1092 list(APPEND VNET_SOURCES
1093   devices/virtio/device.c
1094   devices/virtio/node.c
1095   devices/virtio/vhost_user.c
1096   devices/virtio/vhost_user_input.c
1097   devices/virtio/vhost_user_output.c
1098   devices/virtio/vhost_user_api.c
1099   devices/virtio/virtio.c
1100   devices/virtio/virtio_api.c
1101   devices/virtio/cli.c
1102   devices/virtio/pci.c
1103 )
1104
1105 list(APPEND VNET_HEADERS
1106   devices/virtio/pci.h
1107   devices/virtio/virtio.h
1108   devices/virtio/vhost_user.h
1109 )
1110
1111 list(APPEND VNET_MULTIARCH_SOURCES
1112   devices/virtio/vhost_user_input.c
1113   devices/virtio/vhost_user_output.c
1114   devices/netmap/node.c
1115   devices/virtio/node.c
1116   devices/af_packet/node.c
1117 )
1118
1119 list(APPEND VNET_API_FILES
1120   devices/virtio/vhost_user.api
1121   devices/virtio/virtio.api
1122 )
1123
1124 ##############################################################################
1125 # tap interface (with virtio backend)
1126 ##############################################################################
1127
1128 list(APPEND VNET_SOURCES
1129   devices/tap/cli.c
1130   devices/tap/tap.c
1131   devices/tap/tapv2_api.c
1132 )
1133
1134 list(APPEND VNET_HEADERS
1135   devices/tap/tap.h
1136 )
1137
1138 list(APPEND VNET_API_FILES devices/tap/tapv2.api)
1139
1140 ##############################################################################
1141 # tap interface (with virtio backend)
1142 ##############################################################################
1143
1144 list(APPEND VNET_SOURCES
1145   devices/pipe/pipe_api.c
1146   devices/pipe/pipe.c
1147 )
1148
1149 list(APPEND VNET_HEADERS
1150   devices/pipe/pipe.h
1151 )
1152
1153 list(APPEND VNET_API_FILES devices/pipe/pipe.api)
1154
1155 ##############################################################################
1156 # session managmeent
1157 ##############################################################################
1158
1159 list(APPEND VNET_SOURCES
1160   session/session.c
1161   session/session_table.c
1162   session/session_rules_table.c
1163   session/session_lookup.c
1164   session/session_node.c
1165   session/transport.c
1166   session/application.c
1167   session/application_worker.c
1168   session/session_cli.c
1169   session/application_interface.c
1170   session/application_local.c
1171   session/application_namespace.c
1172   session/segment_manager.c
1173   session/session_api.c
1174 )
1175
1176 list(APPEND VNET_HEADERS
1177   session/session.h
1178   session/session_table.h
1179   session/session_rules_table.h
1180   session/session_types.h
1181   session/session_lookup.h
1182   session/application.h
1183   session/transport.h
1184   session/transport_types.h
1185   session/application_interface.h
1186   session/application_local.h
1187   session/application_namespace.h
1188   session/session_debug.h
1189   session/segment_manager.h
1190   session/mma_template.h
1191   session/mma_template.c
1192   session/mma_16.h
1193   session/mma_40.h
1194 )
1195
1196 list(APPEND VNET_API_FILES session/session.api)
1197
1198 ##############################################################################
1199 # session layer applications
1200 ##############################################################################
1201
1202 list(APPEND VNET_SOURCES
1203   session-apps/echo_client.c
1204   session-apps/echo_server.c
1205   session-apps/http_server.c
1206   session-apps/proxy.c
1207 )
1208
1209 list(APPEND VNET_HEADERS
1210   session-apps/echo_client.h
1211   session-apps/proxy.h
1212 )
1213
1214 ##############################################################################
1215 # TLS protocol
1216 ##############################################################################
1217
1218 list(APPEND VNET_SOURCES
1219   tls/tls.c
1220 )
1221
1222 list(APPEND VNET_HEADERS
1223   tls/tls.h
1224   tls/tls_test.h
1225 )
1226
1227 ##############################################################################
1228 # Linux packet interface
1229 ##############################################################################
1230
1231 list(APPEND VNET_SOURCES
1232   devices/af_packet/af_packet.c
1233   devices/af_packet/device.c
1234   devices/af_packet/node.c
1235   devices/af_packet/cli.c
1236   devices/af_packet/af_packet_api.c
1237 )
1238
1239 list(APPEND VNET_HEADERS
1240   devices/af_packet/af_packet.h
1241 )
1242
1243 list(APPEND VNET_API_FILES devices/af_packet/af_packet.api)
1244
1245 ##############################################################################
1246 # NETMAP interface
1247 ##############################################################################
1248
1249 list(APPEND VNET_SOURCES
1250   devices/netmap/netmap.c
1251   devices/netmap/device.c
1252   devices/netmap/node.c
1253   devices/netmap/cli.c
1254   devices/netmap/netmap_api.c
1255 )
1256
1257 list(APPEND VNET_HEADERS
1258   devices/netmap/netmap.h
1259 )
1260
1261 list(APPEND VNET_API_FILES devices/netmap/netmap.api)
1262
1263 ##############################################################################
1264 # Driver feature graph arc support
1265 ##############################################################################
1266
1267 list(APPEND VNET_SOURCES
1268   feature/feature.c
1269   feature/feature_api.c
1270   feature/registration.c
1271 )
1272
1273 list(APPEND VNET_HEADERS
1274   feature/feature.h
1275 )
1276
1277 list(APPEND VNET_API_FILES feature/feature.api)
1278
1279 ##############################################################################
1280 # Unix kernel related
1281 ##############################################################################
1282
1283 # FIXME: unix/hgshm.c
1284
1285 list(APPEND VNET_SOURCES
1286   unix/gdb_funcs.c
1287   unix/tuntap.c
1288 )
1289
1290 list(APPEND VNET_HEADERS
1291   unix/tuntap.h
1292 )
1293
1294 ##############################################################################
1295 # FIB
1296 ##############################################################################
1297
1298 list(APPEND VNET_SOURCES
1299   fib/fib.c
1300   fib/ip4_fib.c
1301   fib/ip6_fib.c
1302   fib/mpls_fib.c
1303   fib/fib_table.c
1304   fib/fib_walk.c
1305   fib/fib_types.c
1306   fib/fib_node.c
1307   fib/fib_node_list.c
1308   fib/fib_entry.c
1309   fib/fib_entry_src.c
1310   fib/fib_entry_src_rr.c
1311   fib/fib_entry_src_interface.c
1312   fib/fib_entry_src_interpose.c
1313   fib/fib_entry_src_default_route.c
1314   fib/fib_entry_src_special.c
1315   fib/fib_entry_src_api.c
1316   fib/fib_entry_src_adj.c
1317   fib/fib_entry_src_mpls.c
1318   fib/fib_entry_src_lisp.c
1319   fib/fib_entry_cover.c
1320   fib/fib_entry_delegate.c
1321   fib/fib_path_list.c
1322   fib/fib_path.c
1323   fib/fib_path_ext.c
1324   fib/fib_urpf_list.c
1325   fib/fib_attached_export.c
1326   fib/fib_api.c
1327   fib/fib_bfd.c
1328 )
1329
1330 list(APPEND VNET_HEADERS
1331   fib/fib.h
1332   fib/fib_api.h
1333   fib/ip4_fib.h
1334   fib/ip6_fib.h
1335   fib/fib_types.h
1336   fib/fib_table.h
1337   fib/fib_node.h
1338   fib/fib_node_list.h
1339   fib/fib_entry.h
1340   fib/fib_entry_delegate.h
1341 )
1342
1343 ##############################################################################
1344 # ADJ
1345 ##############################################################################
1346
1347 list(APPEND VNET_SOURCES
1348   adj/adj_nbr.c
1349   adj/adj_glean.c
1350   adj/adj_midchain.c
1351   adj/adj_mcast.c
1352   adj/adj_l2.c
1353   adj/adj_nsh.c
1354   adj/adj.c
1355   adj/rewrite.c
1356   adj/adj_bfd.c
1357   adj/adj_delegate.c
1358 )
1359
1360 list(APPEND VNET_MULTIARCH_SOURCES
1361   adj/adj_nsh.c
1362   adj/adj_l2.c
1363 )
1364
1365 list(APPEND VNET_HEADERS
1366   adj/adj.h
1367   adj/adj_types.h
1368   adj/adj_glean.h
1369   adj/adj_nsh.h
1370   adj/adj_nbr.h
1371   adj/rewrite.h
1372 )
1373
1374 ##############################################################################
1375 # Data-Plane Objects
1376 ##############################################################################
1377
1378 list(APPEND VNET_SOURCES
1379   dpo/dpo.c
1380   dpo/drop_dpo.c
1381   dpo/ip_null_dpo.c
1382   dpo/ip6_ll_dpo.c
1383   dpo/punt_dpo.c
1384   dpo/receive_dpo.c
1385   dpo/load_balance.c
1386   dpo/load_balance_map.c
1387   dpo/lookup_dpo.c
1388   dpo/classify_dpo.c
1389   dpo/replicate_dpo.c
1390   dpo/interface_rx_dpo.c
1391   dpo/interface_tx_dpo.c
1392   dpo/mpls_disposition.c
1393   dpo/mpls_label_dpo.c
1394   dpo/l3_proxy_dpo.c
1395   dpo/dvr_dpo.c
1396 )
1397
1398 list(APPEND VNET_MULTIARCH_SOURCES
1399   dpo/lookup_dpo.h
1400   dpo/mpls_disposition.c
1401   dpo/dvr_dpo.c
1402   dpo/mpls_label_dpo.c
1403   dpo/interface_rx_dpo.c
1404 )
1405
1406 list(APPEND VNET_HEADERS
1407   dpo/load_balance.h
1408   dpo/drop_dpo.h
1409   dpo/lookup_dpo.h
1410   dpo/punt_dpo.h
1411   dpo/classify_dpo.h
1412   dpo/receive_dpo.h
1413   dpo/ip_null_dpo.h
1414   dpo/replicate_dpo.h
1415   dpo/dpo.h
1416 )
1417
1418 ##############################################################################
1419 # Multicast FIB
1420 ##############################################################################
1421
1422 list(APPEND VNET_SOURCES
1423   mfib/mfib_forward.c
1424   mfib/ip4_mfib.c
1425   mfib/ip6_mfib.c
1426   mfib/mfib_types.c
1427   mfib/mfib_signal.c
1428   mfib/mfib_itf.c
1429   mfib/mfib_entry.c
1430   mfib/mfib_entry.c
1431   mfib/mfib_entry_cover.c
1432   mfib/mfib_entry_delegate.c
1433   mfib/mfib_entry_src.c
1434   mfib/mfib_entry_src_rr.c
1435   mfib/mfib_table.c
1436 )
1437
1438 list(APPEND VNET_MULTIARCH_SOURCES
1439   mfib/mfib_forward.c
1440 )
1441
1442 list(APPEND VNET_HEADERS
1443   mfib/ip4_mfib.h
1444   mfib/mfib_types.h
1445   mfib/mfib_table.h
1446 )
1447
1448 ##############################################################################
1449 # Utilities
1450 ##############################################################################
1451
1452 list(APPEND VNET_SOURCES
1453   util/radix.c
1454   util/refcount.c
1455   util/throttle.c
1456   util/trajectory.c
1457 )
1458
1459 list(APPEND VNET_HEADERS
1460   util/throttle.h
1461 )
1462
1463 ##############################################################################
1464 # QoS
1465 ##############################################################################
1466
1467 list(APPEND VNET_SOURCES
1468   qos/qos_types.c
1469   qos/qos_api.c
1470   qos/qos_egress_map.c
1471   qos/qos_record.c
1472   qos/qos_record_node.c
1473   qos/qos_mark.c
1474   qos/qos_mark_node.c
1475 )
1476
1477 list(APPEND VNET_MULTIARCH_SOURCES
1478   qos/qos_record_node.c
1479   qos/qos_mark_node.c
1480 )
1481
1482 list(APPEND VNET_API_FILES qos/qos.api)
1483
1484 ##############################################################################
1485 # BIER
1486 ##############################################################################
1487
1488 list(APPEND VNET_SOURCES
1489   bier/bier_bit_string.c
1490   bier/bier_entry.c
1491   bier/bier_fmask.c
1492   bier/bier_fmask_db.c
1493   bier/bier_input.c
1494   bier/bier_lookup.c
1495   bier/bier_output.c
1496   bier/bier_table.c
1497   bier/bier_types.c
1498   bier/bier_api.c
1499   bier/bier_drop.c
1500   bier/bier_update.c
1501   bier/bier_imp_node.c
1502   bier/bier_imp.c
1503   bier/bier_disp_entry.c
1504   bier/bier_disp_lookup_node.c
1505   bier/bier_disp_dispatch_node.c
1506   bier/bier_disp_table.c
1507   bier/bier_bift_table.c
1508 )
1509
1510 list(APPEND VNET_MULTIARCH_SOURCES
1511   bier/bier_disp_dispatch_node.c
1512   bier/bier_disp_lookup_node.c
1513   bier/bier_imp_node.c
1514 )
1515
1516 list(APPEND VNET_HEADERS
1517   bier/bier_types.h
1518   bier/bier_entry.h
1519   bier/bier_update.h
1520   bier/bier_table.h
1521 )
1522
1523 list(APPEND VNET_API_FILES bier/bier.api)
1524
1525 ##############################################################################
1526 # SYSLOG
1527 ##############################################################################
1528
1529 list (APPEND VNET_SOURCES
1530   syslog/syslog_api.c
1531   syslog/syslog_udp.c
1532   syslog/syslog.c
1533 )
1534
1535 list(APPEND VNET_HEADERS
1536   syslog/syslog_udp.h
1537   syslog/syslog.h
1538 )
1539
1540 list(APPEND VNET_API_FILES syslog/syslog.api)
1541
1542 ##############################################################################
1543 # VNET Library
1544 ##############################################################################
1545
1546 add_vpp_library(vnet
1547   SOURCES ${VNET_SOURCES}
1548   MULTIARCH_SOURCES ${VNET_MULTIARCH_SOURCES}
1549   INSTALL_HEADERS ${VNET_HEADERS}
1550   API_FILES ${VNET_API_FILES}
1551   LINK_LIBRARIES vppinfra svm vlib ${OPENSSL_LIBRARIES}
1552   DEPENDS api_headers
1553 )
1554
1555 ##############################################################################
1556 # Session echo apps
1557 ##############################################################################
1558
1559 option(VPP_BUILD_SESSION_ECHO_APPS "Build session echo apps." ON)
1560 if(VPP_BUILD_SESSION_ECHO_APPS)
1561   add_vpp_executable(tcp_echo
1562     SOURCES ../tests/vnet/session/tcp_echo.c
1563     LINK_LIBRARIES vlibmemoryclient svm vppinfra pthread m rt
1564     DEPENDS api_headers
1565     NO_INSTALL
1566     )
1567   add_vpp_executable(udp_echo
1568     SOURCES ../tests/vnet/session/udp_echo.c
1569     LINK_LIBRARIES vlibmemoryclient svm vppinfra pthread m rt
1570     DEPENDS api_headers
1571     NO_INSTALL
1572     )
1573 endif(VPP_BUILD_SESSION_ECHO_APPS)
1574
1575 ##############################################################################