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