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 \
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_input.c \
303 vnet/ipsec/ipsec_if.c \
304 vnet/ipsec/ipsec_if_in.c \
305 vnet/ipsec/ipsec_if_out.c \
306 vnet/ipsec/esp_encrypt.c \
307 vnet/ipsec/esp_decrypt.c \
309 vnet/ipsec/ikev2_crypto.c \
310 vnet/ipsec/ikev2_cli.c \
311 vnet/ipsec/ikev2_payload.c \
312 vnet/ipsec/ikev2_format.c
315 libvnet_la_SOURCES += \
316 vnet/ipsec/ipsec_output.c
318 nobase_include_HEADERS += \
322 vnet/ipsec/ikev2_priv.h
324 ########################################
325 # Layer 3 protocol: osi
326 ########################################
327 libvnet_la_SOURCES += \
332 nobase_include_HEADERS += \
335 ########################################
336 # Layer 3 protocol: MAP
337 ########################################
338 libvnet_la_SOURCES += \
343 vnet/map/ip4_sixrd.c \
344 vnet/map/ip6_sixrd.c \
345 vnet/map/ip4_map_t.c \
348 nobase_include_HEADERS += \
352 ########################################
353 # Tunnel protocol: gre
354 ########################################
355 libvnet_la_SOURCES += \
358 vnet/gre/interface.c \
361 nobase_include_HEADERS += \
366 ########################################
367 # Tunnel protocol: l2tpv3
368 ########################################
369 libvnet_la_SOURCES += \
375 nobase_include_HEADERS += \
379 ########################################
380 # Tunnel protocol: gre+mpls
381 ########################################
382 libvnet_la_SOURCES += \
383 vnet/mpls-gre/mpls.c \
384 vnet/mpls-gre/node.c \
385 vnet/mpls-gre/interface.c \
386 vnet/mpls-gre/policy_encap.c \
389 nobase_include_HEADERS += \
390 vnet/mpls-gre/mpls.h \
391 vnet/mpls-gre/packet.h \
392 vnet/mpls-gre/error.def
395 ########################################
396 # Tunnel protocol: nsh-gre
397 ########################################
399 libvnet_la_SOURCES += \
400 vnet/nsh-gre/nsh_gre.c \
401 vnet/nsh-gre/encap.c \
404 nobase_include_HEADERS += \
405 vnet/nsh-gre/nsh_gre.h \
406 vnet/nsh-gre/nsh_gre_packet.h \
407 vnet/nsh-gre/nsh_gre_error.def
409 ########################################
410 # Tunnel protocol: nsh-vxlan-gpe
411 ########################################
413 libvnet_la_SOURCES += \
414 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.c \
415 vnet/nsh-vxlan-gpe/encap.c \
416 vnet/nsh-vxlan-gpe/decap.c
418 nobase_include_HEADERS += \
419 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.h \
420 vnet/nsh-vxlan-gpe/vxlan_gpe_packet.h \
421 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe_error.def
423 ########################################
424 # Tunnel protocol: lisp-gpe
425 ########################################
427 libvnet_la_SOURCES += \
428 vnet/lisp-gpe/lisp_gpe.c \
429 vnet/lisp-gpe/encap.c \
430 vnet/lisp-gpe/decap.c
432 nobase_include_HEADERS += \
433 vnet/lisp-gpe/lisp_gpe.h \
434 vnet/lisp-gpe/lisp_gpe_packet.h \
435 vnet/lisp-gpe/lisp_gpe_error.def
437 ########################################
439 ########################################
440 libvnet_la_SOURCES += \
444 nobase_include_HEADERS += \
447 ########################################
449 ########################################
450 libvnet_la_SOURCES += \
451 vnet/dhcp/proxy_node.c \
454 nobase_include_HEADERS += \
457 vnet/dhcp/proxy_error.def
459 ########################################
460 # ipv6 segment routing
461 ########################################
464 libvnet_la_SOURCES += \
468 nobase_include_HEADERS += \
469 vnet/sr/sr_packet.h \
470 vnet/sr/sr_error.def \
473 ########################################
475 #########################################
478 libvnet_la_SOURCES += \
479 vnet/vcgn/cnat_bulk_port.c \
480 vnet/vcgn/cnat_config.c \
481 vnet/vcgn/cnat_db_scanner.c \
482 vnet/vcgn/cnat_db_v2.c \
483 vnet/vcgn/cnat_debug_msg_handler.c \
484 vnet/vcgn/cnat_cli_handler.c \
485 vnet/vcgn/cnat_global.c \
486 vnet/vcgn/cnat_ipv4_udp_inside_input.c \
487 vnet/vcgn/cnat_ipv4_udp_inside_input_exceptions.c \
488 vnet/vcgn/cnat_ipv4_udp_outside_input.c \
489 vnet/vcgn/cnat_ipv4_tcp_inside_input.c \
490 vnet/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c \
491 vnet/vcgn/cnat_ipv4_tcp_outside_input.c \
492 vnet/vcgn/cnat_ipv4_icmp_query_inside_input.c \
493 vnet/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c \
494 vnet/vcgn/cnat_ipv4_icmp_query_outside_input.c \
495 vnet/vcgn/cnat_ipv4_icmp_error_inside_input.c \
496 vnet/vcgn/cnat_ipv4_icmp_error_outside_input.c \
497 vnet/vcgn/cnat_logging.c \
498 vnet/vcgn/cnat_ports.c \
499 vnet/vcgn/cnat_util.c \
500 vnet/vcgn/cnat_show.c \
501 vnet/vcgn/cnat_syslog.c \
502 vnet/vcgn/cnat_v4_functions.c \
503 vnet/vcgn/index_list.c \
504 vnet/vcgn/spp_platform_trace_log.c \
505 vnet/vcgn/vcgn_classify.c
508 ########################################
510 ########################################
511 libvnet_la_SOURCES += \
512 vnet/dhcpv6/proxy_node.c
514 nobase_include_HEADERS += \
515 vnet/dhcpv6/packet.h \
516 vnet/dhcpv6/proxy.h \
517 vnet/dhcpv6/proxy_error.def
519 ########################################
520 # IPFIX / netflow v10
521 ########################################
522 libvnet_la_SOURCES += \
523 vnet/flow/flow_report.c
525 nobase_include_HEADERS += \
526 vnet/flow/flow_report.h \
527 vnet/flow/ipfix_info_elements.h \
528 vnet/flow/ipfix_packet.h
530 ########################################
532 ########################################
534 libvnet_la_SOURCES += \
535 vnet/flow/flow_report_sample.c
537 nobase_include_HEADERS += \
538 vnet/flow/flow_report_sample.h
540 ########################################
542 ########################################
544 libvnet_la_SOURCES += \
545 vnet/lawful-intercept/lawful_intercept.c \
546 vnet/lawful-intercept/node.c
548 nobase_include_HEADERS += \
549 vnet/dpdk_replication.h \
550 vnet/lawful-intercept/lawful_intercept.h
552 ########################################
554 ########################################
556 libvnet_la_SOURCES += \
564 nobase_include_HEADERS += \
568 ########################################
570 ########################################
572 libvnet_la_SOURCES += \
573 vnet/devices/dpdk/dpdk_priv.h \
574 vnet/devices/dpdk/device.c \
575 vnet/devices/dpdk/format.c \
576 vnet/devices/dpdk/init.c \
577 vnet/devices/dpdk/node.c \
578 vnet/devices/dpdk/threads.c \
579 vnet/devices/dpdk/vhost_user.c \
580 vnet/devices/dpdk/cli.c
582 nobase_include_HEADERS += \
583 vnet/devices/dpdk/dpdk.h \
584 vnet/devices/dpdk/threads.h
587 ########################################
589 ########################################
592 libvnet_la_SOURCES += \
593 vnet/devices/virtio/vhost-user.c
595 nobase_include_HEADERS += \
596 vnet/devices/virtio/vhost-user.h
599 ########################################
601 ########################################
602 libvnet_la_SOURCES += \
603 vnet/devices/ssvm/ssvm_eth.c \
604 vnet/devices/ssvm/node.c
606 nobase_include_HEADERS += \
607 vnet/devices/ssvm/ssvm_eth.h
609 ########################################
610 # Linux packet interface
611 ########################################
613 libvnet_la_SOURCES += \
614 vnet/devices/af_packet/af_packet.c \
615 vnet/devices/af_packet/device.c \
616 vnet/devices/af_packet/node.c \
617 vnet/devices/af_packet/cli.c
619 nobase_include_HEADERS += \
620 vnet/devices/af_packet/af_packet.h
622 ########################################
623 # Unix kernel related
624 ########################################
626 # FIXME: vnet/unix/hgshm.c
628 libvnet_la_SOURCES += \
629 vnet/unix/gdb_funcs.c \
634 nobase_include_HEADERS += \
639 ########################################
640 # Plugin client library
641 ########################################
643 libvnetplugin_la_SOURCES += \
646 nobase_include_HEADERS += \
649 lib_LTLIBRARIES = libvnet.la libvnetplugin.la
654 dpdk_libs += -l:libdpdk.a
658 vnet/unix/pcap2pg.c \
661 pcap2pg_LDFLAGS = -static
662 pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
664 noinst_PROGRAMS += pcap2pg