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