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