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