Coder Social home page Coder Social logo

ll-dlep's Introduction

The MIT Lincoln Laboratory DLEP (LL-DLEP) is an implementation of the Dynamic Link Exchange Protocol, an IETF standards-track protocol (https://datatracker.ietf.org/doc/rfc8175/) that specifies a radio-to-router interface. It is an IP network protocol that runs between a radio/modem and a router over a direct (single hop) connection. Its primary purpose is to enable the modem to tell the router about destinations (other computers/networks) that the modem can reach, and to provide metrics associated with those destinations. The router can then make routing decisions based on that information.

This README describes how to build and run the Dlep implementation developed at MIT Lincoln Laboratory. See RELEASENOTES.md for what has changed in this release.

This release was was developed and tested on:

  • Ubuntu Linux version 14.04 LTS
  • Ubuntu Linux version 16.04 LTS
  • CentOS 7
  • CentOS 6
  • Mac OS X (10.12.6)

INSTALL OPEN SOURCE PACKAGES

Install these packages before building anything. Ubuntu/Debian package names:

  • libboost-thread-dev (version 48 or higher)
  • libboost-system-dev (version should match thread-dev)
  • libboost-test-dev (version should match thread-dev)
  • libxml2
  • libxml2-dev
  • libxml2-utils (for xmllint)
  • libreadline6-dev
  • libprotobuf-dev
  • protobuf-compiler
  • doxygen
  • graphviz
  • cmake

Fedora/Red Hat (EL7) package names (for EL6, see below):

  • boost
  • boost-devel
  • xml2
  • libxml2-devel
  • readline-devel
  • gcc-c++
  • clang
  • python
  • protobuf
  • protobuf-devel
  • doxygen
  • graphviz
  • cmake
  • rpm-build

MacPorts port names:

  • protobuf3-cpp
  • pkgconfig
  • boost
  • libxml2
  • doxygen
  • graphviz
  • cmake

Red Hat/CentOS 6 specific notes:

The default GCC and Boost on EL6 (GCC 4.4.7 and Boost 1.41) are not new enough to build DLEP. However, EL6 includes a parallel install updated version of Boost (v1.48). The Software Collections project contains a group of packages under the "DevToolSet" umbrella, including newer gcc toolchains. To build DLEP on EL6, use the following steps (tested on CentOS 6.10):

# Add the Software Collections repository
sudo yum install centos-release-scl
# Install the standard DLEP dependencies
sudo yum install cmake libxml2-devel readline-devel protobuf-devel doxygen graphviz rpm-build
# Install EL6 Boost 1.48 and Software Collections GCC8
sudo yum install boost148-devel devtoolset-8-toolchain
# From the build directory in dlep source code directory, run the following cmake command
CC=/opt/rh/devtoolset-8/root/usr/bin/gcc CXX=/opt/rh/devtoolset-8/root/usr/bin/g++ cmake -DBOOST_INCLUDEDIR=/usr/include/boost148/ -DBOOST_LIBRARYDIR=/usr/lib64/boost148/ -DWARNINGS_AS_ERRORS=OFF ..
# Build DLEP
make

BUILD

We will refer to the directory containing the dlep source as dlep-top. Do the following (shell commands are prefixed with $):

$ cd dlep-top/build
$ cmake ..
$ make
$ sudo make install

Some useful build variations are described below.

By default, the DLEP build treats all compiler warnings as errors (-Werror compiler flag). If you are experiencing problems compiling on your system due to this setting, you can disable it with:

$ cmake -DWARNINGS_AS_ERRORS=OFF ..

To build with debugging symbols, replace the cmake line above with:

$ cmake -DCMAKE_BUILD_TYPE=Debug ..

To build with the GNU C++ Lbrary debugging (error checking) enabled (see https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html), replace the cmake line above with:

$ cmake -DCMAKE_CXX_FLAGS="-D_GLIBCXX_DEBUG" ..

To build with the clang compiler, replace the cmake line above with:

$ CC=clang CXX=clang++ cmake  ..

To build a package for the type of system you're building on:

$ cmake -DPACKAGE=on ..
$ make package

To see the build output on the terminal as it is produced:

$ make VERBOSE=1

TEST

To run the unit tests after building:

$ cd dlep-top/build
$ make test

If any tests fail, you can get more information with:

$ CTEST_OUTPUT_ON_FAILURE=1 make test

To exercise the example DLEP client, you will need two different machines on the same network, one to run the DLEP modem and one for the DLEP router. Rather than using physical machines, we suggest initially creating Linux containers with CORE (Common Open Research Emulator, http://www.nrl.navy.mil/itd/ncs/products/core). In CORE, create a 2-node topology using router nodes, and connect them to an ethernet switch. Open a terminal window to each node. Then:

In window 1 (node with IP 10.0.0.1), run the modem side:

$ cd dlep-top
$ ./Dlep config-file config/modem.xml

Dlep will drop into a command line interface (CLI). You can type help to get a summary of available commands. Detailed logging will go to dlep-modem.log, which comes from the config-file.

In window 2 (node with IP 10.0.0.2), run the router side:

$ cd dlep-top
$ ./Dlep config-file config/router.xml

As with the modem, Dlep will drop into a CLI. Detailed logging will go to dlep-modem.log. You should see a "Peer up" message in both windows indicating that the Dlep session initialization successfully completed.


MORE INFORMATION

Refer to the User Guide doc/doxygen/markdown/UserGuide.md, or the doxygen-generated version at file:///dlep-top/build/doc/doxygen/html/index.html . The doxygen files are also installed in an OS-dependent location, e.g., /usr/local/share/dlep/html/index.html.

ll-dlep's People

Contributors

b00ga avatar davidpwiggins avatar louberger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ll-dlep's Issues

Installing .deb when built on Debian 10 appears broken

Hi all,

I've been successful in compiling and packaging into a .deb, however when attempting to install it, I get the error

dpkg: error processing archive dlep-2.1.amd64.deb (--install):
 parsing file '/var/lib/dpkg/tmp.ci/control' near line 6:
 missing 'Package' field
Errors were encountered while processing:
 dlep-2.1.amd64.deb

This only happens when building on a Debian 10 64-bit system. Building and packing from an Ubuntu 18.04 64-bit machine, all works just fine. I've attempted playing with the CMakeLIsts.txt and build/CPackConfig.make files, but haven't had any luck.

Viewing _CPack_Packages/Linux/DEB/dlep-2.1.amd64/control has a Package field set, granted it's not near line 6.

Both systems are up to date with all requirements installed.

Time comparison errors in DestAdvert.cpp

I got a pair of related errors while trying to compile onto the Raspberry Pi:

/home/rmccourt/LL-DLEP/DestAdvert.cpp:378:27: error: comparison of integer expressions of different signedness: ‘time_t’ {aka ‘long int’} and ‘unsigned int’ [-Werror=sign-compare]
             if (entry_age >= hold_interval)
                 ~~~~~~~~~~^~~~~~~~~~~~~~~~
/home/rmccourt/LL-DLEP/DestAdvert.cpp:390:27: error: comparison of integer expressions of different signedness: ‘time_t’ {aka ‘long int’} and ‘unsigned int’ [-Werror=sign-compare]
             if (entry_age >= expire_count * entry.info.reportInterval)
                 ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I got it to compile by casting the results to time_t:

if (entry_age >= (time_t) hold_interval)
and
if (entry_age >= (time_t) (expire_count * entry.info.reportInterval))

Not positive that it's the perfect fix, but figured I'd flag it for someone who's more familiar with the code to look at. Not really sure if/how to submit this as a change for review.

Unable to get past Peer Offer

Hi again! I'm attempting to function as a router with a device that supposedly is known to have functioning DLEP support. I've got it build on a router (Debian 10 box) with the command:

sudo Dlep session-iface eth1 discovery-iface eth1 local-type router log-level 5

I have another laptop on this network and so I can see the Peer Discovery message multicast. The issue presents itself immediately after, and I "verified" by tcpdumping the traffic on the router. I can also see the Peer Offer from my DLEP device, however there's nothing (no session initialization) after. I'm wondering if you've seen this before, or if there's something wrong with my setup.

Everything has static IPs assigned, no DHCP and everything is reachable. Nothing shows up with show peer either.

Any advice you have?
Screen Shot 2020-11-11 at 6 59 57 PM

DLEP metrics calculations

Hi All,

I understand that DLEP metrics calculation is implementation specific, but I wanted to know if someone has any findings or any work done related to calculations of DLEP metrics for DLEP modem.
Also does this project has anything related to calculating metrics ?

Thank You

Initiate Session Termination On DLEP Router

Hi All,
Is there a way/option to Initiate a Session Termination on DLEP router and see how DLEP modem responds to the session termination.
I am trying for gracefull termination rather killing the router process abnormally.

DLEP peer not up when router supports less extension than modem

One Dlep run as router, doesn't support latency extension.
One Dlep run as modem, supports latency extension.
The modem when it sends back session initialization response, it still includes data item 65411 (latency range) which is defined in latency extension. This makes the router throw error and the peer is not up.

sending a link characterization request results in peer being brought down

test using configs in #8
on modem:

dest up 0:0:0:0:0:1 Latency_Range 1;2

on router:

linkchar request 0:0:0:0:0:1 Latency 4 Current_Data_Rate_Receive 0 Current_Data_Rate_Transmit 1

with logging turned on on modem see:
11:35:30.024 INFO: .../LL-DLEP/Peer.cpp:1492:handle_destination_up_response(): status=Success 11:35:30.024 DEBUG: .../LL-DLEP/Peer.cpp:1016:handle_session_receive(): signal buffer has 0 extra bytes after the signal just handled 11:35:40.731 INFO: .../LL-DLEP/Peer.cpp:950:handle_session_receive(): from peer=127.0.0.1:58860 error=system:0 bytes_recvd=50 11:35:40.731 DEBUG: .../LL-DLEP/Peer.cpp:987:handle_session_receive(): signal buffer now holds 50 bytes from the peer 11:35:40.731 INFO: .../LL-DLEP/Peer.cpp:1873:handle_peer_signal(): from=127.0.0.1:58860 size=50 : 11:35:40.731 DEBUG: .../LL-DLEP/ProtocolMessage.cpp:552:parse(): handle_peer_signal message length=50 bytes=00 0e 00 2e 00 07 00 06 00 00 00 00 00 01 00 10 00 08 00 00 00 00 00 00 00 04 00 0e 00 08 00 00 00 00 00 00 00 00 00 0f 00 08 00 00 00 00 00 00 00 01 11:35:40.731 INFO: .../LL-DLEP/ProtocolMessage.cpp:603:parse(): handle_peer_signal signal id=14(Link_Characteristics_Request) length=46 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=4 data item id=7 length=6 MAC_Address 00:00:00:00:00:01 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=14 data item id=16 length=8 Latency 4 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=26 data item id=14 length=8 Current_Data_Rate_Receive 0 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=38 data item id=15 length=8 Current_Data_Rate_Transmit 1 11:35:40.732 INFO: .../LL-DLEP/Peer.cpp:1739:handle_link_characteristics_request(): from peer=127.0.0.1:58860 destination=00:00:00:00:00:01 11:35:40.732 DEBUG: .../LL-DLEP/Peer.cpp:1774:handle_link_characteristics_request(): calling client linkchar_request handler 11:35:40.732 INFO: .../LL-DLEP/Peer.cpp:718:link_characteristics_response(): to peer=127.0.0.1:58860 mac=00:00:00:00:00:01 11:35:40.732 DEBUG: .../LL-DLEP/ProtocolMessage.cpp:80:add_data_item(): added data item MAC_Address to Link_Characteristics_Response, now length=14 11:35:40.732 DEBUG: .../LL-DLEP/ProtocolMessage.cpp:80:add_data_item(): added data item Latency to Link_Characteristics_Response, now length=26 11:35:40.732 DEBUG: .../LL-DLEP/ProtocolMessage.cpp:80:add_data_item(): added data item Current_Data_Rate_Receive to Link_Characteristics_Response, now length=38 11:35:40.732 DEBUG: .../LL-DLEP/ProtocolMessage.cpp:80:add_data_item(): added data item Current_Data_Rate_Transmit to Link_Characteristics_Response, now length=50 11:35:40.732 DEBUG: .../LL-DLEP/ProtocolMessage.cpp:552:parse(): link_characteristics_response message length=50 bytes=00 0f 00 2e 00 07 00 06 00 00 00 00 00 01 00 10 00 08 00 00 00 00 00 00 00 04 00 0e 00 08 00 00 00 00 00 00 00 00 00 0f 00 08 00 00 00 00 00 00 00 01 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:603:parse(): link_characteristics_response signal id=15(Link_Characteristics_Response) length=46 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=4 data item id=7 length=6 MAC_Address 00:00:00:00:00:01 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=14 data item id=16 length=8 Latency 4 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=26 data item id=14 length=8 Current_Data_Rate_Receive 0 11:35:40.732 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=38 data item id=15 length=8 Current_Data_Rate_Transmit 1 11:35:40.732 ERROR: .../LL-DLEP/ProtocolMessage.cpp:712:validate(): Link_Characteristics_Response exactly one of Status required, but got 0 11:35:40.732 INFO: .../LL-DLEP/Peer.cpp:71:send_session_message(): to peer=127.0.0.1:58860 size=50 11:35:40.732 DEBUG: .../LL-DLEP/Peer.cpp:1016:handle_session_receive(): signal buffer has 0 extra bytes after the signal just handled 11:35:40.733 INFO: .../LL-DLEP/Peer.cpp:62:handle_send(): peer=127.0.0.1:58860 error=system:0 11:35:40.733 INFO: .../LL-DLEP/Peer.cpp:950:handle_session_receive(): from peer=127.0.0.1:58860 error=system:0 bytes_recvd=80 11:35:40.733 DEBUG: .../LL-DLEP/Peer.cpp:987:handle_session_receive(): signal buffer now holds 80 bytes from the peer 11:35:40.733 INFO: .../LL-DLEP/Peer.cpp:1873:handle_peer_signal(): from=127.0.0.1:58860 size=80 : 11:35:40.733 DEBUG: .../LL-DLEP/ProtocolMessage.cpp:552:parse(): handle_peer_signal message length=80 bytes=00 05 00 4c 00 01 00 48 82 4c 69 6e 6b 5f 43 68 61 72 61 63 74 65 72 69 73 74 69 63 73 5f 52 65 73 70 6f 6e 73 65 20 65 78 61 63 74 6c 79 20 6f 6e 65 20 6f 66 20 53 74 61 74 75 73 20 72 65 71 75 69 72 65 64 2c 20 62 75 74 20 67 6f 74 20 30 11:35:40.733 INFO: .../LL-DLEP/ProtocolMessage.cpp:603:parse(): handle_peer_signal signal id=5(Session_Termination) length=76 11:35:40.733 INFO: .../LL-DLEP/ProtocolMessage.cpp:629:parse(): at index=4 data item id=1 length=72 Status 130;Link_Characteristics_Response exactly one of Status required, but got 0 11:35:40.733 DEBUG: .../LL-DLEP/ProtocolMessage.cpp:552:parse(): send_simple_response message length=4 bytes=00 06 00 00 11:35:40.733 INFO: .../LL-DLEP/ProtocolMessage.cpp:603:parse(): send_simple_response signal id=6(Session_Termination_Response) length=0 11:35:40.733 INFO: .../LL-DLEP/Peer.cpp:71:send_session_message(): to peer=127.0.0.1:58860 size=4 11:35:40.733 INFO: .../LL-DLEP/Peer.cpp:821:stop_peer(): peer=127.0.0.1:58860 11:35:40.733 DEBUG: .../LL-DLEP/Peer.cpp:932:stop_timers(): stopping heartbeats to peer=127.0.0.1:58860 11:35:40.733 DEBUG: .../LL-DLEP/Peer.cpp:936:stop_timers(): stopping acktivity timer for peer=127.0.0.1:58860 11:35:40.733 INFO: .../LL-DLEP/Peer.cpp:1999:set_state(): peer=127.0.0.1:58860 old state=in session new state=terminating 11:35:40.733 DEBUG: .../LL-DLEP/Peer.cpp:1016:handle_session_receive(): signal buffer has 0 extra bytes after the signal just handled 11:35:40.734 INFO: .../LL-DLEP/Peer.cpp:62:handle_send(): peer=127.0.0.1:58860 error=system:0 11:35:40.734 ERROR: .../LL-DLEP/Peer.cpp:906:handle_heartbeat_timeout(): boost timer error system:125 11:35:40.734 ERROR: .../LL-DLEP/Peer.cpp:467:handle_acktivity_timeout(): boost timer error system:125 11:35:41.721 INFO: .../LL-DLEP/Dlep.cpp:541:cleanup_ex_peers(): deleting peer=127.0.0.1:58860 11:35:41.732 DEBUG: .../LL-DLEP/Peer.cpp:871:cancel_session(): peer=127.0.0.1:58860 11:35:41.732 INFO: .../LL-DLEP/Peer.cpp:950:handle_session_receive(): from peer=127.0.0.1:58860 error=system:125 bytes_recvd=0 11:35:41.774 ERROR: .../LL-DLEP/Peer.cpp:955:handle_session_receive(): bailing out because error=system:125 11:35:41.774 DEBUG: .../LL-DLEP/Peer.cpp:50:~Peer(): peer=127.0.0.1:58860

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.