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