dpdk: be a plugin
[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         libvlibapi.la           \
23         libvlibmemory.la        \
24         libvlibmemoryclient.la
25
26 libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt
27
28 if WITH_LIBSSL
29 libvnet_la_LIBADD += -lcrypto
30 endif
31
32 ########################################
33 # Generic stuff
34 ########################################
35 libvnet_la_SOURCES +=                           \
36   vnet/config.c                                 \
37   vnet/devices/devices.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   vnet/rewrite.c
47
48 nobase_include_HEADERS +=                       \
49   vnet/api_errno.h                              \
50   vnet/buffer.h                                 \
51   vnet/config.h                                 \
52   vnet/devices/devices.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/l3_types.h                               \
59   vnet/pipeline.h                               \
60   vnet/replication.h                            \
61   vnet/rewrite.h                                \
62   vnet/vnet.h                                   \
63   vnet/vnet_all_api_h.h                         \
64   vnet/vnet_msg_enum.h                          \
65   vnet/util/radix.h
66
67 API_FILES += vnet/interface.api
68
69 ########################################
70 # Policer infra
71 ########################################
72
73 libvnet_la_SOURCES +=                           \
74   vnet/policer/node_funcs.c                     \
75   vnet/policer/policer.c                        \
76   vnet/policer/xlate.c                          \
77   vnet/policer/policer_api.c
78
79 nobase_include_HEADERS +=                       \
80   vnet/policer/police.h                         \
81   vnet/policer/policer.h                        \
82   vnet/policer/xlate.h                          \
83   vnet/policer/policer.api.h
84
85 API_FILES += vnet/policer/policer.api
86
87 ########################################
88 # Cop - junk filter
89 ########################################
90
91 libvnet_la_SOURCES +=                           \
92   vnet/cop/cop.c                                \
93   vnet/cop/node1.c                              \
94   vnet/cop/ip4_whitelist.c                      \
95   vnet/cop/ip6_whitelist.c                      \
96   vnet/cop/cop_api.c
97
98 nobase_include_HEADERS +=                       \
99   vnet/cop/cop.h                                        \
100   vnet/cop/cop.api.h
101
102 API_FILES += vnet/cop/cop.api
103
104 ########################################
105 # Layer 2 protocols go here
106 ########################################
107
108 ########################################
109 # Layer 2 protocol: Ethernet
110 ########################################
111 libvnet_la_SOURCES +=                           \
112  vnet/ethernet/arp.c                            \
113  vnet/ethernet/format.c                         \
114  vnet/ethernet/init.c                           \
115  vnet/ethernet/interface.c                      \
116  vnet/ethernet/node.c                           \
117  vnet/ethernet/pg.c
118
119 nobase_include_HEADERS +=                       \
120  vnet/ethernet/arp_packet.h                     \
121  vnet/ethernet/error.def                        \
122  vnet/ethernet/ethernet.h                       \
123  vnet/ethernet/packet.h                         \
124  vnet/ethernet/types.def
125
126 ########################################
127 # Layer 2 protocol: Ethernet bridging
128 ########################################
129 libvnet_la_SOURCES +=                           \
130  vnet/l2/feat_bitmap.c                          \
131  vnet/l2/l2_api.c                               \
132  vnet/l2/l2_bd.c                                \
133  vnet/l2/l2_bvi.c                               \
134  vnet/l2/l2_input_classify.c                    \
135  vnet/l2/l2_output_classify.c                   \
136  vnet/l2/l2_efp_filter.c                        \
137  vnet/l2/l2_fib.c                               \
138  vnet/l2/l2_flood.c                             \
139  vnet/l2/l2_fwd.c                               \
140  vnet/l2/l2_input_acl.c                         \
141  vnet/l2/l2_input.c                             \
142  vnet/l2/l2_input_vtr.c                         \
143  vnet/l2/l2_learn.c                             \
144  vnet/l2/l2_output_acl.c                        \
145  vnet/l2/l2_output.c                            \
146  vnet/l2/l2_patch.c                             \
147  vnet/l2/l2_rw.c                                \
148  vnet/l2/l2_vtr.c                               \
149  vnet/l2/l2_xcrw.c
150
151 nobase_include_HEADERS +=                       \
152  vnet/l2/feat_bitmap.h                          \
153  vnet/l2/l2_input.h                             \
154  vnet/l2/l2_output.h                            \
155  vnet/l2/l2_vtr.h                               \
156  vnet/l2/l2_input_vtr.h                         \
157  vnet/l2/l2_efp_filter.h                        \
158  vnet/l2/l2_fwd.h                               \
159  vnet/l2/l2_bd.h                                \
160  vnet/l2/l2_bvi.h                               \
161  vnet/l2/l2_flood.h                             \
162  vnet/l2/l2_fib.h                               \
163  vnet/l2/l2_rw.h                                \
164  vnet/l2/l2_xcrw.h                              \
165  vnet/l2/l2_classify.h                          \
166  vnet/l2/l2.api.h
167
168 API_FILES += vnet/l2/l2.api
169
170 ########################################
171 # Layer 2 protocol: SRP
172 ########################################
173 libvnet_la_SOURCES +=                           \
174  vnet/srp/format.c                              \
175  vnet/srp/interface.c                           \
176  vnet/srp/node.c                                \
177  vnet/srp/pg.c
178
179 nobase_include_HEADERS +=                       \
180  vnet/srp/packet.h                              \
181  vnet/srp/srp.h
182
183 ########################################
184 # Layer 2 protocol: PPP
185 ########################################
186 libvnet_la_SOURCES +=                           \
187   vnet/ppp/node.c                               \
188   vnet/ppp/pg.c                                 \
189   vnet/ppp/ppp.c
190
191 nobase_include_HEADERS +=                       \
192  vnet/ppp/error.def                             \
193  vnet/ppp/ppp.h                                 \
194  vnet/ppp/packet.h
195
196 ########################################
197 # Layer 2 protocol: HDLC
198 ########################################
199 libvnet_la_SOURCES +=                           \
200   vnet/hdlc/node.c                              \
201   vnet/hdlc/pg.c                                \
202   vnet/hdlc/hdlc.c
203
204 nobase_include_HEADERS +=                       \
205  vnet/hdlc/error.def                            \
206  vnet/hdlc/hdlc.h                               \
207  vnet/hdlc/packet.h
208
209 ########################################
210 # Layer 2 protocol: LLC
211 ########################################
212 libvnet_la_SOURCES +=                           \
213   vnet/llc/llc.c                                \
214   vnet/llc/node.c                               \
215   vnet/llc/pg.c
216
217 nobase_include_HEADERS +=                       \
218  vnet/llc/llc.h
219
220 ########################################
221 # Layer 2 protocol: SNAP
222 ########################################
223 libvnet_la_SOURCES +=                           \
224   vnet/snap/snap.c                              \
225   vnet/snap/node.c                              \
226   vnet/snap/pg.c
227
228 nobase_include_HEADERS +=                       \
229  vnet/snap/snap.h
230
231 ########################################
232 # Layer 2 / vxlan
233 ########################################
234 libvnet_la_SOURCES +=                           \
235   vnet/vxlan/vxlan.c                            \
236   vnet/vxlan/encap.c                            \
237   vnet/vxlan/decap.c                            \
238   vnet/vxlan/vxlan_api.c
239
240 nobase_include_HEADERS +=                       \
241   vnet/vxlan/vxlan.h                            \
242   vnet/vxlan/vxlan_packet.h                     \
243   vnet/vxlan/vxlan_error.def                    \
244   vnet/vxlan/vxlan.api.h
245
246 API_FILES += vnet/vxlan/vxlan.api
247
248 ########################################
249 # Layer 2 / CDP
250 ########################################
251 libvnet_la_SOURCES +=                           \
252   vnet/cdp/cdp_input.c                          \
253   vnet/cdp/cdp_node.c                           \
254   vnet/cdp/cdp_periodic.c
255
256 nobase_include_HEADERS +=                       \
257   vnet/cdp/cdp_protocol.h
258
259 ########################################
260 # Layer 2 / LLDP
261 ########################################
262 libvnet_la_SOURCES +=                           \
263   vnet/lldp/lldp_input.c                        \
264   vnet/lldp/lldp_node.c                         \
265   vnet/lldp/lldp_output.c                       \
266   vnet/lldp/lldp_cli.c
267
268 nobase_include_HEADERS +=                       \
269   vnet/lldp/lldp_protocol.h
270
271 ########################################
272 # Layer 2/3 "classify"
273 ########################################
274 libvnet_la_SOURCES +=                           \
275   vnet/classify/vnet_classify.c                 \
276   vnet/classify/ip_classify.c                   \
277   vnet/classify/input_acl.c                     \
278   vnet/classify/policer_classify.c              \
279   vnet/classify/flow_classify.c                 \
280   vnet/classify/flow_classify_node.c            \
281   vnet/classify/vnet_classify.h                 \
282   vnet/classify/classify_api.c
283
284 nobase_include_HEADERS +=                       \
285   vnet/classify/vnet_classify.h                 \
286   vnet/classify/input_acl.h                     \
287   vnet/classify/policer_classify.h              \
288   vnet/classify/flow_classify.h                                 \
289   vnet/classify/classify.api.h
290
291 API_FILES += vnet/classify/classify.api
292
293 ########################################
294 # Layer 3 protocols go here
295 ########################################
296
297 ########################################
298 # Layer 3 protocol: IP v4/v6
299 ########################################
300 libvnet_la_SOURCES +=                           \
301  vnet/ip/format.c                               \
302  vnet/ip/icmp4.c                                \
303  vnet/ip/icmp6.c                                \
304  vnet/ip/ip46_cli.c                             \
305  vnet/ip/ip4_format.c                           \
306  vnet/ip/ip4_forward.c                          \
307  vnet/ip/ip4_input.c                            \
308  vnet/ip/ip4_mtrie.c                            \
309  vnet/ip/ip4_pg.c                               \
310  vnet/ip/ip4_source_and_port_range_check.c      \
311  vnet/ip/ip4_source_check.c                     \
312  vnet/ip/ip6_format.c                           \
313  vnet/ip/ip6_forward.c                          \
314  vnet/ip/ip6_hop_by_hop.c                       \
315  vnet/ip/ip6_input.c                            \
316  vnet/ip/ip6_neighbor.c                         \
317  vnet/ip/ip6_pg.c                               \
318  vnet/ip/ip_api.c                               \
319  vnet/ip/ip_checksum.c                          \
320  vnet/ip/ip_frag.c                              \
321  vnet/ip/ip.h                                   \
322  vnet/ip/ip_init.c                              \
323  vnet/ip/ip_input_acl.c                         \
324  vnet/ip/lookup.c                               \
325  vnet/ip/ping.c                                 \
326  vnet/ip/punt.c
327
328 nobase_include_HEADERS +=                       \
329  vnet/ip/format.h                               \
330  vnet/ip/icmp46_packet.h                        \
331  vnet/ip/icmp4.h                                \
332  vnet/ip/icmp6.h                                \
333  vnet/ip/igmp_packet.h                          \
334  vnet/ip/ip.api.h                               \
335  vnet/ip/ip4_error.h                            \
336  vnet/ip/ip4.h                                  \
337  vnet/ip/ip4_mtrie.h                            \
338  vnet/ip/ip4_packet.h                           \
339  vnet/ip/ip6_error.h                            \
340  vnet/ip/ip6.h                                  \
341  vnet/ip/ip6_hop_by_hop.h                       \
342  vnet/ip/ip6_hop_by_hop_packet.h                \
343  vnet/ip/ip6_packet.h                           \
344  vnet/ip/ip6_neighbor.h                         \
345  vnet/ip/ip.h                                   \
346  vnet/ip/ip_packet.h                            \
347  vnet/ip/ip_source_and_port_range_check.h       \
348  vnet/ip/lookup.h                               \
349  vnet/ip/ports.def                              \
350  vnet/ip/protocols.def                          \
351  vnet/ip/punt_error.def                         \
352  vnet/ip/punt.h
353
354 API_FILES += vnet/ip/ip.api
355
356 ########################################
357 # Bidirectional Forwarding Detection
358 ########################################
359
360 nobase_include_HEADERS +=                       \
361  vnet/bfd/bfd_protocol.h                        \
362  vnet/bfd/bfd_main.h                            \
363  vnet/bfd/bfd_api.h                             \
364  vnet/bfd/bfd_udp.h                             \
365  vnet/bfd/bfd.api.h
366
367 libvnet_la_SOURCES +=                           \
368  vnet/bfd/bfd_api.h                             \
369  vnet/bfd/bfd_udp.c                             \
370  vnet/bfd/bfd_main.c                            \
371  vnet/bfd/bfd_protocol.c                        \
372  vnet/bfd/bfd_api.c
373
374 API_FILES += vnet/bfd/bfd.api
375
376 ########################################
377 # Layer 3 protocol: IPSec
378 ########################################
379 if WITH_LIBSSL
380 libvnet_la_SOURCES +=                           \
381  vnet/ipsec/ipsec.c                             \
382  vnet/ipsec/ipsec_cli.c                         \
383  vnet/ipsec/ipsec_format.c                      \
384  vnet/ipsec/ipsec_input.c                       \
385  vnet/ipsec/ipsec_if.c                          \
386  vnet/ipsec/ipsec_if_in.c                       \
387  vnet/ipsec/ipsec_if_out.c                      \
388  vnet/ipsec/esp_encrypt.c                       \
389  vnet/ipsec/esp_decrypt.c                       \
390  vnet/ipsec/ikev2.c                             \
391  vnet/ipsec/ikev2_crypto.c                      \
392  vnet/ipsec/ikev2_cli.c                         \
393  vnet/ipsec/ikev2_payload.c                     \
394  vnet/ipsec/ikev2_format.c                      \
395  vnet/ipsec/ipsec_api.c
396
397 API_FILES += vnet/ipsec/ipsec.api
398 endif
399
400 libvnet_la_SOURCES +=                           \
401  vnet/ipsec/ipsec_output.c
402
403 nobase_include_HEADERS +=                       \
404  vnet/ipsec/ipsec.h                             \
405  vnet/ipsec/esp.h                               \
406  vnet/ipsec/ikev2.h                             \
407  vnet/ipsec/ikev2_priv.h                        \
408  vnet/ipsec/ipsec.api.h
409
410 ########################################
411 # Layer 3 protocol: osi
412 ########################################
413 libvnet_la_SOURCES +=                           \
414  vnet/osi/node.c                                \
415  vnet/osi/osi.c                                 \
416  vnet/osi/pg.c
417
418 nobase_include_HEADERS +=                       \
419  vnet/osi/osi.h
420
421 ########################################
422 # Layer 3 protocol: MAP
423 ########################################
424 libvnet_la_SOURCES +=                           \
425  vnet/map/map.c                                 \
426  vnet/map/map_dpo.c                             \
427  vnet/map/ip4_map.c                             \
428  vnet/map/ip6_map.c                             \
429  vnet/map/ip4_map_t.c                           \
430  vnet/map/ip6_map_t.c                           \
431  vnet/map/map_api.c
432
433 nobase_include_HEADERS +=                       \
434  vnet/map/map.h                                 \
435  vnet/map/map_dpo.h                             \
436  vnet/map/map.api.h
437
438 API_FILES += vnet/map/map.api
439
440 if ENABLE_TESTS
441 TESTS += test_map
442 test_map_SOURCES =                             \
443  vnet/map/test.c
444 test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
445
446 test_map_LDADD = libvnet.la libvppinfra.la libvlib.la   \
447   -lpthread -lvlibmemory -lvlibapi \
448   -ldl -lsvm -lrt
449
450 test_map_LDFLAGS = -static
451 endif
452
453 ########################################
454 # Layer 4 protocol: tcp
455 ########################################
456 libvnet_la_SOURCES +=                           \
457  vnet/tcp/tcp_format.c                          \
458  vnet/tcp/tcp_pg.c                              \
459  vnet/tcp/tcp_syn_filter4.c                     \
460  vnet/tcp/tcp_output.c                          \
461  vnet/tcp/tcp_input.c                           \
462  vnet/tcp/tcp_newreno.c                         \
463  vnet/tcp/tcp.c
464
465 nobase_include_HEADERS +=                       \
466  vnet/tcp/tcp_packet.h                          \
467  vnet/tcp/tcp_timer.h                           \
468  vnet/tcp/tcp.h
469
470 ########################################
471 # Layer 4 protocol: udp
472 ########################################
473 libvnet_la_SOURCES +=                           \
474  vnet/udp/udp.c                                 \
475  vnet/udp/udp_input.c                           \
476  vnet/udp/builtin_server.c                      \
477  vnet/udp/udp_format.c                          \
478  vnet/udp/udp_local.c                           \
479  vnet/udp/udp_pg.c
480
481 nobase_include_HEADERS +=                       \
482   vnet/udp/udp_error.def                        \
483   vnet/udp/udp.h                                \
484   vnet/udp/udp_packet.h
485
486 ########################################
487 # Tunnel protocol: gre
488 ########################################
489 libvnet_la_SOURCES +=                           \
490  vnet/gre/gre.c                                 \
491  vnet/gre/node.c                                \
492  vnet/gre/interface.c                           \
493  vnet/gre/pg.c                                  \
494  vnet/gre/gre_api.c
495
496 nobase_include_HEADERS +=                       \
497  vnet/gre/gre.h                                 \
498  vnet/gre/packet.h                              \
499  vnet/gre/error.def                             \
500  vnet/gre/gre.api.h
501
502 API_FILES += vnet/gre/gre.api
503
504 ########################################
505 # Tunnel protocol: l2tpv3
506 ########################################
507 libvnet_la_SOURCES +=                           \
508  vnet/l2tp/l2tp.c                               \
509  vnet/l2tp/encap.c                              \
510  vnet/l2tp/decap.c                              \
511  vnet/l2tp/pg.c                                 \
512  vnet/l2tp/l2tp_api.c
513
514 nobase_include_HEADERS +=                       \
515  vnet/l2tp/l2tp.h                               \
516  vnet/l2tp/packet.h                             \
517  vnet/l2tp/l2tp.api.h
518
519 API_FILES += vnet/l2tp/l2tp.api
520
521 ########################################
522 # Tunnel protocol: gre+mpls
523 ########################################
524 libvnet_la_SOURCES +=                           \
525  vnet/mpls/mpls.c                               \
526  vnet/mpls/mpls_lookup.c                        \
527  vnet/mpls/mpls_output.c                        \
528  vnet/mpls/mpls_features.c                      \
529  vnet/mpls/node.c                               \
530  vnet/mpls/interface.c                          \
531  vnet/mpls/mpls_tunnel.c                        \
532  vnet/mpls/pg.c                         \
533  vnet/mpls/mpls_api.c
534
535 nobase_include_HEADERS +=                       \
536  vnet/mpls/mpls.h                               \
537  vnet/mpls/mpls_types.h                         \
538  vnet/mpls/mpls_tunnel.h                        \
539  vnet/mpls/packet.h                             \
540  vnet/mpls/error.def                    \
541  vnet/mpls/mpls.api.h
542
543 API_FILES += vnet/mpls/mpls.api
544
545 ########################################
546 # Tunnel protocol: vxlan-gpe
547 ########################################
548
549 libvnet_la_SOURCES +=                           \
550  vnet/vxlan-gpe/vxlan_gpe.c                     \
551  vnet/vxlan-gpe/encap.c                         \
552  vnet/vxlan-gpe/decap.c                         \
553  vnet/vxlan-gpe/vxlan_gpe_api.c
554
555 nobase_include_HEADERS +=                       \
556  vnet/vxlan-gpe/vxlan_gpe.h                     \
557  vnet/vxlan-gpe/vxlan_gpe_packet.h              \
558  vnet/vxlan-gpe/vxlan_gpe_error.def             \
559  vnet/vxlan-gpe/vxlan_gpe.api.h
560
561 API_FILES += vnet/vxlan-gpe/vxlan_gpe.api
562
563 ########################################
564 # Tunnel protocol: ipsec+gre
565 ########################################
566 libvnet_la_SOURCES +=                           \
567  vnet/ipsec-gre/ipsec_gre.c                     \
568  vnet/ipsec-gre/node.c                          \
569  vnet/ipsec-gre/interface.c                     \
570  vnet/ipsec-gre/ipsec_gre_api.c
571
572 nobase_include_HEADERS +=                       \
573  vnet/ipsec-gre/ipsec_gre.h                     \
574  vnet/ipsec-gre/error.def                       \
575  vnet/ipsec-gre/ipsec_gre.api.h
576
577 API_FILES += vnet/ipsec-gre/ipsec_gre.api
578
579 ########################################
580 # LISP control plane: lisp-cp
581 ########################################
582
583 libvnet_la_SOURCES +=                           \
584  vnet/lisp-cp/lisp_types.c                      \
585  vnet/lisp-cp/lisp_cp_dpo.c                     \
586  vnet/lisp-cp/control.c                         \
587  vnet/lisp-cp/gid_dictionary.c                  \
588  vnet/lisp-cp/lisp_msg_serdes.c                 \
589  vnet/lisp-cp/packets.c                         \
590  vnet/lisp-cp/one_cli.c                         \
591  vnet/lisp-cp/lisp_cli.c                        \
592  vnet/lisp-cp/one_api.c                         \
593  vnet/lisp-cp/lisp_api.c
594
595 nobase_include_HEADERS +=                       \
596  vnet/lisp-cp/lisp_types.h                      \
597  vnet/lisp-cp/packets.h                         \
598  vnet/lisp-cp/gid_dictionary.h                  \
599  vnet/lisp-cp/lisp_cp_messages.h                \
600  vnet/lisp-cp/lisp_msg_serdes.h                 \
601  vnet/lisp-cp/control.h                         \
602  vnet/lisp-cp/one.api.h                         \
603  vnet/lisp-cp/lisp.api.h
604
605 API_FILES += vnet/lisp-cp/lisp.api
606 API_FILES += vnet/lisp-cp/one.api
607
608 if ENABLE_TESTS
609 LDS = \
610   libvppinfra.la \
611   libvnet.la \
612   libvlib.la  \
613   libsvm.la \
614   libsvmdb.la \
615   libvlibapi.la \
616   libvlibmemory.la \
617   -lpthread -ldl -lrt -lm
618
619 TESTS += test_cp_serdes test_lisp_types
620
621 test_cp_serdes_SOURCES =                        \
622  tests/vnet/lisp-cp/test_cp_serdes.c            \
623  vnet/lisp-cp/lisp_msg_serdes.c                 \
624  vnet/lisp-cp/lisp_types.c                      \
625  vnet/lisp-cp/packets.c                         \
626  vnet/ip/ip_checksum.c
627
628 test_lisp_types_SOURCES =                       \
629  tests/vnet/lisp-cp/test_lisp_types.c           \
630  vnet/lisp-cp/lisp_types.c
631
632 test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
633 test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
634
635 test_cp_serdes_LDADD = $(LDS)
636 test_lisp_types_LDADD = $(LDS)
637 endif
638
639 ########################################
640 # Tunnel protocol: lisp-gpe
641 ########################################
642
643 libvnet_la_SOURCES +=                           \
644  vnet/lisp-gpe/lisp_gpe.c                       \
645  vnet/lisp-gpe/lisp_gpe_sub_interface.c         \
646  vnet/lisp-gpe/lisp_gpe_adjacency.c             \
647  vnet/lisp-gpe/lisp_gpe_tunnel.c                \
648  vnet/lisp-gpe/lisp_gpe_fwd_entry.c             \
649  vnet/lisp-gpe/lisp_gpe_tenant.c                \
650  vnet/lisp-gpe/interface.c                      \
651  vnet/lisp-gpe/decap.c                          \
652  vnet/lisp-gpe/lisp_gpe_api.c
653
654 nobase_include_HEADERS +=                       \
655  vnet/lisp-gpe/lisp_gpe.h                       \
656  vnet/lisp-gpe/lisp_gpe_fwd_entry.h             \
657  vnet/lisp-gpe/lisp_gpe_tenant.h                \
658  vnet/lisp-gpe/lisp_gpe_packet.h                \
659  vnet/lisp-gpe/lisp_gpe_error.def               \
660  vnet/lisp-gpe/lisp_gpe.api.h
661
662 API_FILES += vnet/lisp-gpe/lisp_gpe.api
663
664 if ENABLE_TESTS
665 TESTS += test_test
666
667 test_test_SOURCES = tests/vnet/lisp-gpe/test.c
668
669 test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
670
671 test_test_LDADD = $(LIBOBJS)
672
673 noinst_PROGRAMS += $(TESTS)
674 check_PROGRAMS += $(TESTS)
675 endif
676
677 ########################################
678 # DHCP client
679 ########################################
680 libvnet_la_SOURCES +=                           \
681  vnet/dhcp/client.c                             \
682  vnet/dhcp/client.h                             \
683  vnet/dhcp/dhcp_api.c
684
685 nobase_include_HEADERS +=                       \
686  vnet/dhcp/client.h                             \
687  vnet/dhcp/dhcp.api.h
688
689 API_FILES += vnet/dhcp/dhcp.api
690
691 ########################################
692 # DHCP proxy
693 ########################################
694 libvnet_la_SOURCES +=                           \
695  vnet/dhcp/dhcp6_proxy_node.c                   \
696  vnet/dhcp/dhcp4_proxy_node.c                   \
697  vnet/dhcp/dhcp_proxy.c
698
699 nobase_include_HEADERS +=                       \
700  vnet/dhcp/dhcp4_packet.h                       \
701  vnet/dhcp/dhcp6_packet.h                       \
702  vnet/dhcp/dhcp_proxy.h                         \
703  vnet/dhcp/dhcp6_proxy_error.def                \
704  vnet/dhcp/dhcp4_proxy_error.def
705
706 ########################################
707 # ipv6 segment routing
708 ########################################
709
710 if WITH_LIBSSL
711 libvnet_la_SOURCES +=                           \
712  vnet/sr/sr.c                                   \
713  vnet/sr/sr_api.c
714 endif
715
716 nobase_include_HEADERS +=                       \
717  vnet/sr/sr_packet.h                            \
718  vnet/sr/sr_error.def                           \
719  vnet/sr/sr.h                                           \
720  vnet/sr/sr.api.h
721
722 API_FILES += vnet/sr/sr.api
723
724 ########################################
725 # IPFIX / netflow v10
726 ########################################
727 libvnet_la_SOURCES +=                           \
728  vnet/flow/flow_report.c                        \
729  vnet/flow/flow_api.c
730
731 nobase_include_HEADERS +=                       \
732  vnet/flow/flow_report.h                        \
733  vnet/flow/ipfix_info_elements.h                \
734  vnet/flow/ipfix_packet.h                       \
735  vnet/flow/flow.api.h
736
737 API_FILES += vnet/flow/flow.api
738
739 ########################################
740 # IPFIX classify code
741 ########################################
742
743 libvnet_la_SOURCES +=                           \
744   vnet/flow/flow_report_classify.c
745
746 nobase_include_HEADERS +=                       \
747   vnet/flow/flow_report_classify.h
748
749 ########################################
750 # lawful intercept
751 ########################################
752
753 libvnet_la_SOURCES +=                           \
754   vnet/lawful-intercept/lawful_intercept.c      \
755   vnet/lawful-intercept/node.c
756
757 nobase_include_HEADERS +=                       \
758   vnet/lawful-intercept/lawful_intercept.h
759
760 ########################################
761 # SPAN (port mirroring)
762 ########################################
763
764 libvnet_la_SOURCES +=                           \
765   vnet/span/span_api.c  \
766   vnet/span/span.c          \
767   vnet/span/node.c
768
769 nobase_include_HEADERS +=                       \
770   vnet/span/span.api.h  \
771   vnet/span/span.h
772
773 API_FILES += vnet/span/span.api
774
775 ########################################
776 # Packet generator
777 ########################################
778
779 libvnet_la_SOURCES +=                           \
780   vnet/pg/cli.c                                 \
781   vnet/pg/edit.c                                \
782   vnet/pg/init.c                                \
783   vnet/pg/input.c                               \
784   vnet/pg/output.c                              \
785   vnet/pg/stream.c
786
787 nobase_include_HEADERS +=                       \
788   vnet/pg/pg.h                                  \
789   vnet/pg/edit.h
790
791 if !WITH_DPDK
792 libvnet_la_SOURCES +=                           \
793   vnet/devices/nic/ixge.c                       \
794   vnet/devices/nic/ixge.h                       \
795   vnet/devices/nic/sfp.c                        \
796   vnet/devices/nic/sfp.h
797 endif
798
799 ########################################
800 # virtio
801 ########################################
802
803 libvnet_la_SOURCES +=       \
804   vnet/devices/virtio/vhost-user.c      \
805   vnet/devices/virtio/vhost_user_api.c
806
807 nobase_include_HEADERS +=     \
808   vnet/devices/virtio/vhost-user.h      \
809   vnet/devices/virtio/vhost_user.api.h
810
811 API_FILES += vnet/devices/virtio/vhost_user.api
812
813 ########################################
814 # ssvm ethernet
815 ########################################
816 libvnet_la_SOURCES +=                           \
817   vnet/devices/ssvm/ssvm_eth.c                  \
818   vnet/devices/ssvm/node.c
819
820 nobase_include_HEADERS +=                       \
821   vnet/devices/ssvm/ssvm_eth.h
822
823 ########################################
824 # session managmeent
825 ########################################
826
827 libvnet_la_SOURCES +=                           \
828   vnet/session/session.c                        \
829   vnet/session/node.c                           \
830   vnet/session/transport.c                      \
831   vnet/session/application.c                    \
832   vnet/session/session_cli.c                    \
833   vnet/session/hashes.c                         \
834   vnet/session/application_interface.c          \
835   vnet/session/session_api.c
836
837 nobase_include_HEADERS +=                       \
838   vnet/session/session.h                        \
839   vnet/session/application.h                    \
840   vnet/session/transport.h                      \
841   vnet/session/application_interface.h
842
843 API_FILES += vnet/session/session.api
844
845 ########################################
846 # Linux packet interface
847 ########################################
848
849 libvnet_la_SOURCES +=                           \
850   vnet/devices/af_packet/af_packet.c            \
851   vnet/devices/af_packet/device.c               \
852   vnet/devices/af_packet/node.c                 \
853   vnet/devices/af_packet/cli.c                  \
854   vnet/devices/af_packet/af_packet_api.c
855
856 nobase_include_HEADERS +=                       \
857   vnet/devices/af_packet/af_packet.h    \
858   vnet/devices/af_packet/af_packet.api.h
859
860 API_FILES += vnet/devices/af_packet/af_packet.api
861
862 ########################################
863 # NETMAP interface
864 ########################################
865
866 libvnet_la_SOURCES +=                           \
867   vnet/devices/netmap/netmap.c                  \
868   vnet/devices/netmap/device.c                  \
869   vnet/devices/netmap/node.c                    \
870   vnet/devices/netmap/cli.c                     \
871   vnet/devices/netmap/netmap_api.c
872
873 nobase_include_HEADERS +=                       \
874   vnet/devices/netmap/netmap.h          \
875   vnet/devices/netmap/netmap.api.h
876
877 API_FILES += vnet/devices/netmap/netmap.api
878
879 ########################################
880 # Driver feature graph arc support
881 ########################################
882
883 libvnet_la_SOURCES +=                           \
884   vnet/feature/feature.c                        \
885   vnet/feature/registration.c
886
887 nobase_include_HEADERS +=                       \
888   vnet/feature/feature.h
889
890 ########################################
891 # Unix kernel related
892 ########################################
893
894 # FIXME: vnet/unix/hgshm.c
895
896 libvnet_la_SOURCES +=                           \
897   vnet/unix/gdb_funcs.c                         \
898   vnet/unix/pcap.c                              \
899   vnet/unix/tap_api.c                           \
900   vnet/unix/tapcli.c                            \
901   vnet/unix/tuntap.c
902
903 nobase_include_HEADERS +=                       \
904   vnet/unix/pcap.h                              \
905   vnet/unix/tuntap.h                            \
906   vnet/unix/tap.api.h                           \
907   vnet/unix/tapcli.h
908
909 API_FILES += vnet/unix/tap.api
910
911 ########################################
912 # FIB
913 ########################################
914
915 libvnet_la_SOURCES +=                           \
916   vnet/fib/fib.c                                \
917   vnet/fib/fib_test.c                           \
918   vnet/fib/ip4_fib.c                            \
919   vnet/fib/ip6_fib.c                            \
920   vnet/fib/mpls_fib.c                           \
921   vnet/fib/fib_table.c                          \
922   vnet/fib/fib_walk.c                           \
923   vnet/fib/fib_types.c                          \
924   vnet/fib/fib_node.c                           \
925   vnet/fib/fib_node_list.c                      \
926   vnet/fib/fib_entry.c                          \
927   vnet/fib/fib_entry_src.c                      \
928   vnet/fib/fib_entry_src_rr.c                   \
929   vnet/fib/fib_entry_src_interface.c            \
930   vnet/fib/fib_entry_src_default_route.c        \
931   vnet/fib/fib_entry_src_special.c              \
932   vnet/fib/fib_entry_src_api.c                  \
933   vnet/fib/fib_entry_src_adj.c                  \
934   vnet/fib/fib_entry_src_mpls.c                 \
935   vnet/fib/fib_entry_src_lisp.c                 \
936   vnet/fib/fib_entry_cover.c                    \
937   vnet/fib/fib_entry_delegate.c                 \
938   vnet/fib/fib_path_list.c                      \
939   vnet/fib/fib_path.c                           \
940   vnet/fib/fib_path_ext.c                       \
941   vnet/fib/fib_urpf_list.c                      \
942   vnet/fib/fib_attached_export.c
943
944 nobase_include_HEADERS +=                       \
945   vnet/fib/fib.h                                \
946   vnet/fib/fib_api.h                            \
947   vnet/fib/ip4_fib.h                            \
948   vnet/fib/ip6_fib.h                            \
949   vnet/fib/fib_types.h                          \
950   vnet/fib/fib_table.h                          \
951   vnet/fib/fib_node.h                           \
952   vnet/fib/fib_node_list.h                      \
953   vnet/fib/fib_entry.h                          \
954   vnet/fib/fib_entry_delegate.h
955
956 ########################################
957 # ADJ
958 ########################################
959
960 libvnet_la_SOURCES +=                           \
961   vnet/adj/adj_nbr.c                            \
962   vnet/adj/adj_glean.c                          \
963   vnet/adj/adj_midchain.c                       \
964   vnet/adj/adj_mcast.c                          \
965   vnet/adj/adj_l2.c                             \
966   vnet/adj/adj_nsh.c                            \
967   vnet/adj/adj.c
968
969 nobase_include_HEADERS +=                       \
970   vnet/adj/adj.h                                \
971   vnet/adj/adj_types.h                          \
972   vnet/adj/adj_glean.h                          \
973   vnet/adj/adj_nsh.h                            \
974   vnet/adj/adj_nbr.h
975
976 ########################################
977 # Data-Plane Objects
978 ########################################
979
980 libvnet_la_SOURCES +=                           \
981   vnet/dpo/dpo.c                                \
982   vnet/dpo/drop_dpo.c                           \
983   vnet/dpo/ip_null_dpo.c                        \
984   vnet/dpo/punt_dpo.c                           \
985   vnet/dpo/receive_dpo.c                        \
986   vnet/dpo/load_balance.c                       \
987   vnet/dpo/load_balance_map.c                   \
988   vnet/dpo/lookup_dpo.c                         \
989   vnet/dpo/classify_dpo.c                       \
990   vnet/dpo/replicate_dpo.c                      \
991   vnet/dpo/mpls_label_dpo.c
992
993 nobase_include_HEADERS +=                       \
994   vnet/dpo/load_balance.h                       \
995   vnet/dpo/drop_dpo.h                           \
996   vnet/dpo/lookup_dpo.h                         \
997   vnet/dpo/punt_dpo.h                           \
998   vnet/dpo/classify_dpo.h                       \
999   vnet/dpo/receive_dpo.h                        \
1000   vnet/dpo/ip_null_dpo.h                        \
1001   vnet/dpo/dpo.h
1002
1003 ########################################
1004 # Multicast FIB
1005 ########################################
1006
1007 libvnet_la_SOURCES +=                           \
1008   vnet/mfib/mfib_test.c                         \
1009   vnet/mfib/mfib_forward.c                      \
1010   vnet/mfib/ip4_mfib.c                          \
1011   vnet/mfib/ip6_mfib.c                          \
1012   vnet/mfib/mfib_types.c                        \
1013   vnet/mfib/mfib_signal.c                       \
1014   vnet/mfib/mfib_itf.c                          \
1015   vnet/mfib/mfib_entry.c                        \
1016   vnet/mfib/mfib_table.c
1017
1018 nobase_include_HEADERS +=                       \
1019   vnet/mfib/ip4_mfib.h                          \
1020   vnet/mfib/mfib_types.h                        \
1021   vnet/mfib/mfib_table.h
1022
1023 ########################################
1024 # Utilities
1025 ########################################
1026
1027 libvnet_la_SOURCES +=                    \
1028   vnet/util/radix.c
1029
1030 ########################################
1031 # Plugin client library
1032 ########################################
1033
1034 nobase_include_HEADERS +=                      \
1035   vnet/plugin/plugin.h
1036
1037 pcap2pg_SOURCES =                               \
1038   vnet/unix/pcap2pg.c                           \
1039   vnet/unix/pcap.h
1040
1041 pcap2pg_LDFLAGS = -static
1042 pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl
1043
1044 noinst_PROGRAMS += pcap2pg
1045
1046 # vi:syntax=automake