]> git.ipfire.org Git - thirdparty/lldpd.git/blobdiff - README.md
priv: correctly handle lldpcli exit
[thirdparty/lldpd.git] / README.md
index fc253ab3b81d61f0fa6cb4cb465522bb38cc599e..909f5659cde98b8a92572712f49cc0311358ff4e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -26,11 +26,15 @@ The following OS are supported:
 
  * FreeBSD
  * GNU/Linux
- * Mac OS X
+ * OS X
  * NetBSD
  * OpenBSD
  * Solaris
 
+Windows is not supported but you can use
+[WinLLDPService](https://github.com/raspi/WinLLDPService/) as a
+transmit-only agent.
+
 Installation
 ------------
 
@@ -56,37 +60,50 @@ syslog, copy `/etc/locatime` into the chroot.
 line. If you don't want to run it as root, just install it setuid or
 setgid `_lldpd`.
 
-Installation (Mac OS X)
+Installation (OS X)
 -----------------------
 
-The same procedure as above applies for Mac OS X. However, there are
+The same procedure as above applies for OS X. However, there are
 simpler alternatives:
 
- 1. Use [Homebrew](http://mxcl.github.io/homebrew/):
+ 1. Use [Homebrew](https://brew.sh):
 
         brew install lldpd
         # Or, for the latest version:
         brew install https://raw.github.com/vincentbernat/lldpd/master/osx/lldpd.rb
 
- 2. Build an OSX installer package which should work on the same
-    version of OS X (it is important to use a separate build
-    directory):
+ 2. Build an OS X installer package which should work on the same
+    version of OS X:
  
         mkdir build && cd build
-        ../configure --prefix=/usr --localstatedir=/var --sysconfdir=/private/etc --with-embedded-libevent \
-            --without-json --without-snmp
-        make -C osx pkg ARCHS="i386 x86_64"
+        ../configure --prefix=/usr/local --localstatedir=/var --sysconfdir=/private/etc --with-embedded-libevent \
+            --without-snmp
+        make -C osx pkg
 
-    If you want to compile for an older version of Mac OS X, you need
+    If you want to compile for an older version of OS X, you need
     to find the right SDK and issues commands like those:
 
         SDK=/Developer/SDKs/MacOSX10.6.sdk
         mkdir build && cd build
-        ../configure --prefix=/usr --localstatedir=/var --sysconfdir=/private/etc --with-embedded-libevent \
-           --without-json --without-snmp \
+        ../configure --prefix=/usr/local --localstatedir=/var --sysconfdir=/private/etc --with-embedded-libevent \
+           --without-snmp \
            CFLAGS="-mmacosx-version-min=10.6 -isysroot $SDK" \
            LDFLAGS="-mmacosx-version-min=10.6 -isysroot $SDK"
-        make -C osx pkg ARCHS="i386 x86_64"
+        make -C osx pkg
+
+    With recent SDK, you don't need to specify an alternate SDK. They
+    are organized in a way that should enable compatibility with older
+    versions of OSX:
+
+        mkdir build && cd build
+        ../configure --prefix=/usr/local --localstatedir=/var --sysconfdir=/private/etc --with-embedded-libevent \
+           --without-snmp \
+           CFLAGS="-mmacosx-version-min=10.9" \
+           LDFLAGS="-mmacosx-version-min=10.9"
+        make -C osx pkg
+
+    You can check with `otool -l` that you got what you expected in
+    term of supported versions.
 
 If you don't follow the above procedures, you will have to create the
 user/group `_lldpd`. Have a look at how this is done in
@@ -150,7 +167,7 @@ interfaces of the bond. In this case, lldpd will affect a received
 randomly to one of the interface (so a neighbor may be affected to the
 wrong interface).
 
-On 2.6.27, we are able to receive packets on real interface for bonded
+On 2.6.27, we are able to receive packets on real interface for enslaved
 devices. This allows one to get neighbor information on active/backup
 bonds. Without the 2.6.27, lldpd won't receive any information on
 inactive slaves. Here are the patchs (thanks to Joe Eykholt):
@@ -236,10 +253,20 @@ that:
     afl-fuzz -i inputs -o outputs ./decode @@
 
 There is a general test suite with `make check`. It's also possible to
-run integration tests with `./tests/integration-tests`. Those are not
-very flexible and may or may not work depending on your platform. Also
-check the content of `tests/lldpcli.conf`. It's a configuration file
-that should cover all commands present in lldpcli.
+run integration tests. They need [py.test](http://pytest.org/latest/)
+and rely on Linux containers to be executed.
+
+To enable code coverage, use:
+
+    ../configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+                 --enable-sanitizers --enable-gcov --with-snmp \
+                 CFLAGS="-O0 -g"
+    make
+    make check
+    # maybe, run integration tests
+    lcov --base-directory $PWD/src/lib \
+         --directory src --capture --output-file gcov.info
+    genhtml gcov.info --output-directory coverage
 
 Embedding
 ---------