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