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