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