Skip to content

Commit

Permalink
pceplib: Integrate pcelib into frr
Browse files Browse the repository at this point in the history
Signed-off-by: Brady Johnson <brady@voltanet.io>
Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
  • Loading branch information
Javier Garcia committed Jan 28, 2021
1 parent 776a2f8 commit 3adf1bf
Show file tree
Hide file tree
Showing 113 changed files with 24,682 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ include bfdd/subdir.am
include yang/subdir.am
include yang/libyang_plugins/subdir.am
include vrrpd/subdir.am
if HAVE_PATHD_PCEP
include pceplib/src/subdir.am
include pceplib/test/subdir.am
endif
include pathd/subdir.am

include vtysh/subdir.am
Expand Down
18 changes: 11 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2491,13 +2491,17 @@ AM_CONDITIONAL([HAVE_PROTOBUF3], [$PROTO3])
dnl PCEP plugin
AM_CONDITIONAL([HAVE_PATHD_PCEP], [test "$enable_pcep" = "yes"])
AS_IF([test "$enable_pcep" = "yes"], [
AC_CHECK_LIB([pcep_pcc], [initialize_pcc], [
PATHD_PCEP_LIBS="-lpcep_pcc"
],[
AC_MSG_ERROR([PCEP library libpcep_pcc not found])
])
AC_SUBST([PATHD_PCEP_LIBS])
])
AC_SUBST([PATHD_PCEP_LIBS], ["-Lpceplib/src -lpcep_pcc"])
AC_SUBST([PATHD_PCEP_INCL], ["-I./pceplib/src "])
AC_CHECK_LIB([cunit], [CU_initialize_registry], [
PATHD_PCEP_LIBS+=" -lcunit"
],[
AC_MSG_ERROR([cunit unit test not found])
])
AC_SUBST([PATHD_PCEP_LIBS])
])
AC_CHECK_PROG(VALGRIND_CHECK, valgrind, yes)
AS_IF([test x"$VALGRIND_CHECK" != x"yes"], [AC_MSG_ERROR([Please install valgrind before configuring.])])

dnl daemons
AM_CONDITIONAL([VTYSH], [test "$VTYSH" = "vtysh"])
Expand Down
2 changes: 1 addition & 1 deletion pathd/path_pcep_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <northbound.h>
#include <yang.h>
#include <printfrr.h>
#include <pcep-objects.h>
#include <pcep_msg_objects.h>
#include "pathd/pathd.h"
#include "pathd/path_pcep.h"
#include "pathd/path_pcep_config.h"
Expand Down
2 changes: 1 addition & 1 deletion pathd/path_pcep_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include "pathd/path_debug.h"
#include <pcep_pcc_api.h>
#include <pcep-objects.h>
#include <pcep_msg_objects.h>
#include "pathd/path_pcep.h"
#include "pathd/path_pcep_controller.h"
#include "pathd/path_pcep_pcc.h"
Expand Down
4 changes: 3 additions & 1 deletion pathd/subdir.am
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ pathd_pathd_pcep_la_SOURCES = \
pathd/path_pcep_config.c \
pathd/path_pcep_pcc.c \
# end

pathd_pathd_pcep_la_CPPFLAGS = @PATHD_PCEP_INCL@ $(AM_CPPFLAGS)
pathd_pathd_pcep_la_LIBADD = @PATHD_PCEP_LIBS@
pathd_pathd_pcep_la_CFLAGS = $(WERROR)
pathd_pathd_pcep_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
pathd_pathd_pcep_la_LIBADD = @PATHD_PCEP_LIBS@
Loading

0 comments on commit 3adf1bf

Please sign in to comment.