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