6rd: Move to plugin
[vpp.git] / vnet / Makefile.am
index b254d80..b758c7f 100644 (file)
@@ -19,12 +19,14 @@ libvnet_la_SOURCES =
 libvnetplugin_la_SOURCES =
 nobase_include_HEADERS =
 noinst_PROGRAMS =
+TESTS =
 
 ########################################
 # Generic stuff
 ########################################
 libvnet_la_SOURCES +=                                  \
   vnet/config.c                                                \
+  vnet/handoff.c                                       \
   vnet/interface.c                                     \
   vnet/interface_cli.c                                 \
   vnet/interface_format.c                              \
@@ -38,6 +40,7 @@ nobase_include_HEADERS +=                     \
   vnet/buffer.h                                        \
   vnet/config.h                                        \
   vnet/global_funcs.h                          \
+  vnet/handoff.h                               \
   vnet/interface.h                             \
   vnet/interface_funcs.h                       \
   vnet/l3_types.h                              \
@@ -57,6 +60,8 @@ libvnet_la_SOURCES +=                         \
 
 nobase_include_HEADERS +=                      \
   vnet/policer/police.h                                \
+  vnet/policer/policer.h                       \
+  vnet/policer/fix_types.h                     \
   vnet/policer/xlate.h
 
 ########################################
@@ -81,7 +86,6 @@ nobase_include_HEADERS +=                     \
 ########################################
 libvnet_la_SOURCES +=                          \
  vnet/ethernet/arp.c                           \
- vnet/ethernet/cli.c                           \
  vnet/ethernet/format.c                                \
  vnet/ethernet/init.c                          \
  vnet/ethernet/interface.c                     \
@@ -247,7 +251,6 @@ libvnet_la_SOURCES +=                               \
  vnet/ip/ip46_cli.c                            \
  vnet/ip/ip4_format.c                          \
  vnet/ip/ip4_forward.c                         \
- vnet/ip/ip4_hop_by_hop.c                      \
  vnet/ip/ip4_input.c                           \
  vnet/ip/ip4_mtrie.c                           \
  vnet/ip/ip4_pg.c                              \
@@ -343,15 +346,11 @@ libvnet_la_SOURCES +=                           \
  vnet/map/map.c                                 \
  vnet/map/ip4_map.c                             \
  vnet/map/ip6_map.c                             \
- vnet/map/sixrd.c                               \
- vnet/map/ip4_sixrd.c                           \
- vnet/map/ip6_sixrd.c                           \
  vnet/map/ip4_map_t.c                           \
  vnet/map/ip6_map_t.c
 
 nobase_include_HEADERS +=                       \
- vnet/map/map.h                                 \
- vnet/map/sixrd.h
+ vnet/map/map.h
 
 ########################################
 # Tunnel protocol: gre
@@ -397,32 +396,65 @@ nobase_include_HEADERS +=                 \
 
 
 ########################################
-# Tunnel protocol: nsh-gre
+# Tunnel protocol: vxlan-gpe
 ########################################
 
 libvnet_la_SOURCES +=                          \
- vnet/nsh-gre/nsh_gre.c                                \
- vnet/nsh-gre/encap.c                          \
- vnet/nsh-gre/decap.c
+ vnet/vxlan-gpe/vxlan_gpe.c                    \
+ vnet/vxlan-gpe/encap.c                                \
+ vnet/vxlan-gpe/decap.c
 
 nobase_include_HEADERS +=                      \
- vnet/nsh-gre/nsh_gre.h                                \
- vnet/nsh-gre/nsh_gre_packet.h                 \
- vnet/nsh-gre/nsh_gre_error.def
+ vnet/vxlan-gpe/vxlan_gpe.h                    \
+ vnet/vxlan-gpe/vxlan_gpe_packet.h             \
+ vnet/vxlan-gpe/vxlan_gpe_error.def
 
 ########################################
-# Tunnel protocol: nsh-vxlan-gpe
+# LISP control plane: lisp-cp
 ########################################
 
 libvnet_la_SOURCES +=                          \
- vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.c            \
- vnet/nsh-vxlan-gpe/encap.c                    \
- vnet/nsh-vxlan-gpe/decap.c
+ vnet/lisp-cp/lisp_types.c                     \
+ vnet/lisp-cp/control.c                                \
+ vnet/lisp-cp/gid_dictionary.c                 \
+ vnet/lisp-cp/lisp_msg_serdes.c                        \
+ vnet/lisp-cp/packets.c                        
 
 nobase_include_HEADERS +=                      \
- vnet/nsh-vxlan-gpe/nsh_vxlan_gpe.h            \
- vnet/nsh-vxlan-gpe/vxlan_gpe_packet.h         \
- vnet/nsh-vxlan-gpe/nsh_vxlan_gpe_error.def
+ 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                                
+
+
+if ENABLE_TESTS
+LDS = -lvppinfra -l:libvlib.a -l:libdpdk.a -l:libvlibmemory.a \
+       -l:libvlibapi.a -l:libsvm.a -lpthread -ldl -lrt -lm -l:libvlib_unix.a
+
+TESTS += test_cp_serdes test_lisp_types
+
+test_cp_serdes_SOURCES =                       \
+ test/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 =                      \
+ test/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 = libvnet.la $(LDS)
+test_lisp_types_LDADD = libvnet.la $(LDS)
+
+test_cp_serdes_LDFLAGS = -static
+test_lisp_types_LDFLAGS = -static
+endif
 
 ########################################
 # Tunnel protocol: lisp-gpe
@@ -430,13 +462,27 @@ nobase_include_HEADERS +=                 \
 
 libvnet_la_SOURCES +=                          \
  vnet/lisp-gpe/lisp_gpe.c                      \
- vnet/lisp-gpe/encap.c                         \
- vnet/lisp-gpe/decap.c
+ vnet/lisp-gpe/interface.c                     \
+ vnet/lisp-gpe/ip_forward.c                    \
+ vnet/lisp-gpe/decap.c                         
 
 nobase_include_HEADERS +=                      \
  vnet/lisp-gpe/lisp_gpe.h                      \
  vnet/lisp-gpe/lisp_gpe_packet.h               \
- vnet/lisp-gpe/lisp_gpe_error.def
+ vnet/lisp-gpe/lisp_gpe_error.def              
+
+if ENABLE_TESTS
+TESTS += test_test
+
+test_test_SOURCES = test/lisp-gpe/test.c
+
+test_test_CPPFLAGS = $(AM_CPPFLAGS) -DCLIB_DEBUG
+
+test_test_LDADD = $(LIBOBJS)
+
+noinst_PROGRAMS += $(TESTS)
+check_PROGRAMS = $(TESTS)
+endif
 
 ########################################
 # DHCP client
@@ -466,7 +512,8 @@ nobase_include_HEADERS +=                   \
 
 if WITH_IPV6SR
 libvnet_la_SOURCES +=                          \
- vnet/sr/sr.c
+ vnet/sr/sr.c                                  \
+ vnet/sr/sr_replicate.c
 endif
  
 nobase_include_HEADERS +=                      \
@@ -586,6 +633,12 @@ libvnet_la_SOURCES +=                              \
 nobase_include_HEADERS +=                      \
   vnet/devices/dpdk/dpdk.h                     \
   vnet/devices/dpdk/threads.h
+else
+libvnet_la_SOURCES +=                          \
+  vnet/devices/nic/ixge.c                       \
+  vnet/devices/nic/ixge.h                       \
+  vnet/devices/nic/sfp.c                        \
+  vnet/devices/nic/sfp.h
 endif
 
 ########################################
@@ -623,6 +676,20 @@ libvnet_la_SOURCES +=                              \
 nobase_include_HEADERS +=                      \
   vnet/devices/af_packet/af_packet.h
 
+########################################
+# 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
+
+nobase_include_HEADERS +=                      \
+  vnet/devices/netmap/netmap.h
+
+
 ########################################
 # Unix kernel related
 ########################################
@@ -650,6 +717,16 @@ libvnetplugin_la_SOURCES +=                    \
 nobase_include_HEADERS +=                      \
   vnet/plugin/plugin.h
 
+########################################
+# Service Chain verification util
+########################################
+libvnet_la_SOURCES +=       \
+ vnet/lib-scv/scv_util.c
+
+nobase_include_HEADERS +=                       \
+ vnet/lib-scv/scv_util.h                        \
+ vnet/lib-scv/math64.h
+
 lib_LTLIBRARIES = libvnet.la libvnetplugin.la
 
 dpdk_libs = 
@@ -666,3 +743,5 @@ pcap2pg_LDFLAGS = -static
 pcap2pg_LDADD = libvnet.la -l:libvppinfra.a -lpthread -lm -ldl
 
 noinst_PROGRAMS += pcap2pg
+
+