aboutsummaryrefslogtreecommitdiffstats
path: root/NSH_SFC_VER
256' href='#n256'>256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
AgeCommit message (Expand)AuthorFilesLines
2017-06-09 Add the NSH SFC functional test cases.Fangyin Hu1-0/+2
# Copyright (c) 2015 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

lib_LTLIBRARIES += libvnet.la

libvnet_la_SOURCES =
libvnet_la_DEPENDENCIES = \
	libvppinfra.la		\
	libvlib.la		\
	libsvmdb.la		\
	libsvm.la 		\
	libvlibmemory.la

libvnet_la_LIBADD = $(libvnet_la_DEPENDENCIES) -lm -lpthread -ldl -lrt

if WITH_LIBSSL
libvnet_la_LIBADD += -lcrypto
endif

########################################
# Generic stuff
########################################
libvnet_la_SOURCES +=				\
  vnet/config.c					\
  vnet/devices/devices.c			\
  vnet/handoff.c				\
  vnet/interface.c				\
  vnet/interface_api.c				\
  vnet/interface_cli.c				\
  vnet/interface_format.c			\
  vnet/interface_output.c			\
  vnet/misc.c					\
  vnet/replication.c                            \
  vnet/rewrite.c

nobase_include_HEADERS +=			\
  vnet/api_errno.h				\
  vnet/buffer.h					\
  vnet/config.h					\
  vnet/devices/devices.h			\
  vnet/global_funcs.h				\
  vnet/handoff.h				\
  vnet/interface.h				\
  vnet/interface.api.h				\
  vnet/interface_funcs.h			\
  vnet/l3_types.h				\
  vnet/pipeline.h				\
  vnet/replication.h				\
  vnet/vnet.h					\
  vnet/vnet_all_api_h.h				\
  vnet/vnet_msg_enum.h				\
  vnet/util/radix.h

API_FILES += vnet/interface.api

########################################
# Policer infra
########################################

libvnet_la_SOURCES +=				\
  vnet/policer/node_funcs.c			\
  vnet/policer/policer.c			\
  vnet/policer/xlate.c				\
  vnet/policer/policer_api.c

nobase_include_HEADERS +=			\
  vnet/policer/police.h				\
  vnet/policer/policer.h			\
  vnet/policer/xlate.h				\
  vnet/policer/policer.api.h

API_FILES += vnet/policer/policer.api

########################################
# Cop - junk filter
########################################

libvnet_la_SOURCES +=				\
  vnet/cop/cop.c				\
  vnet/cop/node1.c				\
  vnet/cop/ip4_whitelist.c			\
  vnet/cop/ip6_whitelist.c			\
  vnet/cop/cop_api.c

nobase_include_HEADERS +=			\
  vnet/cop/cop.h					\
  vnet/cop/cop.api.h

API_FILES += vnet/cop/cop.api

########################################
# Layer 2 protocols go here
########################################

########################################
# Layer 2 protocol: Ethernet
########################################
libvnet_la_SOURCES +=				\
 vnet/ethernet/arp.c				\
 vnet/ethernet/format.c				\
 vnet/ethernet/init.c				\
 vnet/ethernet/interface.c			\
 vnet/ethernet/node.c				\
 vnet/ethernet/pg.c				\
 vnet/ethernet/sfp.c

nobase_include_HEADERS +=			\
 vnet/ethernet/arp_packet.h			\
 vnet/ethernet/error.def			\
 vnet/ethernet/ethernet.h			\
 vnet/ethernet/packet.h				\
 vnet/ethernet/types.def			\
 vnet/ethernet/sfp.h

########################################
# Layer 2 protocol: Ethernet bridging
########################################
libvnet_la_SOURCES +=				\
 vnet/l2/feat_bitmap.c				\
 vnet/l2/l2_api.c				\
 vnet/l2/l2_bd.c				\
 vnet/l2/l2_bvi.c				\
 vnet/l2/l2_input_classify.c			\
 vnet/l2/l2_output_classify.c			\
 vnet/l2/l2_efp_filter.c			\
 vnet/l2/l2_fib.c				\
 vnet/l2/l2_flood.c				\
 vnet/l2/l2_fwd.c				\
 vnet/l2/l2_input_acl.c				\
 vnet/l2/l2_input.c				\
 vnet/l2/l2_input_vtr.c				\
 vnet/l2/l2_learn.c				\
 vnet/l2/l2_output_acl.c			\
 vnet/l2/l2_output.c				\
 vnet/l2/l2_patch.c				\
 vnet/l2/l2_rw.c				\
 vnet/l2/l2_vtr.c				\
 vnet/l2/l2_xcrw.c

nobase_include_HEADERS +=			\
 vnet/l2/feat_bitmap.h				\
 vnet/l2/l2_input.h				\
 vnet/l2/l2_output.h				\
 vnet/l2/l2_vtr.h				\
 vnet/l2/l2_input_vtr.h				\
 vnet/l2/l2_efp_filter.h			\
 vnet/l2/l2_fwd.h				\
 vnet/l2/l2_bd.h				\
 vnet/l2/l2_bvi.h				\
 vnet/l2/l2_flood.h				\
 vnet/l2/l2_fib.h				\
 vnet/l2/l2_rw.h				\
 vnet/l2/l2_xcrw.h				\
 vnet/l2/l2_classify.h				\
 vnet/l2/l2.api.h

API_FILES += vnet/l2/l2.api

########################################
# Layer 2 protocol: SRP
########################################
libvnet_la_SOURCES +=				\
 vnet/srp/format.c				\
 vnet/srp/interface.c				\
 vnet/srp/node.c				\
 vnet/srp/pg.c

nobase_include_HEADERS +=			\
 vnet/srp/packet.h				\
 vnet/srp/srp.h

########################################
# Layer 2 protocol: PPP
########################################
libvnet_la_SOURCES +=				\
  vnet/ppp/node.c				\
  vnet/ppp/pg.c					\
  vnet/ppp/ppp.c

nobase_include_HEADERS +=			\
 vnet/ppp/error.def				\
 vnet/ppp/ppp.h					\
 vnet/ppp/packet.h

########################################
# Layer 2 protocol: HDLC
########################################
libvnet_la_SOURCES +=				\
  vnet/hdlc/node.c				\
  vnet/hdlc/pg.c				\
  vnet/hdlc/hdlc.c

nobase_include_HEADERS +=			\
 vnet/hdlc/error.def				\
 vnet/hdlc/hdlc.h				\
 vnet/hdlc/packet.h

########################################
# Layer 2 protocol: LLC
########################################
libvnet_la_SOURCES +=				\
  vnet/llc/llc.c				\
  vnet/llc/node.c				\
  vnet/llc/pg.c

nobase_include_HEADERS +=			\
 vnet/llc/llc.h

########################################
# Layer 2 protocol: SNAP
########################################
libvnet_la_SOURCES +=				\
  vnet/snap/snap.c				\
  vnet/snap/node.c				\
  vnet/snap/pg.c

nobase_include_HEADERS +=			\
 vnet/snap/snap.h

########################################
# Layer 2 / vxlan
########################################
libvnet_la_SOURCES +=				\
  vnet/vxlan/vxlan.c				\
  vnet/vxlan/encap.c				\
  vnet/vxlan/decap.c				\
  vnet/vxlan/vxlan_api.c

nobase_include_HEADERS +=			\
  vnet/vxlan/vxlan.h				\
  vnet/vxlan/vxlan_packet.h			\
  vnet/vxlan/vxlan_error.def			\
  vnet/vxlan/vxlan.api.h

API_FILES += vnet/vxlan/vxlan.api

########################################
# Layer 2 / CDP
########################################
libvnet_la_SOURCES +=				\
  vnet/cdp/cdp_input.c				\
  vnet/cdp/cdp_node.c				\
  vnet/cdp/cdp_periodic.c

nobase_include_HEADERS +=			\
  vnet/cdp/cdp_protocol.h

########################################
# Layer 2 / LLDP
########################################
libvnet_la_SOURCES +=				\
  vnet/lldp/lldp_input.c			\
  vnet/lldp/lldp_node.c				\
  vnet/lldp/lldp_output.c			\
  vnet/lldp/lldp_cli.c

nobase_include_HEADERS +=			\
  vnet/lldp/lldp_protocol.h

########################################
# Layer 2/3 "classify"
########################################
libvnet_la_SOURCES +=				\
  vnet/classify/vnet_classify.c			\
  vnet/classify/ip_classify.c			\
  vnet/classify/input_acl.c			\
  vnet/classify/policer_classify.c		\
  vnet/classify/flow_classify.c                 \
  vnet/classify/flow_classify_node.c            \
  vnet/classify/vnet_classify.h			\
  vnet/classify/classify_api.c

nobase_include_HEADERS +=			\
  vnet/classify/vnet_classify.h	                \
  vnet/classify/input_acl.h                     \
  vnet/classify/policer_classify.h              \
  vnet/classify/flow_classify.h					\
  vnet/classify/classify.api.h

API_FILES += vnet/classify/classify.api

########################################
# Layer 3 protocols go here
########################################

########################################
# Layer 3 protocol: IP v4/v6
########################################
libvnet_la_SOURCES +=				\
 vnet/ip/format.c				\
 vnet/ip/icmp4.c				\
 vnet/ip/icmp6.c				\
 vnet/ip/ip46_cli.c				\
 vnet/ip/ip4_format.c				\
 vnet/ip/ip4_forward.c				\
 vnet/ip/ip4_input.c				\
 vnet/ip/ip4_mtrie.c				\
 vnet/ip/ip4_pg.c				\
 vnet/ip/ip4_source_and_port_range_check.c	\
 vnet/ip/ip4_source_check.c			\
 vnet/ip/ip6_format.c				\
 vnet/ip/ip6_forward.c				\
 vnet/ip/ip6_hop_by_hop.c			\
 vnet/ip/ip6_input.c				\
 vnet/ip/ip6_neighbor.c				\
 vnet/ip/ip6_pg.c				\
 vnet/ip/ip_api.c				\
 vnet/ip/ip_checksum.c				\
 vnet/ip/ip_frag.c				\
 vnet/ip/ip.h					\
 vnet/ip/ip_init.c				\
 vnet/ip/ip_input_acl.c				\
 vnet/ip/lookup.c				\
 vnet/ip/ping.c					\
 vnet/ip/punt.c

nobase_include_HEADERS +=			\
 vnet/ip/format.h				\
 vnet/ip/icmp46_packet.h			\
 vnet/ip/icmp4.h				\
 vnet/ip/icmp6.h				\
 vnet/ip/igmp_packet.h				\
 vnet/ip/ip.api.h				\
 vnet/ip/ip4_error.h				\
 vnet/ip/ip4.h					\
 vnet/ip/ip4_mtrie.h				\
 vnet/ip/ip4_packet.h				\
 vnet/ip/ip6_error.h				\
 vnet/ip/ip6.h					\
 vnet/ip/ip6_hop_by_hop.h			\
 vnet/ip/ip6_hop_by_hop_packet.h		\
 vnet/ip/ip6_packet.h				\
 vnet/ip/ip6_neighbor.h				\
 vnet/ip/ip.h					\
 vnet/ip/ip_packet.h				\
 vnet/ip/ip_source_and_port_range_check.h	\
 vnet/ip/lookup.h				\
 vnet/ip/ports.def				\
 vnet/ip/protocols.def				\
 vnet/ip/punt_error.def				\
 vnet/ip/punt.h

API_FILES += vnet/ip/ip.api

########################################
# Bidirectional Forwarding Detection
########################################

nobase_include_HEADERS +=			\
 vnet/bfd/bfd_protocol.h			\
 vnet/bfd/bfd_main.h				\
 vnet/bfd/bfd_api.h				\
 vnet/bfd/bfd_udp.h				\
 vnet/bfd/bfd.api.h

libvnet_la_SOURCES +=				\
 vnet/bfd/bfd_api.h				\
 vnet/bfd/bfd_udp.c				\
 vnet/bfd/bfd_main.c				\
 vnet/bfd/bfd_protocol.c			\
 vnet/bfd/bfd_cli.c                             \
 vnet/bfd/bfd_api.c

API_FILES += vnet/bfd/bfd.api

########################################
# Layer 3 protocol: IPSec
########################################
if WITH_LIBSSL
libvnet_la_SOURCES +=				\
 vnet/ipsec/ipsec.c				\
 vnet/ipsec/ipsec_cli.c				\
 vnet/ipsec/ipsec_format.c			\
 vnet/ipsec/ipsec_input.c			\
 vnet/ipsec/ipsec_if.c				\
 vnet/ipsec/ipsec_if_in.c			\
 vnet/ipsec/ipsec_if_out.c			\
 vnet/ipsec/esp_encrypt.c			\
 vnet/ipsec/esp_decrypt.c			\
 vnet/ipsec/ikev2.c				\
 vnet/ipsec/ikev2_crypto.c			\
 vnet/ipsec/ikev2_cli.c				\
 vnet/ipsec/ikev2_payload.c			\
 vnet/ipsec/ikev2_format.c			\
 vnet/ipsec/ipsec_api.c

API_FILES += vnet/ipsec/ipsec.api
endif

libvnet_la_SOURCES +=				\
 vnet/ipsec/ipsec_output.c

nobase_include_HEADERS +=			\
 vnet/ipsec/ipsec.h				\
 vnet/ipsec/esp.h				\
 vnet/ipsec/ikev2.h				\
 vnet/ipsec/ikev2_priv.h			\
 vnet/ipsec/ipsec.api.h

########################################
# Layer 3 protocol: osi
########################################
libvnet_la_SOURCES +=				\
 vnet/osi/node.c				\
 vnet/osi/osi.c					\
 vnet/osi/pg.c

nobase_include_HEADERS +=			\
 vnet/osi/osi.h

########################################
# Layer 3 protocol: MAP
########################################
libvnet_la_SOURCES +=				\
 vnet/map/map.c					\
 vnet/map/map_dpo.c				\
 vnet/map/ip4_map.c				\
 vnet/map/ip6_map.c				\
 vnet/map/ip4_map_t.c				\
 vnet/map/ip6_map_t.c				\
 vnet/map/map_api.c

nobase_include_HEADERS +=			\
 vnet/map/map.h					\
 vnet/map/map_dpo.h				\
 vnet/map/map.api.h

API_FILES += vnet/map/map.api

if ENABLE_TESTS
TESTS += test_map
test_map_SOURCES =                             \
 vnet/map/test.c
test_map_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG

test_map_LDADD = libvnet.la libvppinfra.la libvlib.la	\
  -lpthread -lvlibmemory -ldl -lsvm -lrt

test_map_LDFLAGS = -static
endif

########################################
# Layer 4 protocol: tcp
########################################
libvnet_la_SOURCES +=				\
 vnet/tcp/tcp_format.c				\
 vnet/tcp/tcp_pg.c				\
 vnet/tcp/tcp_syn_filter4.c			\
 vnet/tcp/tcp_output.c				\
 vnet/tcp/tcp_input.c				\
 vnet/tcp/tcp_newreno.c				\
 vnet/tcp/builtin_client.c			\
 vnet/tcp/builtin_server.c			\
 vnet/tcp/tcp_test.c				\
 vnet/tcp/tcp.c

nobase_include_HEADERS +=			\
 vnet/tcp/tcp_packet.h				\
 vnet/tcp/tcp_timer.h				\
 vnet/tcp/tcp_debug.h				\
 vnet/tcp/tcp.h

########################################
# Layer 4 protocol: udp
########################################
libvnet_la_SOURCES +=				\
 vnet/udp/udp.c					\
 vnet/udp/udp_input.c				\
 vnet/udp/builtin_server.c			\
 vnet/udp/udp_format.c				\
 vnet/udp/udp_local.c				\
 vnet/udp/udp_pg.c

nobase_include_HEADERS +=			\
  vnet/udp/udp_error.def                       	\
  vnet/udp/udp.h                               	\
  vnet/udp/udp_packet.h

########################################
# Tunnel protocol: gre
########################################
libvnet_la_SOURCES +=				\
 vnet/gre/gre.c					\
 vnet/gre/node.c				\
 vnet/gre/interface.c				\
 vnet/gre/pg.c					\
 vnet/gre/gre_api.c

nobase_include_HEADERS +=			\
 vnet/gre/gre.h					\
 vnet/gre/packet.h				\
 vnet/gre/error.def				\
 vnet/gre/gre.api.h

API_FILES += vnet/gre/gre.api

########################################
# Tunnel protocol: l2tpv3
########################################
libvnet_la_SOURCES +=				\
 vnet/l2tp/l2tp.c				\
 vnet/l2tp/encap.c 				\
 vnet/l2tp/decap.c  				\
 vnet/l2tp/pg.c					\
 vnet/l2tp/l2tp_api.c

nobase_include_HEADERS +=			\
 vnet/l2tp/l2tp.h				\
 vnet/l2tp/packet.h				\
 vnet/l2tp/l2tp.api.h

API_FILES += vnet/l2tp/l2tp.api

########################################
# Tunnel protocol: gre+mpls
########################################
libvnet_la_SOURCES +=				\
 vnet/mpls/mpls.c				\
 vnet/mpls/mpls_lookup.c			\
 vnet/mpls/mpls_output.c			\
 vnet/mpls/mpls_features.c			\
 vnet/mpls/mpls_input.c				\
 vnet/mpls/interface.c			        \
 vnet/mpls/mpls_tunnel.c		        \
 vnet/mpls/pg.c			        \
 vnet/mpls/mpls_api.c

nobase_include_HEADERS +=			\
 vnet/mpls/mpls.h				\
 vnet/mpls/mpls_types.h				\
 vnet/mpls/mpls_tunnel.h			\
 vnet/mpls/packet.h				\
 vnet/mpls/error.def			\
 vnet/mpls/mpls.api.h

API_FILES += vnet/mpls/mpls.api

########################################
# Tunnel protocol: vxlan-gpe
########################################

libvnet_la_SOURCES +=				\
 vnet/vxlan-gpe/vxlan_gpe.c			\
 vnet/vxlan-gpe/encap.c				\
 vnet/vxlan-gpe/decap.c				\
 vnet/vxlan-gpe/vxlan_gpe_api.c

nobase_include_HEADERS +=			\
 vnet/vxlan-gpe/vxlan_gpe.h			\
 vnet/vxlan-gpe/vxlan_gpe_packet.h		\
 vnet/vxlan-gpe/vxlan_gpe_error.def		\
 vnet/vxlan-gpe/vxlan_gpe.api.h

API_FILES += vnet/vxlan-gpe/vxlan_gpe.api

########################################
# Tunnel protocol: ipsec+gre
########################################
libvnet_la_SOURCES +=				\
 vnet/ipsec-gre/ipsec_gre.c			\
 vnet/ipsec-gre/node.c				\
 vnet/ipsec-gre/interface.c			\
 vnet/ipsec-gre/ipsec_gre_api.c

nobase_include_HEADERS +=			\
 vnet/ipsec-gre/ipsec_gre.h			\
 vnet/ipsec-gre/error.def			\
 vnet/ipsec-gre/ipsec_gre.api.h

API_FILES += vnet/ipsec-gre/ipsec_gre.api

########################################
# LISP control plane: lisp-cp
########################################

libvnet_la_SOURCES +=				\
 vnet/lisp-cp/lisp_types.c			\
 vnet/lisp-cp/lisp_cp_dpo.c			\
 vnet/lisp-cp/control.c				\
 vnet/lisp-cp/gid_dictionary.c			\
 vnet/lisp-cp/lisp_msg_serdes.c			\
 vnet/lisp-cp/packets.c				\
 vnet/lisp-cp/one_cli.c				\
 vnet/lisp-cp/lisp_cli.c			\
 vnet/lisp-cp/one_api.c				\
 vnet/lisp-cp/lisp_api.c

nobase_include_HEADERS +=			\
 vnet/lisp-cp/lisp_types.h			\
 vnet/lisp-cp/packets.h				\
 vnet/lisp-cp/gid_dictionary.h			\
 vnet/lisp-cp/lisp_cp_messages.h		\
 vnet/lisp-cp/lisp_msg_serdes.h			\
 vnet/lisp-cp/control.h				\
 vnet/lisp-cp/one.api.h				\
 vnet/lisp-cp/lisp.api.h

API_FILES += vnet/lisp-cp/lisp.api
API_FILES += vnet/lisp-cp/one.api

if ENABLE_TESTS
LDS = \
  libvppinfra.la \
  libvnet.la \
  libvlib.la  \
  libsvm.la \
  libsvmdb.la \
  libvlibmemory.la \
  -lpthread -ldl -lrt -lm

TESTS += test_cp_serdes test_lisp_types

test_cp_serdes_SOURCES =			\
 tests/vnet/lisp-cp/test_cp_serdes.c		\
 vnet/lisp-cp/lisp_msg_serdes.c			\
 vnet/lisp-cp/lisp_types.c			\
 vnet/lisp-cp/packets.c				\
 vnet/ip/ip_checksum.c

test_lisp_types_SOURCES =			\
 tests/vnet/lisp-cp/test_lisp_types.c		\
 vnet/lisp-cp/lisp_types.c

test_cp_serdes_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
test_lisp_types_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG

test_cp_serdes_LDADD = $(LDS)
test_lisp_types_LDADD = $(LDS)
endif

########################################
# Tunnel protocol: lisp-gpe
########################################

libvnet_la_SOURCES +=				\
 vnet/lisp-gpe/lisp_gpe.c			\
 vnet/lisp-gpe/lisp_gpe_sub_interface.c		\
 vnet/lisp-gpe/lisp_gpe_adjacency.c		\
 vnet/lisp-gpe/lisp_gpe_tunnel.c		\
 vnet/lisp-gpe/lisp_gpe_fwd_entry.c		\
 vnet/lisp-gpe/lisp_gpe_tenant.c		\
 vnet/lisp-gpe/interface.c			\
 vnet/lisp-gpe/decap.c				\
 vnet/lisp-gpe/lisp_gpe_api.c

nobase_include_HEADERS +=			\
 vnet/lisp-gpe/lisp_gpe.h			\
 vnet/lisp-gpe/lisp_gpe_fwd_entry.h		\
 vnet/lisp-gpe/lisp_gpe_tenant.h		\
 vnet/lisp-gpe/lisp_gpe_packet.h		\
 vnet/lisp-gpe/lisp_gpe_error.def		\
 vnet/lisp-gpe/lisp_gpe.api.h

API_FILES += vnet/lisp-gpe/lisp_gpe.api

if ENABLE_TESTS
TESTS += test_test

test_test_SOURCES = tests/vnet/lisp-gpe/test.c

test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG

test_test_LDADD = $(LIBOBJS)

noinst_PROGRAMS += $(TESTS)
check_PROGRAMS += $(TESTS)
endif

########################################
# DHCP client
########################################
libvnet_la_SOURCES +=				\
 vnet/dhcp/client.c				\
 vnet/dhcp/client.h				\
 vnet/dhcp/dhcp_api.c

nobase_include_HEADERS +=			\
 vnet/dhcp/client.h				\
 vnet/dhcp/dhcp.api.h

API_FILES += vnet/dhcp/dhcp.api

########################################
# DHCP proxy
########################################
libvnet_la_SOURCES +=				\
 vnet/dhcp/dhcp6_proxy_node.c                   \
 vnet/dhcp/dhcp4_proxy_node.c			\
 vnet/dhcp/dhcp_proxy.c

nobase_include_HEADERS +=			\
 vnet/dhcp/dhcp4_packet.h		        \
 vnet/dhcp/dhcp6_packet.h		        \
 vnet/dhcp/dhcp_proxy.h				\
 vnet/dhcp/dhcp6_proxy_error.def                \
 vnet/dhcp/dhcp4_proxy_error.def

########################################
# ipv6 segment routing
########################################

if WITH_LIBSSL
libvnet_la_SOURCES +=				\
 vnet/sr/sr.c						\
 vnet/sr/sr_localsid.c				\
 vnet/sr/sr_policy_rewrite.c		\
 vnet/sr/sr_steering.c				\
 vnet/sr/sr_api.c
endif

nobase_include_HEADERS +=			\
 vnet/sr/sr_packet.h				\
 vnet/sr/sr.h						\
 vnet/sr/sr.api.h

API_FILES += vnet/sr/sr.api

########################################
# IPFIX / netflow v10
########################################
libvnet_la_SOURCES +=				\
 vnet/flow/flow_report.c			\
 vnet/flow/flow_api.c

nobase_include_HEADERS +=			\
 vnet/flow/flow_report.h			\
 vnet/flow/ipfix_info_elements.h		\
 vnet/flow/ipfix_packet.h			\
 vnet/flow/flow.api.h

API_FILES += vnet/flow/flow.api

########################################
# IPFIX classify code
########################################

libvnet_la_SOURCES +=				\
  vnet/flow/flow_report_classify.c

nobase_include_HEADERS +=			\
  vnet/flow/flow_report_classify.h

########################################
# lawful intercept
########################################

libvnet_la_SOURCES +=				\
  vnet/lawful-intercept/lawful_intercept.c	\
  vnet/lawful-intercept/node.c

nobase_include_HEADERS += 			\
  vnet/lawful-intercept/lawful_intercept.h

########################################
# SPAN (port mirroring)
########################################

libvnet_la_SOURCES +=				\
  vnet/span/span_api.c  \
  vnet/span/span.c	    \
  vnet/span/node.c

nobase_include_HEADERS += 			\
  vnet/span/span.api.h  \
  vnet/span/span.h

API_FILES += vnet/span/span.api

########################################
# Packet generator
########################################

libvnet_la_SOURCES +=				\
  vnet/pg/cli.c					\
  vnet/pg/edit.c				\
  vnet/pg/init.c				\
  vnet/pg/input.c				\
  vnet/pg/output.c				\
  vnet/pg/stream.c

nobase_include_HEADERS +=			\
  vnet/pg/pg.h					\
  vnet/pg/edit.h

########################################
# virtio
########################################

libvnet_la_SOURCES +=       \
  vnet/devices/virtio/vhost-user.c	\
  vnet/devices/virtio/vhost_user_api.c

nobase_include_HEADERS +=     \
  vnet/devices/virtio/vhost-user.h	\
  vnet/devices/virtio/vhost_user.api.h

API_FILES += vnet/devices/virtio/vhost_user.api

########################################
# ssvm ethernet
########################################
libvnet_la_SOURCES +=				\
  vnet/devices/ssvm/ssvm_eth.c			\
  vnet/devices/ssvm/node.c

nobase_include_HEADERS +=			\
  vnet/devices/ssvm/ssvm_eth.h

########################################
# session managmeent
########################################

libvnet_la_SOURCES +=				\
  vnet/session/session.c			\
  vnet/session/node.c				\
  vnet/session/transport.c			\
  vnet/session/application.c			\
  vnet/session/session_cli.c			\
  vnet/session/hashes.c				\
  vnet/session/application_interface.c		\
  vnet/session/session_api.c

nobase_include_HEADERS +=			\
  vnet/session/session.h			\
  vnet/session/application.h			\
  vnet/session/transport.h			\
  vnet/session/application_interface.h		\
  vnet/session/session_debug.h			\
  vnet/session/session.api.h

API_FILES += vnet/session/session.api

########################################
# Linux packet interface
########################################

libvnet_la_SOURCES +=				\
  vnet/devices/af_packet/af_packet.c		\
  vnet/devices/af_packet/device.c		\
  vnet/devices/af_packet/node.c			\
  vnet/devices/af_packet/cli.c			\
  vnet/devices/af_packet/af_packet_api.c

nobase_include_HEADERS +=			\
  vnet/devices/af_packet/af_packet.h	\
  vnet/devices/af_packet/af_packet.api.h

API_FILES += vnet/devices/af_packet/af_packet.api

########################################
# NETMAP interface
########################################

libvnet_la_SOURCES +=				\
  vnet/devices/netmap/netmap.c			\
  vnet/devices/netmap/device.c			\
  vnet/devices/netmap/node.c			\
  vnet/devices/netmap/cli.c			\
  vnet/devices/netmap/netmap_api.c

nobase_include_HEADERS +=			\
  vnet/devices/netmap/netmap.h		\
  vnet/devices/netmap/netmap.api.h

API_FILES += vnet/devices/netmap/netmap.api

########################################
# Driver feature graph arc support
########################################

libvnet_la_SOURCES +=				\
  vnet/feature/feature.c			\
  vnet/feature/registration.c

nobase_include_HEADERS +=			\
  vnet/feature/feature.h

########################################
# Unix kernel related
########################################

# FIXME: vnet/unix/hgshm.c

libvnet_la_SOURCES +=				\
  vnet/unix/gdb_funcs.c				\
  vnet/unix/pcap.c				\
  vnet/unix/tap_api.c				\
  vnet/unix/tapcli.c				\
  vnet/unix/tuntap.c

nobase_include_HEADERS +=			\
  vnet/unix/pcap.h				\
  vnet/unix/tuntap.h				\
  vnet/unix/tap.api.h				\
  vnet/unix/tapcli.h

API_FILES += vnet/unix/tap.api

########################################
# FIB
########################################

libvnet_la_SOURCES +=				\
  vnet/fib/fib.c                                \
  vnet/fib/fib_test.c                           \
  vnet/fib/ip4_fib.c                            \
  vnet/fib/ip6_fib.c                            \
  vnet/fib/mpls_fib.c                           \
  vnet/fib/fib_table.c                          \
  vnet/fib/fib_walk.c                           \
  vnet/fib/fib_types.c                          \
  vnet/fib/fib_node.c                           \
  vnet/fib/fib_node_list.c                      \
  vnet/fib/fib_entry.c                          \
  vnet/fib/fib_entry_src.c                      \
  vnet/fib/fib_entry_src_rr.c                   \
  vnet/fib/fib_entry_src_interface.c            \
  vnet/fib/fib_entry_src_default_route.c        \
  vnet/fib/fib_entry_src_special.c              \
  vnet/fib/fib_entry_src_api.c                  \
  vnet/fib/fib_entry_src_adj.c                  \
  vnet/fib/fib_entry_src_mpls.c                 \
  vnet/fib/fib_entry_src_lisp.c                 \
  vnet/fib/fib_entry_cover.c                    \
  vnet/fib/fib_entry_delegate.c                 \
  vnet/fib/fib_path_list.c                      \
  vnet/fib/fib_path.c				\
  vnet/fib/fib_path_ext.c			\
  vnet/fib/fib_urpf_list.c			\
  vnet/fib/fib_attached_export.c

nobase_include_HEADERS +=			\
  vnet/fib/fib.h				\
  vnet/fib/fib_api.h				\
  vnet/fib/ip4_fib.h				\
  vnet/fib/ip6_fib.h				\
  vnet/fib/fib_types.h				\
  vnet/fib/fib_table.h				\
  vnet/fib/fib_node.h				\
  vnet/fib/fib_node_list.h			\
  vnet/fib/fib_entry.h				\
  vnet/fib/fib_entry_delegate.h

########################################
# ADJ
########################################

libvnet_la_SOURCES +=				\
  vnet/adj/adj_nbr.c				\
  vnet/adj/adj_glean.c   			\
  vnet/adj/adj_midchain.c   			\
  vnet/adj/adj_mcast.c   			\
  vnet/adj/adj_l2.c      			\
  vnet/adj/adj_nsh.c      			\
  vnet/adj/adj.c

nobase_include_HEADERS +=			\
  vnet/adj/adj.h				\
  vnet/adj/adj_types.h				\
  vnet/adj/adj_glean.h  			\
  vnet/adj/adj_nsh.h  				\
  vnet/adj/adj_nbr.h

########################################
# Data-Plane Objects
########################################

libvnet_la_SOURCES +=				\
  vnet/dpo/dpo.c				\
  vnet/dpo/drop_dpo.c				\
  vnet/dpo/ip_null_dpo.c			\
  vnet/dpo/punt_dpo.c				\
  vnet/dpo/receive_dpo.c			\
  vnet/dpo/load_balance.c			\
  vnet/dpo/load_balance_map.c			\
  vnet/dpo/lookup_dpo.c   			\
  vnet/dpo/classify_dpo.c   			\
  vnet/dpo/replicate_dpo.c   			\
  vnet/dpo/mpls_label_dpo.c

nobase_include_HEADERS +=			\
  vnet/dpo/load_balance.h			\
  vnet/dpo/drop_dpo.h				\
  vnet/dpo/lookup_dpo.h				\
  vnet/dpo/punt_dpo.h				\
  vnet/dpo/classify_dpo.h			\
  vnet/dpo/receive_dpo.h			\
  vnet/dpo/ip_null_dpo.h			\
  vnet/dpo/dpo.h

########################################
# Multicast FIB
########################################

libvnet_la_SOURCES +=				\
  vnet/mfib/mfib_test.c                         \
  vnet/mfib/mfib_forward.c                      \
  vnet/mfib/ip4_mfib.c                          \
  vnet/mfib/ip6_mfib.c                          \
  vnet/mfib/mfib_types.c                        \
  vnet/mfib/mfib_signal.c                       \
  vnet/mfib/mfib_itf.c                          \
  vnet/mfib/mfib_entry.c                        \
  vnet/mfib/mfib_table.c

nobase_include_HEADERS +=			\
  vnet/mfib/ip4_mfib.h                          \
  vnet/mfib/mfib_types.h                        \
  vnet/mfib/mfib_table.h

########################################
# Utilities
########################################

libvnet_la_SOURCES +=                    \
  vnet/util/radix.c

########################################
# Plugin client library
########################################

nobase_include_HEADERS +=                      \
  vnet/plugin/plugin.h

pcap2pg_SOURCES = 				\
  vnet/unix/pcap2pg.c				\
  vnet/unix/pcap.h

pcap2pg_LDFLAGS = -static
pcap2pg_LDADD = libvnet.la libvppinfra.la -lpthread libvlibmemory.la -lm -ldl

noinst_PROGRAMS += pcap2pg

# vi:syntax=automake