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