diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2021-01-04 11:28:33 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2022-03-28 22:34:33 +0000 |
commit | e74c04fc9fb2600470fe79a69d3ec6b0db95faec (patch) | |
tree | cc85fb480afcbe74184a56162d3d06af67cc4eb5 /extras/libmemif/examples/CMakeLists.txt | |
parent | 7d6f7d0d67face9889e43bdb5f71f352294b918a (diff) |
libmemif: refactor examples
- icmp_responder: responds to ICMPv4 and ARP requests
- loopback: connects two interfaces and sends a
verification packet from master memif to slave memif
where it is looped back
- loopback (reverse path): reverses direction of packet
in loopback application (slave memif to master memif)
Type: refactor
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: Ie90aaa3367269408efb6c5d538ad5aa827432238
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'extras/libmemif/examples/CMakeLists.txt')
-rw-r--r-- | extras/libmemif/examples/CMakeLists.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/extras/libmemif/examples/CMakeLists.txt b/extras/libmemif/examples/CMakeLists.txt index 6adacaa3392..f6cfb882805 100644 --- a/extras/libmemif/examples/CMakeLists.txt +++ b/extras/libmemif/examples/CMakeLists.txt @@ -13,20 +13,25 @@ cmake_minimum_required(VERSION 3.5 FATAL_ERROR) -set(HEADERS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +set(COMMON_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/common) set(COMMON_SOURCE_FILES - + common/common.c + common/sender.c + common/responder.c + common/packet_handler.c + common/icmp_proto.c ) list(APPEND EXAMPLES_LIST - + loopback/main.c + icmp_responder/main.c ) foreach (EXAMPLE_SRC ${EXAMPLES_LIST}) string(FIND ${EXAMPLE_SRC} "/" INDEX) string(SUBSTRING ${EXAMPLE_SRC} 0 ${INDEX} EXECUTABLE) - add_executable(${EXECUTABLE} ${COMMON_SOURCE_FILES} ${EXAMPLE_SRC}) - target_include_directories(${EXECUTABLE} PRIVATE $<BUILD_INTERFACE:${HEADERS_DIR}>) + add_executable(${EXECUTABLE} ${COMMON_SOURCE_FILES} ${EXAMPLE_SRC} ) + target_include_directories(${EXECUTABLE} PRIVATE $<BUILD_INTERFACE:${COMMON_HEADERS}>) target_link_libraries(${EXECUTABLE} memif ${CMAKE_THREAD_LIBS_INIT}) endforeach() |