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