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