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