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