mptcpd
mptcpd copied to clipboard
Add standalone mptcpd plugin example.
Add a standalone (out-of-tree) mptcpd no-op plugin example to be used as a reference for mptcpd plugin developers.
@mjmartineau I personally don't think it's good to build against the source tree of a dependency, but here's one way to build the sample plugin against a source tree without modifying Makefiles
:
ELL_DIR=/path/to/ell \
MPTCPD_DIR=/path/to/mptcpd \
PKG_CONFIG_PATH=$ELL_DIR/ell:$MPTCPD_DIR/lib \
CPPFLAGS="-I$MPTCPD_DIR/include -I$ELL_DIR" \
LDFLAGS="-L$MPTCPD_DIR/lib -L$ELL_DIR/ell" \
./configure
Regarding the environment variables, the sample plugin's configure
script help output mentions several besides the usual preprocessor, compiler and linker flags that could be used for building against an mptcpd source tree:
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
PKG_CONFIG_LIBDIR
path overriding pkg-config's built-in search path
MPTCPD_CFLAGS
C compiler flags for MPTCPD, overriding pkg-config
MPTCPD_LIBS linker flags for MPTCPD, overriding pkg-config
MPTCPD_PLUGINDIR
value of plugindir for mptcpd, overriding pkg-config
ELL related variables would normally be pulled in through the mptcpd variables obtained through pkg-config
, which is why they aren't listed in the sample plugin's configure
script help output.
Getting mptcpd to pick up new installed plugin currently requires a restart of mptcpd. I'll document that in the plugins wiki, too.