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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
14 AUTOMAKE_OPTIONS = foreign subdir-objects
16 AM_CFLAGS = -Wall @DPDK@ @VIRL@ @IPSEC@ @VCGN@ @IPV6SR@
19 libvnetplugin_la_SOURCES =
20 nobase_include_HEADERS =
23 ########################################
25 ########################################
26 libvnet_la_SOURCES += \
29 vnet/interface_cli.c \
30 vnet/interface_format.c \
31 vnet/interface_output.c \
36 nobase_include_HEADERS += \
42 vnet/interface_funcs.h \
49 ########################################
51 ########################################
53 libvnet_la_SOURCES += \
54 vnet/policer/node_funcs.c \
55 vnet/policer/policer.c \
58 nobase_include_HEADERS += \
59 vnet/policer/police.h \
63 ########################################
64 # Layer 2 protocols go here
65 ########################################
67 ########################################
68 # Layer 2 protocol: Ethernet
69 ########################################
70 libvnet_la_SOURCES += \
73 vnet/ethernet/format.c \
74 vnet/ethernet/init.c \
75 vnet/ethernet/interface.c \
76 vnet/ethernet/node.c \
79 nobase_include_HEADERS += \
80 vnet/ethernet/arp_packet.h \
81 vnet/ethernet/error.def \
82 vnet/ethernet/ethernet.h \
83 vnet/ethernet/packet.h \
84 vnet/ethernet/types.def
86 ########################################
87 # Layer 2 protocol: Ethernet bridging
88 ########################################
89 libvnet_la_SOURCES += \
90 vnet/l2/feat_bitmap.c \
93 vnet/l2/l2_classify.c \
94 vnet/l2/l2_efp_filter.c \
98 vnet/l2/l2_input_acl.c \
100 vnet/l2/l2_input_vtr.c \
102 vnet/l2/l2_output_acl.c \
103 vnet/l2/l2_output.c \
108 nobase_include_HEADERS += \
109 vnet/l2/feat_bitmap.h \
111 vnet/l2/l2_output.h \
113 vnet/l2/l2_input_vtr.h \
114 vnet/l2/l2_efp_filter.h \
121 vnet/l2/l2_classify.h
123 ########################################
124 # Layer 2 protocol: SRP
125 ########################################
126 libvnet_la_SOURCES += \
128 vnet/srp/interface.c \
132 nobase_include_HEADERS += \
136 ########################################
137 # Layer 2 protocol: PPP
138 ########################################
139 libvnet_la_SOURCES += \
144 nobase_include_HEADERS += \
149 ########################################
150 # Layer 2 protocol: HDLC
151 ########################################
152 libvnet_la_SOURCES += \
157 nobase_include_HEADERS += \
158 vnet/hdlc/error.def \
162 ########################################
163 # Layer 2 protocol: LLC
164 ########################################
165 libvnet_la_SOURCES += \
170 nobase_include_HEADERS += \
173 ########################################
174 # Layer 2 protocol: SNAP
175 ########################################
176 libvnet_la_SOURCES += \
181 nobase_include_HEADERS += \
184 ########################################
186 ########################################
187 libvnet_la_SOURCES += \
192 nobase_include_HEADERS += \
194 vnet/vxlan/vxlan_packet.h \
195 vnet/vxlan/vxlan_error.def
197 ########################################
199 ########################################
200 libvnet_la_SOURCES += \
201 vnet/cdp/cdp_input.c \
202 vnet/cdp/cdp_node.c \
203 vnet/cdp/cdp_periodic.c
205 nobase_include_HEADERS += \
206 vnet/cdp/cdp_protocol.h
208 ########################################
209 # Layer 2/3 "classify"
210 ########################################
211 libvnet_la_SOURCES += \
212 vnet/classify/vnet_classify.c \
213 vnet/classify/ip_classify.c \
214 vnet/classify/input_acl.c \
215 vnet/classify/vnet_classify.h
217 nobase_include_HEADERS += \
218 vnet/classify/vnet_classify.h \
219 vnet/classify/input_acl.h
221 ########################################
222 # Layer 3 protocols go here
223 ########################################
225 ########################################
226 # Layer 3 protocol: IP v4/v6
227 ########################################
228 libvnet_la_SOURCES += \
233 vnet/ip/ip4_format.c \
234 vnet/ip/ip4_forward.c \
235 vnet/ip/ip4_hop_by_hop.c \
236 vnet/ip/ip4_input.c \
237 vnet/ip/ip4_mtrie.c \
239 vnet/ip/ip4_source_check.c \
240 vnet/ip/ip6_format.c \
241 vnet/ip/ip6_forward.c \
242 vnet/ip/ip6_hop_by_hop.c \
243 vnet/ip/ip6_input.c \
244 vnet/ip/ip6_neighbor.c \
246 vnet/ip/ip_checksum.c \
250 vnet/ip/udp_format.c \
252 vnet/ip/udp_local.c \
254 vnet/ip/ip_input_acl.c \
257 nobase_include_HEADERS += \
259 vnet/ip/icmp46_packet.h \
262 vnet/ip/igmp_packet.h \
265 vnet/ip/ip4_mtrie.h \
266 vnet/ip/ip4_error.h \
267 vnet/ip/ip4_packet.h \
269 vnet/ip/ip6_error.h \
270 vnet/ip/ip6_hop_by_hop.h \
271 vnet/ip/ip6_hop_by_hop_packet.h \
272 vnet/ip/ip6_packet.h \
274 vnet/ip/ip_packet.h \
276 vnet/ip/protocols.def \
277 vnet/ip/tcp_packet.h \
279 vnet/ip/udp_error.def \
282 ########################################
283 # Layer 3 protocol: IPSec
284 ########################################
286 libvnet_la_SOURCES += \
288 vnet/ipsec/ipsec_cli.c \
289 vnet/ipsec/ipsec_format.c \
290 vnet/ipsec/ipsec_output.c \
291 vnet/ipsec/ipsec_input.c \
292 vnet/ipsec/ipsec_if.c \
293 vnet/ipsec/ipsec_if_in.c \
294 vnet/ipsec/ipsec_if_out.c \
295 vnet/ipsec/esp_encrypt.c \
296 vnet/ipsec/esp_decrypt.c \
298 vnet/ipsec/ikev2_crypto.c \
299 vnet/ipsec/ikev2_cli.c \
300 vnet/ipsec/ikev2_payload.c \
301 vnet/ipsec/ikev2_format.c
304 nobase_include_HEADERS += \
308 vnet/ipsec/ikev2_priv.h
310 ########################################
311 # Layer 3 protocol: osi
312 ########################################
313 libvnet_la_SOURCES += \
318 nobase_include_HEADERS += \
321 ########################################
322 # Layer 3 protocol: MAP
323 ########################################
324 libvnet_la_SOURCES += \
329 vnet/map/ip4_sixrd.c \
330 vnet/map/ip6_sixrd.c \
331 vnet/map/ip4_map_t.c \
334 nobase_include_HEADERS += \
338 ########################################
339 # Tunnel protocol: gre
340 ########################################
341 libvnet_la_SOURCES += \
344 vnet/gre/interface.c \
347 nobase_include_HEADERS += \
352 ########################################
353 # Tunnel protocol: l2tpv3
354 ########################################
355 libvnet_la_SOURCES += \
361 nobase_include_HEADERS += \
365 ########################################
366 # Tunnel protocol: gre+mpls
367 ########################################
368 libvnet_la_SOURCES += \
369 vnet/mpls-gre/mpls.c \
370 vnet/mpls-gre/node.c \
371 vnet/mpls-gre/interface.c \
372 vnet/mpls-gre/policy_encap.c \
375 nobase_include_HEADERS += \
376 vnet/mpls-gre/mpls.h \
377 vnet/mpls-gre/packet.h \
378 vnet/mpls-gre/error.def
381 ########################################
382 # Tunnel protocol: nsh-gre
383 ########################################
385 libvnet_la_SOURCES += \
386 vnet/nsh-gre/nsh_gre.c \
387 vnet/nsh-gre/encap.c \
390 nobase_include_HEADERS += \
391 vnet/nsh-gre/nsh_gre.h \
392 vnet/nsh-gre/nsh_gre_packet.h \
393 vnet/nsh-gre/nsh_gre_error.def
395 ########################################
396 # Tunnel protocol: nsh-vxlan-gpe
397 ########################################
399 libvnet_la_SOURCES += \
400 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.c \
401 vnet/nsh-vxlan-gpe/encap.c \
402 vnet/nsh-vxlan-gpe/decap.c
404 nobase_include_HEADERS += \
405 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.h \
406 vnet/nsh-vxlan-gpe/vxlan_gpe_packet.h \
407 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe_error.def
409 ########################################
410 # Tunnel protocol: lisp-gpe
411 ########################################
413 libvnet_la_SOURCES += \
414 vnet/lisp-gpe/lisp_gpe.c \
415 vnet/lisp-gpe/encap.c \
416 vnet/lisp-gpe/decap.c
418 nobase_include_HEADERS += \
419 vnet/lisp-gpe/lisp_gpe.h \
420 vnet/lisp-gpe/lisp_gpe_packet.h \
421 vnet/lisp-gpe/lisp_gpe_error.def
423 ########################################
425 ########################################
426 libvnet_la_SOURCES += \
430 nobase_include_HEADERS += \
433 ########################################
435 ########################################
436 libvnet_la_SOURCES += \
437 vnet/dhcp/proxy_node.c \
440 nobase_include_HEADERS += \
443 vnet/dhcp/proxy_error.def
445 ########################################
446 # ipv6 segment routing
447 ########################################
450 libvnet_la_SOURCES += \
454 nobase_include_HEADERS += \
455 vnet/sr/sr_packet.h \
456 vnet/sr/sr_error.def \
459 ########################################
461 #########################################
464 libvnet_la_SOURCES += \
465 vnet/vcgn/cnat_bulk_port.c \
466 vnet/vcgn/cnat_config.c \
467 vnet/vcgn/cnat_db_scanner.c \
468 vnet/vcgn/cnat_db_v2.c \
469 vnet/vcgn/cnat_debug_msg_handler.c \
470 vnet/vcgn/cnat_cli_handler.c \
471 vnet/vcgn/cnat_global.c \
472 vnet/vcgn/cnat_ipv4_udp_inside_input.c \
473 vnet/vcgn/cnat_ipv4_udp_inside_input_exceptions.c \
474 vnet/vcgn/cnat_ipv4_udp_outside_input.c \
475 vnet/vcgn/cnat_ipv4_tcp_inside_input.c \
476 vnet/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c \
477 vnet/vcgn/cnat_ipv4_tcp_outside_input.c \
478 vnet/vcgn/cnat_ipv4_icmp_query_inside_input.c \
479 vnet/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c \
480 vnet/vcgn/cnat_ipv4_icmp_query_outside_input.c \
481 vnet/vcgn/cnat_ipv4_icmp_error_inside_input.c \
482 vnet/vcgn/cnat_ipv4_icmp_error_outside_input.c \
483 vnet/vcgn/cnat_logging.c \
484 vnet/vcgn/cnat_ports.c \
485 vnet/vcgn/cnat_util.c \
486 vnet/vcgn/cnat_show.c \
487 vnet/vcgn/cnat_syslog.c \
488 vnet/vcgn/cnat_v4_functions.c \
489 vnet/vcgn/index_list.c \
490 vnet/vcgn/spp_platform_trace_log.c \
491 vnet/vcgn/vcgn_classify.c
494 ########################################
496 ########################################
497 libvnet_la_SOURCES += \
498 vnet/dhcpv6/proxy_node.c
500 nobase_include_HEADERS += \
501 vnet/dhcpv6/packet.h \
502 vnet/dhcpv6/proxy.h \
503 vnet/dhcpv6/proxy_error.def
505 ########################################
506 # IPFIX / netflow v10
507 ########################################
508 libvnet_la_SOURCES += \
509 vnet/flow/flow_report.c
511 nobase_include_HEADERS += \
512 vnet/flow/flow_report.h \
513 vnet/flow/ipfix_info_elements.h \
514 vnet/flow/ipfix_packet.h
516 ########################################
518 ########################################
520 libvnet_la_SOURCES += \
521 vnet/flow/flow_report_sample.c
523 nobase_include_HEADERS += \
524 vnet/flow/flow_report_sample.h
526 ########################################
528 ########################################
530 libvnet_la_SOURCES += \
531 vnet/lawful-intercept/lawful_intercept.c \
532 vnet/lawful-intercept/node.c
534 nobase_include_HEADERS += \
535 vnet/dpdk_replication.h \
536 vnet/lawful-intercept/lawful_intercept.h
538 ########################################
540 ########################################
542 libvnet_la_SOURCES += \
550 nobase_include_HEADERS += \
554 ########################################
556 ########################################
558 libvnet_la_SOURCES += \
559 vnet/devices/dpdk/dpdk_priv.h \
560 vnet/devices/dpdk/device.c \
561 vnet/devices/dpdk/init.c \
562 vnet/devices/dpdk/node.c \
563 vnet/devices/dpdk/threads.c \
564 vnet/devices/dpdk/vhost_user.c \
565 vnet/devices/dpdk/cli.c
567 nobase_include_HEADERS += \
568 vnet/devices/dpdk/dpdk.h \
569 vnet/devices/dpdk/threads.h
572 ########################################
574 ########################################
577 libvnet_la_SOURCES += \
578 vnet/devices/virtio/vhost-user.c
580 nobase_include_HEADERS += \
581 vnet/devices/virtio/vhost-user.h
584 ########################################
586 ########################################
587 libvnet_la_SOURCES += \
588 vnet/devices/ssvm/ssvm_eth.c \
589 vnet/devices/ssvm/node.c
591 nobase_include_HEADERS += \
592 vnet/devices/ssvm/ssvm_eth.h
594 ########################################
595 # Unix kernel related
596 ########################################
598 # FIXME: vnet/unix/hgshm.c
600 libvnet_la_SOURCES += \
601 vnet/unix/gdb_funcs.c \
606 nobase_include_HEADERS += \
611 ########################################
612 # Plugin client library
613 ########################################
615 libvnetplugin_la_SOURCES += \
618 nobase_include_HEADERS += \
621 lib_LTLIBRARIES = libvnet.la libvnetplugin.la
626 dpdk_libs += -l:libdpdk.a
630 vnet/unix/pcap2pg.c \
633 pcap2pg_LDFLAGS = -static
634 pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
636 noinst_PROGRAMS += pcap2pg