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