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