Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ share/click/elementmap.xml
share/click/pkg-config.mk
stamp-egroup
stamp-h
/doc/lisp-api/
4 changes: 4 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ Mazu Networks, Inc.
http://www.mazunetworks.com/
universal improvements, new elements

Franck Messaoudi
frank.messaoudi@gmail.com
LISP (Locator/ID Separation Protocol) and Follow Me Cloud elements

Robert Morris
rtm@lcs.mit.edu
design, Ethernet, IP, Linux kernel module, radio elements, Linux kernel
Expand Down
101 changes: 101 additions & 0 deletions conf/lisp/xtr1_xtr2_fmcc.click
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// xtr1_xtr2_fmcc.click -- LISP + FMCC demo: two xTRs, a Map-Server and the
// FMCC controller in one Click process; migrates VM 192.168.122.161.
// Franck Messaoudi
//
// Copyright (c) 2014-2026 Franck Messaoudi
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, subject to the conditions
// listed in the Click LICENSE file. These conditions include: you must
// preserve this copyright notice, and you cannot mention the copyright
// holders in advertising related to the Software without their permission.
// The Software is provided WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED. This
// notice is a summary of the Click LICENSE file; the license in that file is
// legally binding.

// Two xTRs, a Map-Server and the FMCC in one Click process (demo).

FD :: FromDevice(eth0, PROMISC true);

C :: Classifier( 12/0806 20/0001,
12/0806 20/0002,
12/0800,
-);

LC :: LISPClassifierxTR();

FD -> C;

TD :: ToDevice(eth0);

OUT :: Queue(10000) -> TD;
C[0] -> Discard;
C[1] -> OUT;


/********************************** XTR1 ******************************************/
IC :: LISPMapCache;
EB1 :: LISPEtrDatabase(192.168.122.239, 192.168.122.10, 192.168.122.20, 192.168.122.30, 192.168.122.161);
RGSTR1 :: LISPMapRegistrar(EB1, UDP, 192.168.122.239, 192.168.122.108);
RGSTR2 :: LISPMapRegistrar(EB1, UDP, 192.168.122.239, 192.168.122.153);
TR :: LISPVMCounter(192.168.122.210, 192.168.122.20, 192.168.122.30, 192.168.122.161);
UPDTR1 :: LISPMigrationUpdater(192.168.122.239, EB1, TR, RGSTR1);
RQSTSend :: LISPMapRequester(IC, UDP, 192.168.122.239, 192.168.122.153);


/********************************** XTR2 ******************************************/
EB2 :: LISPEtrDatabase(192.168.122.153, 192.168.122.50, 192.168.122.60, 192.168.122.70, 192.168.122.80);
RGSTR3 :: LISPMapRegistrar(EB2, UDP, 192.168.122.153, 192.168.122.108);
RGSTR4 :: LISPMapRegistrar(EB2, UDP, 192.168.122.153, 192.168.122.153);

UPDTR2 :: LISPMigrationUpdater(192.168.122.153, EB2, TR, RGSTR3);
//RQSTRes2 :: LISPMapReplier(EB, UDP, 192.168.122.153, 192.168.122.161);
//RQSTRes2 :: LISPMapReplier(EB, UDP, 192.168.122.239, 192.168.122.153);
/********************************** FMCC ******************************************/
FMCCB :: FMCCDatabase;
migrator1 :: FMCCMigrator(FMCCB, UDP, 192.168.122.153, 192.168.122.239);
migrator2 :: FMCCMigrator(FMCCB, UDP, 192.168.122.153, 192.168.122.153);
manager1 :: FMCCManager(192.168.122.239, 192.168.122.153, 192.168.122.161, FMCCB, migrator1);
manager2 :: FMCCManager(192.168.122.239, 192.168.122.153, 192.168.122.161, FMCCB, migrator2);

/********************************** MS_MR ******************************************/

MB :: LISPMappingDB;
//mapresolver::LISPMapResolver(MB, UDP, 192.168.122.108, 192.168.122.161);
mapserver1 :: LISPMapServer(MB, UDP, 192.168.122.108, 192.168.122.239);
mapserver2 :: LISPMapServer(MB, UDP, 192.168.122.108, 192.168.122.239);

/******************************************************************************/


RGSTR1 -> mapserver1;
RGSTR2 -> manager1;

RGSTR3 -> mapserver2;
RGSTR4 -> manager2;

mapserver1 ->migrator1;
mapserver2 ->migrator2;

migrator1 ->UPDTR1;//Discard;//UPDTR1;
migrator2 ->UPDTR2;//Discard;//UPDTR2;

UPDTR1 -> Discard;

C[2] -> Strip(14) -> LC;
LC[0] -> [0]RQSTSend;
LC[1] -> RGSTR3;
LC[2] -> [1]RQSTSend;
LC[3] -> RGSTR1;
LC[4] ->RGSTR2;
LC[5] ->TR;
LC[6] ->RGSTR4;
LC[7] -> [2]RQSTSend;

/*****************************/
//LC[8] -> UPDTR1;
//C[3] -> UPDTR2;
C[3] -> Discard;
/*****************************/
UPDTR2 -> LC;
13 changes: 13 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ enable_ip
enable_ip6
enable_ipsec
enable_json
enable_lisp
enable_local
enable_radio
enable_simple
Expand Down Expand Up @@ -1535,6 +1536,7 @@ Optional Features:
--enable-ip6 include IPv6 elements
--enable-ipsec include IP security elements
--enable-json include JSON helpers
--enable-lisp include LISP (Locator/ID Separation Protocol) elements
--enable-local include local elements
--enable-radio include radio elements
--disable-simple do not include simple versions of other elements
Expand Down Expand Up @@ -7179,6 +7181,17 @@ test "x$enable_all_elements" = xyes -a \( "x$enable_json" = xNO -o "x$enable_jso
if test "x$enable_json" = xyes; then
:

fi
# Check whether --enable-lisp was given.
if test "${enable_lisp+set}" = set; then :
enableval=$enable_lisp;
else
enable_lisp=NO
fi
test "x$enable_all_elements" = xyes -a \( "x$enable_lisp" = xNO -o "x$enable_lisp" = x \) && enable_lisp=yes
if test "x$enable_lisp" = xyes; then
:

fi
# Check whether --enable-local was given.
if test "${enable_local+set}" = set; then :
Expand Down
1 change: 1 addition & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ ELEMENTS_ARG_ENABLE(ip, [include IP elements], yes)
ELEMENTS_ARG_ENABLE(ip6, [include IPv6 elements], NO, AC_DEFINE(HAVE_IP6))
ELEMENTS_ARG_ENABLE(ipsec, [include IP security elements], NO, AC_DEFINE(HAVE_IPSEC))
ELEMENTS_ARG_ENABLE(json, [include JSON helpers], NO)
ELEMENTS_ARG_ENABLE(lisp, [include LISP (Locator/ID Separation Protocol) elements], NO)
ELEMENTS_ARG_ENABLE(local, [include local elements], NO)
ELEMENTS_ARG_ENABLE(radio, [include radio elements], NO)
ELEMENTS_ARG_ENABLE(simple, [include simple versions of other elements], yes)
Expand Down
51 changes: 51 additions & 0 deletions elements/lisp/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# .clang-format -- Click coding style for the LISP element group.
# Format a file with: clang-format -i elements/lisp/FILE
# Click coding style (Eddie Kohler's), as used in the rest of the Click tree:
# 4-space indentation with 8-column tabs, return type on its own line in
# function definitions, function braces on their own line, K&R braces for
# control statements, pointer next to the name.
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 8
UseTab: ForContinuationAndIndentation
ColumnLimit: 80
BreakBeforeBinaryOperators: All
AlignOperands: DontAlign
AlignAfterOpenBracket: DontAlign
PenaltyBreakBeforeFirstCallParameter: 100
PenaltyExcessCharacter: 100
BreakStringLiterals: false
AlwaysBreakAfterDefinitionReturnType: TopLevel
BreakBeforeBraces: Custom
BraceWrapping:
AfterFunction: true
AfterClass: false
AfterStruct: false
AfterControlStatement: Never
AfterEnum: false
BeforeElse: false
SplitEmptyFunction: true
SplitEmptyRecord: false
PointerAlignment: Right
SpaceBeforeParens: ControlStatements
AccessModifierOffset: -2
BreakConstructorInitializers: BeforeColon
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 4
AllowShortFunctionsOnASingleLine: InlineOnly
PackConstructorInitializers: NextLineOnly
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
IndentCaseLabels: false
NamespaceIndentation: None
ReflowComments: false
SortIncludes: Never
AlignTrailingComments: true
AlignConsecutiveMacros: Consecutive
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
SpacesBeforeTrailingComments: 1
IndentPPDirectives: AfterHash
PPIndentWidth: 1
42 changes: 42 additions & 0 deletions elements/lisp/Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Doxyfile -- API documentation of the LISP element group, generated from the
# comments in the source ("documentation as code").
# Franck Messaoudi. Copyright (c) 2014-2026 Franck Messaoudi; see the Click
# LICENSE file.
#
# Run from the top of the Click tree: doxygen elements/lisp/Doxyfile
# Output: doc/lisp-api/html/index.html
# Element documentation (arguments, ports, handlers) is in the =c comments
# of each .hh and is turned into man pages by doc/click-elem2man.

PROJECT_NAME = "Click LISP elements"
PROJECT_BRIEF = "LISP (RFC 9300/9301) and Follow Me Cloud elements for Click"
OUTPUT_DIRECTORY = doc/lisp-api
INPUT = elements/lisp/README.md \
elements/lisp/LISP_GUIDE.md \
include/clicknet/lisp.h \
elements/lisp
FILE_PATTERNS = *.hh *.cc *.h *.md
USE_MDFILE_AS_MAINPAGE = elements/lisp/README.md
INPUT_ENCODING = UTF-8
RECURSIVE = NO
EXTRACT_ALL = NO
EXTRACT_STATIC = YES
HIDE_UNDOC_MEMBERS = NO
SORT_MEMBER_DOCS = NO
JAVADOC_AUTOBRIEF = NO
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
INCLUDE_PATH = include
PREDEFINED = CLICK_DECLS= CLICK_ENDDECLS= CLICK_USERLEVEL=1 \
CLICK_COLD= CLICK_ALWAYS_INLINE=
GENERATE_HTML = YES
GENERATE_LATEX = NO
GENERATE_TREEVIEW = YES
SOURCE_BROWSER = YES
STRIP_FROM_PATH = .
Loading