Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
name: "CI"
on:
push:
branches:
- master
Comment thread
danielinux marked this conversation as resolved.
pull_request:
workflow_dispatch:
jobs:
smoke:
name: "Smoke test"
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: "Check out"
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: "Install dependencies (Linux)"
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake libvdeplug-dev
sudo apt-get install -U -y --no-install-recommends -q cmake libvdeplug-dev libpcap-dev || true
Comment thread
danielinux marked this conversation as resolved.
Outdated
- name: "Check out"
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: "Build"
run: |
mkdir build
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ cm_check_include(sys/type32.h HAVE_SYS_TYPE32_H)
cm_check_include(syslimits.h HAVE_SYSLIMITS_H)
cm_check_include(sys/syslimits.h HAVE_SYS_SYSLIMITS_H)
cm_check_include(sysexits.h HAVE_SYSEXITS_H)
cm_check_include(pcap.h HAVE_PCAP_H)

cm_check_include(wolfssl/wolfcrypt/chacha.h HAVE_WOLFSSL_CHACHA_H)
cm_check_include(mbedtls/chacha20.h HAVE_MBEDTLS_CHACHA20_H)
Expand Down Expand Up @@ -190,8 +191,13 @@ if(ENABLE_ROUTER AND PTHREAD_LIBRARY)
set(CAN_MAKE_VDE_ROUTER TRUE)
endif()

if(ENABLE_PCAP AND HAVE_PCAP_OPEN_DEAD)
if(ENABLE_PCAP AND PCAP_LIBRARY AND HAVE_PCAP_H)
set(CAN_MAKE_VDE_PCAP TRUE)
else()
set(CAN_MAKE_VDE_PCAP FALSE)
if(ENABLE_PCAP)
message(WARNING "Cannot make vde_pcapplug: libpcap headers or library not found")
Comment thread
danielinux marked this conversation as resolved.
endif()
endif()

if(HAVE_SYSEXITS_H)
Expand Down
12 changes: 7 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif()

if (CAN_MAKE_VDE_PCAP)
add_executable(vde_pcapplug vde_pcapplug.c)
target_link_libraries(vde_pcapplug vdeplug pcap)
target_link_libraries(vde_pcapplug vdeplug pcap vdecommon)
endif()

if(ENABLE_VXLAN)
Expand Down Expand Up @@ -52,13 +52,15 @@ target_link_libraries(wirefilter vdeplug m vdecommon)
add_executable(vdeterm vdeterm.c)
target_link_libraries(vdeterm vdeplug vdehist vdecommon)

add_executable(vde_pcapplug vde_pcapplug.c)
target_link_libraries(vde_pcapplug vdeplug pcap vdecommon)

if (NOT WITH_VDEPLUG4)
install(TARGETS vde_plug dpipe
DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

install(TARGETS unixcmd vde_plug2tap vde_autolink wirefilter vdeterm vde_pcapplug
install(TARGETS unixcmd vde_plug2tap vde_autolink wirefilter vdeterm
DESTINATION ${CMAKE_INSTALL_BINDIR})

if (CAN_MAKE_VDE_PCAP)
install(TARGETS vde_pcapplug
DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
11 changes: 8 additions & 3 deletions src/vde_switch/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ if(ENABLE_EXPERIMENTAL)
add_definitions(-DDEBUGOPT -DPORTCOUNTERS -DVDEPLUGIN)
endif()

# Handle ENABLE_PCAP flag
if(ENABLE_PCAP)
# Handle pcap support
if(CAN_MAKE_VDE_PCAP)
add_library(pdump MODULE pdump.c)
target_link_libraries(pdump vdecommon pcap)
else()
set(EXTRA_DIST pdump.c)
endif()

# install modules
install(TARGETS dump iplog pdump DESTINATION
install(TARGETS dump iplog DESTINATION
${CMAKE_INSTALL_LIBDIR}/vde2/plugins)

if(CAN_MAKE_VDE_PCAP)
install(TARGETS pdump DESTINATION
${CMAKE_INSTALL_LIBDIR}/vde2/plugins)
endif()
Loading