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