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 ########################################
198 # Layer 2/3 "classify"
199 ########################################
200 libvnet_la_SOURCES += \
201 vnet/classify/vnet_classify.c \
202 vnet/classify/ip_classify.c \
203 vnet/classify/input_acl.c \
204 vnet/classify/vnet_classify.h
206 nobase_include_HEADERS += \
207 vnet/classify/vnet_classify.h \
208 vnet/classify/input_acl.h
210 ########################################
211 # Layer 3 protocols go here
212 ########################################
215 # vnet/ip/tcp_format.c \
216 # vnet/ip/tcp_init.c \
220 ########################################
221 # Layer 3 protocol: IP v4/v6
222 ########################################
223 libvnet_la_SOURCES += \
228 vnet/ip/ip4_format.c \
229 vnet/ip/ip4_forward.c \
230 vnet/ip/ip4_hop_by_hop.c \
231 vnet/ip/ip4_input.c \
232 vnet/ip/ip4_mtrie.c \
234 vnet/ip/ip4_source_check.c \
235 vnet/ip/ip6_format.c \
236 vnet/ip/ip6_forward.c \
237 vnet/ip/ip6_hop_by_hop.c \
238 vnet/ip/ip6_input.c \
239 vnet/ip/ip6_neighbor.c \
241 vnet/ip/ip_checksum.c \
245 vnet/ip/udp_format.c \
247 vnet/ip/udp_local.c \
249 vnet/ip/ip_input_acl.c \
252 nobase_include_HEADERS += \
254 vnet/ip/icmp46_packet.h \
257 vnet/ip/igmp_packet.h \
260 vnet/ip/ip4_mtrie.h \
261 vnet/ip/ip4_error.h \
262 vnet/ip/ip4_packet.h \
264 vnet/ip/ip6_error.h \
265 vnet/ip/ip6_hop_by_hop.h \
266 vnet/ip/ip6_hop_by_hop_packet.h \
267 vnet/ip/ip6_packet.h \
269 vnet/ip/ip_packet.h \
271 vnet/ip/protocols.def \
273 vnet/ip/tcp_packet.h \
275 vnet/ip/udp_error.def \
278 ########################################
279 # Layer 3 protocol: IPSec
280 ########################################
282 libvnet_la_SOURCES += \
284 vnet/ipsec/ipsec_cli.c \
285 vnet/ipsec/ipsec_format.c \
286 vnet/ipsec/ipsec_output.c \
287 vnet/ipsec/ipsec_input.c \
288 vnet/ipsec/ipsec_if.c \
289 vnet/ipsec/ipsec_if_in.c \
290 vnet/ipsec/ipsec_if_out.c \
291 vnet/ipsec/esp_encrypt.c \
292 vnet/ipsec/esp_decrypt.c \
294 vnet/ipsec/ikev2_crypto.c \
295 vnet/ipsec/ikev2_cli.c \
296 vnet/ipsec/ikev2_payload.c \
297 vnet/ipsec/ikev2_format.c
300 nobase_include_HEADERS += \
304 vnet/ipsec/ikev2_priv.h
306 ########################################
307 # Layer 3 protocol: osi
308 ########################################
309 libvnet_la_SOURCES += \
314 nobase_include_HEADERS += \
317 ########################################
318 # Layer 3 protocol: MAP
319 ########################################
320 libvnet_la_SOURCES += \
325 vnet/map/ip4_sixrd.c \
326 vnet/map/ip6_sixrd.c \
327 vnet/map/ip4_map_t.c \
330 nobase_include_HEADERS += \
334 ########################################
335 # Tunnel protocol: gre
336 ########################################
337 libvnet_la_SOURCES += \
340 vnet/gre/interface.c \
343 nobase_include_HEADERS += \
348 ########################################
349 # Tunnel protocol: l2tpv3
350 ########################################
351 libvnet_la_SOURCES += \
357 nobase_include_HEADERS += \
361 ########################################
362 # Tunnel protocol: gre+mpls
363 ########################################
364 libvnet_la_SOURCES += \
365 vnet/mpls-gre/mpls.c \
366 vnet/mpls-gre/node.c \
367 vnet/mpls-gre/interface.c \
368 vnet/mpls-gre/policy_encap.c \
371 nobase_include_HEADERS += \
372 vnet/mpls-gre/mpls.h \
373 vnet/mpls-gre/packet.h \
374 vnet/mpls-gre/error.def
377 ########################################
378 # Tunnel protocol: nsh-gre
379 ########################################
381 libvnet_la_SOURCES += \
382 vnet/nsh-gre/nsh_gre.c \
383 vnet/nsh-gre/encap.c \
386 nobase_include_HEADERS += \
387 vnet/nsh-gre/nsh_gre.h \
388 vnet/nsh-gre/nsh_gre_packet.h \
389 vnet/nsh-gre/nsh_gre_error.def
391 ########################################
392 # Tunnel protocol: nsh-vxlan-gpe
393 ########################################
395 libvnet_la_SOURCES += \
396 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.c \
397 vnet/nsh-vxlan-gpe/encap.c \
398 vnet/nsh-vxlan-gpe/decap.c
400 nobase_include_HEADERS += \
401 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.h \
402 vnet/nsh-vxlan-gpe/vxlan_gpe_packet.h \
403 vnet/nsh-vxlan-gpe/nsh_vxlan_gpe_error.def
405 ########################################
406 # Tunnel protocol: lisp-gpe
407 ########################################
409 libvnet_la_SOURCES += \
410 vnet/lisp-gpe/lisp_gpe.c \
411 vnet/lisp-gpe/encap.c \
412 vnet/lisp-gpe/decap.c
414 nobase_include_HEADERS += \
415 vnet/lisp-gpe/lisp_gpe.h \
416 vnet/lisp-gpe/lisp_gpe_packet.h \
417 vnet/lisp-gpe/lisp_gpe_error.def
419 ########################################
421 ########################################
422 libvnet_la_SOURCES += \
426 nobase_include_HEADERS += \
429 ########################################
431 ########################################
432 libvnet_la_SOURCES += \
433 vnet/dhcp/proxy_node.c \
436 nobase_include_HEADERS += \
439 vnet/dhcp/proxy_error.def
441 ########################################
442 # ipv6 segment routing
443 ########################################
446 libvnet_la_SOURCES += \
450 nobase_include_HEADERS += \
451 vnet/sr/sr_packet.h \
452 vnet/sr/sr_error.def \
455 ########################################
457 #########################################
460 libvnet_la_SOURCES += \
461 vnet/vcgn/cnat_bulk_port.c \
462 vnet/vcgn/cnat_config.c \
463 vnet/vcgn/cnat_db_scanner.c \
464 vnet/vcgn/cnat_db_v2.c \
465 vnet/vcgn/cnat_debug_msg_handler.c \
466 vnet/vcgn/cnat_cli_handler.c \
467 vnet/vcgn/cnat_global.c \
468 vnet/vcgn/cnat_ipv4_udp_inside_input.c \
469 vnet/vcgn/cnat_ipv4_udp_inside_input_exceptions.c \
470 vnet/vcgn/cnat_ipv4_udp_outside_input.c \
471 vnet/vcgn/cnat_ipv4_tcp_inside_input.c \
472 vnet/vcgn/cnat_ipv4_tcp_inside_input_exceptions.c \
473 vnet/vcgn/cnat_ipv4_tcp_outside_input.c \
474 vnet/vcgn/cnat_ipv4_icmp_query_inside_input.c \
475 vnet/vcgn/cnat_ipv4_icmp_query_inside_input_exception.c \
476 vnet/vcgn/cnat_ipv4_icmp_query_outside_input.c \
477 vnet/vcgn/cnat_ipv4_icmp_error_inside_input.c \
478 vnet/vcgn/cnat_ipv4_icmp_error_outside_input.c \
479 vnet/vcgn/cnat_logging.c \
480 vnet/vcgn/cnat_ports.c \
481 vnet/vcgn/cnat_util.c \
482 vnet/vcgn/cnat_show.c \
483 vnet/vcgn/cnat_syslog.c \
484 vnet/vcgn/cnat_v4_functions.c \
485 vnet/vcgn/index_list.c \
486 vnet/vcgn/spp_platform_trace_log.c \
487 vnet/vcgn/vcgn_classify.c
490 ########################################
492 ########################################
493 libvnet_la_SOURCES += \
494 vnet/dhcpv6/proxy_node.c
496 nobase_include_HEADERS += \
497 vnet/dhcpv6/packet.h \
498 vnet/dhcpv6/proxy.h \
499 vnet/dhcpv6/proxy_error.def
501 ########################################
502 # IPFIX / netflow v10
503 ########################################
504 libvnet_la_SOURCES += \
505 vnet/flow/flow_report.c
507 nobase_include_HEADERS += \
508 vnet/flow/flow_report.h \
509 vnet/flow/ipfix_info_elements.h \
510 vnet/flow/ipfix_packet.h
512 ########################################
514 ########################################
516 libvnet_la_SOURCES += \
517 vnet/flow/flow_report_sample.c
519 nobase_include_HEADERS += \
520 vnet/flow/flow_report_sample.h
522 ########################################
524 ########################################
526 libvnet_la_SOURCES += \
527 vnet/lawful-intercept/lawful_intercept.c \
528 vnet/lawful-intercept/node.c
530 nobase_include_HEADERS += \
531 vnet/dpdk_replication.h \
532 vnet/lawful-intercept/lawful_intercept.h
534 ########################################
536 ########################################
538 libvnet_la_SOURCES += \
546 nobase_include_HEADERS += \
550 ########################################
552 ########################################
554 libvnet_la_SOURCES += \
555 vnet/devices/dpdk/dpdk_priv.h \
556 vnet/devices/dpdk/device.c \
557 vnet/devices/dpdk/init.c \
558 vnet/devices/dpdk/node.c \
559 vnet/devices/dpdk/threads.c \
560 vnet/devices/dpdk/vhost_user.c \
561 vnet/devices/dpdk/cli.c
563 nobase_include_HEADERS += \
564 vnet/devices/dpdk/dpdk.h \
565 vnet/devices/dpdk/threads.h
568 ########################################
570 ########################################
573 libvnet_la_SOURCES += \
574 vnet/devices/virtio/vhost-user.c
576 nobase_include_HEADERS += \
577 vnet/devices/virtio/vhost-user.h
580 ########################################
582 ########################################
583 libvnet_la_SOURCES += \
584 vnet/devices/ssvm/ssvm_eth.c \
585 vnet/devices/ssvm/node.c
587 nobase_include_HEADERS += \
588 vnet/devices/ssvm/ssvm_eth.h
590 ########################################
591 # Unix kernel related
592 ########################################
594 # FIXME: vnet/unix/hgshm.c
596 libvnet_la_SOURCES += \
597 vnet/unix/gdb_funcs.c \
602 nobase_include_HEADERS += \
607 ########################################
608 # Plugin client library
609 ########################################
611 libvnetplugin_la_SOURCES += \
614 nobase_include_HEADERS += \
617 lib_LTLIBRARIES = libvnet.la libvnetplugin.la
622 dpdk_libs += -l:libdpdk.a
626 vnet/unix/pcap2pg.c \
629 pcap2pg_LDFLAGS = -static
630 pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
632 noinst_PROGRAMS += pcap2pg