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