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 nobase_include_HEADERS =
22 ########################################
24 ########################################
25 libvnet_la_SOURCES += \
28 vnet/interface_cli.c \
29 vnet/interface_format.c \
30 vnet/interface_output.c \
35 nobase_include_HEADERS += \
41 vnet/interface_funcs.h \
44 vnet/plugin/plugin.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 \
62 ########################################
64 ########################################
66 libvnet_la_SOURCES += \
69 vnet/cop/ip4_whitelist.c \
70 vnet/cop/ip6_whitelist.c
72 nobase_include_HEADERS += \
75 ########################################
76 # Layer 2 protocols go here
77 ########################################
79 ########################################
80 # Layer 2 protocol: Ethernet
81 ########################################
82 libvnet_la_SOURCES += \
85 vnet/ethernet/format.c \
86 vnet/ethernet/init.c \
87 vnet/ethernet/interface.c \
88 vnet/ethernet/node.c \
91 nobase_include_HEADERS += \
92 vnet/ethernet/arp_packet.h \
93 vnet/ethernet/error.def \
94 vnet/ethernet/ethernet.h \
95 vnet/ethernet/packet.h \
96 vnet/ethernet/types.def
98 ########################################
99 # Layer 2 protocol: Ethernet bridging
100 ########################################
101 libvnet_la_SOURCES += \
102 vnet/l2/feat_bitmap.c \
105 vnet/l2/l2_classify.c \
106 vnet/l2/l2_efp_filter.c \
110 vnet/l2/l2_input_acl.c \
112 vnet/l2/l2_input_vtr.c \
114 vnet/l2/l2_output_acl.c \
115 vnet/l2/l2_output.c \
120 nobase_include_HEADERS += \
121 vnet/l2/feat_bitmap.h \
123 vnet/l2/l2_output.h \
125 vnet/l2/l2_input_vtr.h \
126 vnet/l2/l2_efp_filter.h \
133 vnet/l2/l2_classify.h
135 ########################################
136 # Layer 2 protocol: SRP
137 ########################################
138 libvnet_la_SOURCES += \
140 vnet/srp/interface.c \
144 nobase_include_HEADERS += \
148 ########################################
149 # Layer 2 protocol: PPP
150 ########################################
151 libvnet_la_SOURCES += \
156 nobase_include_HEADERS += \
161 ########################################
162 # Layer 2 protocol: HDLC
163 ########################################
164 libvnet_la_SOURCES += \
169 nobase_include_HEADERS += \
170 vnet/hdlc/error.def \
174 ########################################
175 # Layer 2 protocol: LLC
176 ########################################
177 libvnet_la_SOURCES += \
182 nobase_include_HEADERS += \
185 ########################################
186 # Layer 2 protocol: SNAP
187 ########################################
188 libvnet_la_SOURCES += \
193 nobase_include_HEADERS += \
196 ########################################
198 ########################################
199 libvnet_la_SOURCES += \
204 nobase_include_HEADERS += \
206 vnet/vxlan/vxlan_packet.h \
207 vnet/vxlan/vxlan_error.def
209 ########################################
211 ########################################
212 libvnet_la_SOURCES += \
213 vnet/cdp/cdp_input.c \
214 vnet/cdp/cdp_node.c \
215 vnet/cdp/cdp_periodic.c
217 nobase_include_HEADERS += \
218 vnet/cdp/cdp_protocol.h
220 ########################################
221 # Layer 2/3 "classify"
222 ########################################
223 libvnet_la_SOURCES += \
224 vnet/classify/vnet_classify.c \
225 vnet/classify/ip_classify.c \
226 vnet/classify/input_acl.c \
227 vnet/classify/vnet_classify.h
229 nobase_include_HEADERS += \
230 vnet/classify/vnet_classify.h \
231 vnet/classify/input_acl.h
233 ########################################
234 # Layer 3 protocols go here
235 ########################################
237 ########################################
238 # Layer 3 protocol: IP v4/v6
239 ########################################
240 libvnet_la_SOURCES += \
245 vnet/ip/ip4_format.c \
246 vnet/ip/ip4_forward.c \
247 vnet/ip/ip4_hop_by_hop.c \
248 vnet/ip/ip4_input.c \
249 vnet/ip/ip4_mtrie.c \
251 vnet/ip/ip4_source_check.c \
252 vnet/ip/ip6_format.c \
253 vnet/ip/ip6_forward.c \
254 vnet/ip/ip6_hop_by_hop.c \
255 vnet/ip/ip6_input.c \
256 vnet/ip/ip6_neighbor.c \
258 vnet/ip/ip_checksum.c \
262 vnet/ip/udp_format.c \
264 vnet/ip/udp_local.c \
266 vnet/ip/ip_input_acl.c \
269 nobase_include_HEADERS += \
271 vnet/ip/icmp46_packet.h \
274 vnet/ip/igmp_packet.h \
277 vnet/ip/ip4_mtrie.h \
278 vnet/ip/ip4_error.h \
279 vnet/ip/ip4_packet.h \
281 vnet/ip/ip6_error.h \
282 vnet/ip/ip6_hop_by_hop.h \
283 vnet/ip/ip6_hop_by_hop_packet.h \
284 vnet/ip/ip6_packet.h \
286 vnet/ip/ip_packet.h \
288 vnet/ip/protocols.def \
289 vnet/ip/tcp_packet.h \
291 vnet/ip/udp_error.def \
294 ########################################
295 # Layer 3 protocol: IPSec
296 ########################################
298 libvnet_la_SOURCES += \
300 vnet/ipsec/ipsec_cli.c \
301 vnet/ipsec/ipsec_format.c \
302 vnet/ipsec/ipsec_output.c \
303 vnet/ipsec/ipsec_input.c \
304 vnet/ipsec/ipsec_if.c \
305 vnet/ipsec/ipsec_if_in.c \
306 vnet/ipsec/ipsec_if_out.c \
307 vnet/ipsec/esp_encrypt.c \
308 vnet/ipsec/esp_decrypt.c \
310 vnet/ipsec/ikev2_crypto.c \
311 vnet/ipsec/ikev2_cli.c \
312 vnet/ipsec/ikev2_payload.c \
313 vnet/ipsec/ikev2_format.c
316 nobase_include_HEADERS += \
320 vnet/ipsec/ikev2_priv.h
322 ########################################
323 # Layer 3 protocol: osi
324 ########################################
325 libvnet_la_SOURCES += \
330 nobase_include_HEADERS += \
333 ########################################
334 # Layer 3 protocol: MAP
335 ########################################
336 libvnet_la_SOURCES += \
341 vnet/map/ip4_sixrd.c \
342 vnet/map/ip6_sixrd.c \
343 vnet/map/ip4_map_t.c \
346 nobase_include_HEADERS += \
350 ########################################
351 # Tunnel protocol: gre
352 ########################################
353 libvnet_la_SOURCES += \
356 vnet/gre/interface.c \
359 nobase_include_HEADERS += \
364 ########################################
365 # Tunnel protocol: l2tpv3
366 ########################################
367 libvnet_la_SOURCES += \
373 nobase_include_HEADERS += \
377 ########################################
378 # Tunnel protocol: gre+mpls
379 ########################################
380 libvnet_la_SOURCES += \
381 vnet/mpls-gre/mpls.c \
382 vnet/mpls-gre/node.c \
383 vnet/mpls-gre/interface.c \
384 vnet/mpls-gre/policy_encap.c \
387 nobase_include_HEADERS += \
388 vnet/mpls-gre/mpls.h \
389 vnet/mpls-gre/packet.h \
390 vnet/mpls-gre/error.def
393 ########################################
394 # Tunnel protocol: nsh-gre
395 ########################################
397 libvnet_la_SOURCES += \
398 vnet/nsh-gre/nsh_gre.c \
399 vnet/nsh-gre/encap.c \
402 nobase_include_HEADERS += \
403 vnet/nsh-gre/nsh_gre.h \
404 vnet/nsh-gre/nsh_gre_packet.h \
405 vnet/nsh-gre/nsh_gre_error.def
407 ########################################
408 # Tunnel protocol: nsh-vxlan-gpe
409 ########################################
411 libvnet_la_SOURCES += \
412 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.c \
413 vnet/nsh-vxlan-gpe/encap.c \
414 vnet/nsh-vxlan-gpe/decap.c
416 nobase_include_HEADERS += \
417 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.h \
418 vnet/nsh-vxlan-gpe/vxlan_gpe_packet.h \
419 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe_error.def
421 ########################################
422 # Tunnel protocol: lisp-gpe
423 ########################################
425 libvnet_la_SOURCES += \
426 vnet/lisp-gpe/lisp_gpe.c \
427 vnet/lisp-gpe/encap.c \
428 vnet/lisp-gpe/decap.c
430 nobase_include_HEADERS += \
431 vnet/lisp-gpe/lisp_gpe.h \
432 vnet/lisp-gpe/lisp_gpe_packet.h \
433 vnet/lisp-gpe/lisp_gpe_error.def
435 ########################################
437 ########################################
438 libvnet_la_SOURCES += \
442 nobase_include_HEADERS += \
445 ########################################
447 ########################################
448 libvnet_la_SOURCES += \
449 vnet/dhcp/proxy_node.c \
452 nobase_include_HEADERS += \
455 vnet/dhcp/proxy_error.def
457 ########################################
458 # ipv6 segment routing
459 ########################################
462 libvnet_la_SOURCES += \
466 nobase_include_HEADERS += \
467 vnet/sr/sr_packet.h \
468 vnet/sr/sr_error.def \
471 ########################################
473 #########################################
476 libvnet_la_SOURCES += \
477 vnet/vcgn/cnat_bulk_port.c \
478 vnet/vcgn/cnat_config.c \
479 vnet/vcgn/cnat_db_scanner.c \
480 vnet/vcgn/cnat_db_v2.c \
481 vnet/vcgn/cnat_debug_msg_handler.c \
482 vnet/vcgn/cnat_cli_handler.c \
483 vnet/vcgn/cnat_global.c \
484 vnet/vcgn/cnat_ipv4_udp_inside_input.c \
485 vnet/vcgn/cnat_ipv4_udp_inside_input_exceptions.c \
486 vnet/vcgn/cnat_ipv4_udp_outside_input.c \
487 vnet/vcgn/cnat_ipv4_tcp_inside_input.c \
488 vnet/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c \
489 vnet/vcgn/cnat_ipv4_tcp_outside_input.c \
490 vnet/vcgn/cnat_ipv4_icmp_query_inside_input.c \
491 vnet/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c \
492 vnet/vcgn/cnat_ipv4_icmp_query_outside_input.c \
493 vnet/vcgn/cnat_ipv4_icmp_error_inside_input.c \
494 vnet/vcgn/cnat_ipv4_icmp_error_outside_input.c \
495 vnet/vcgn/cnat_logging.c \
496 vnet/vcgn/cnat_ports.c \
497 vnet/vcgn/cnat_util.c \
498 vnet/vcgn/cnat_show.c \
499 vnet/vcgn/cnat_syslog.c \
500 vnet/vcgn/cnat_v4_functions.c \
501 vnet/vcgn/index_list.c \
502 vnet/vcgn/spp_platform_trace_log.c \
503 vnet/vcgn/vcgn_classify.c
506 ########################################
508 ########################################
509 libvnet_la_SOURCES += \
510 vnet/dhcpv6/proxy_node.c
512 nobase_include_HEADERS += \
513 vnet/dhcpv6/packet.h \
514 vnet/dhcpv6/proxy.h \
515 vnet/dhcpv6/proxy_error.def
517 ########################################
518 # IPFIX / netflow v10
519 ########################################
520 libvnet_la_SOURCES += \
521 vnet/flow/flow_report.c
523 nobase_include_HEADERS += \
524 vnet/flow/flow_report.h \
525 vnet/flow/ipfix_info_elements.h \
526 vnet/flow/ipfix_packet.h
528 ########################################
530 ########################################
532 libvnet_la_SOURCES += \
533 vnet/flow/flow_report_sample.c
535 nobase_include_HEADERS += \
536 vnet/flow/flow_report_sample.h
538 ########################################
540 ########################################
542 libvnet_la_SOURCES += \
543 vnet/lawful-intercept/lawful_intercept.c \
544 vnet/lawful-intercept/node.c
546 nobase_include_HEADERS += \
547 vnet/dpdk_replication.h \
548 vnet/lawful-intercept/lawful_intercept.h
550 ########################################
552 ########################################
554 libvnet_la_SOURCES += \
562 nobase_include_HEADERS += \
566 ########################################
568 ########################################
570 libvnet_la_SOURCES += \
571 vnet/devices/dpdk/dpdk_priv.h \
572 vnet/devices/dpdk/device.c \
573 vnet/devices/dpdk/format.c \
574 vnet/devices/dpdk/init.c \
575 vnet/devices/dpdk/node.c \
576 vnet/devices/dpdk/threads.c \
577 vnet/devices/dpdk/vhost_user.c \
578 vnet/devices/dpdk/cli.c
580 nobase_include_HEADERS += \
581 vnet/devices/dpdk/dpdk.h \
582 vnet/devices/dpdk/threads.h
585 ########################################
587 ########################################
590 libvnet_la_SOURCES += \
591 vnet/devices/virtio/vhost-user.c
593 nobase_include_HEADERS += \
594 vnet/devices/virtio/vhost-user.h
597 ########################################
599 ########################################
600 libvnet_la_SOURCES += \
601 vnet/devices/ssvm/ssvm_eth.c \
602 vnet/devices/ssvm/node.c
604 nobase_include_HEADERS += \
605 vnet/devices/ssvm/ssvm_eth.h
607 ########################################
608 # Unix kernel related
609 ########################################
611 # FIXME: vnet/unix/hgshm.c
613 libvnet_la_SOURCES += \
614 vnet/unix/gdb_funcs.c \
619 nobase_include_HEADERS += \
624 lib_LTLIBRARIES = libvnet.la
629 dpdk_libs += -l:libdpdk.a
633 vnet/unix/pcap2pg.c \
636 pcap2pg_LDFLAGS = -static
637 pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
639 noinst_PROGRAMS += pcap2pg