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