diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-09-18 08:03:31 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-09-18 09:27:53 +0200 |
commit | f86502516b2a069954d0529d8b43593ece7360eb (patch) | |
tree | 73bc28244ef03c23e2ba5e79ae843de3df3fe727 /src/lib/CMakeLists.txt | |
parent | 60ffacc12ab73752cb6ef736f2b41022c984785c (diff) | |
download | ouroboros-f86502516b2a069954d0529d8b43593ece7360eb.tar.gz ouroboros-f86502516b2a069954d0529d8b43593ece7360eb.zip |
lib: Provide RIB API to export internals via fuse
This adds a virtual RIB that is accessible as a filesystem that is
accessed through a fuse mountpoint (configurable , default is
/tmp/ouroboros). Currently, each IPCP will export its link state
database.
Diffstat (limited to 'src/lib/CMakeLists.txt')
-rw-r--r-- | src/lib/CMakeLists.txt | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index fd7ece83..26cecb44 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -37,10 +37,30 @@ if (HAVE_ROBUST_MUTEX) set(HAVE_ROBUST_MUTEX TRUE) else () message(STATUS "Robust mutex support disabled by user") - set(HAVE_ROBUST_MUTEX FALSE) endif () endif () +find_library(FUSE_LIBRARIES fuse QUIET) +if (FUSE_LIBRARIES) + #FIXME: Check for version >= 2.6 + set(DISABLE_FUSE FALSE CACHE BOOL "Disable FUSE support") + if (NOT DISABLE_FUSE) + message(STATUS "FUSE support enabled") + set(FUSE_PREFIX "/tmp/ouroboros" CACHE STRING + "Mountpoint for RIB filesystem") + set(HAVE_FUSE TRUE CACHE INTERNAL "") + else () + message(STATUS "FUSE support disabled by user") + endif () +endif () + +if (NOT HAVE_FUSE) + set(FUSE_LIBRARIES "") + set(FUSE_INCLUDE_DIR "") +endif () + +mark_as_advanced(FUSE_LIBRARIES) + find_library(LIBGCRYPT_LIBRARIES gcrypt QUIET) if (LIBGCRYPT_LIBRARIES) find_path(LIBGCRYPT_INCLUDE_DIR gcrypt.h @@ -163,6 +183,7 @@ set(SOURCE_FILES qos.c qoscube.c random.c + rib.c rq.c sha3.c shm_flow_set.c @@ -188,7 +209,7 @@ endif (CMAKE_BUILD_TYPE MATCHES Debug) target_link_libraries(ouroboros ${LIBRT_LIBRARIES} ${LIBPTHREAD_LIBRARIES} ${PROTOBUF_C_LIBRARY} ${OPENSSL_LIBRARIES} - ${LIBGCRYPT_LIBRARIES}) + ${LIBGCRYPT_LIBRARIES} ${FUSE_LIBRARIES}) install(TARGETS ouroboros LIBRARY DESTINATION usr/lib) |