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