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