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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ srcdir = .


CLICKDIR = $(HOME)/click
SUBDIRS = dhcp iias models multicast netflow roofnet security snmp unibo_qos
SUBDIRS = dhcp iias models multicast netflow roofnet security snmp unibo_qos ipmp
IP6_SUBDIRS = ip6_natpt multicast6

distdir = $(PACKAGE)-$(VERSION)
Expand Down
8 changes: 8 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ unibo_qos

QoS elements from the Universita` di Bologna, from Giorgio Calarco.

ipmp
....

IPMP, the IP Measurement Protocol, is useful for analysis
of multi-hop paths. It combines the benefits of traceroute with
those of the IPv4 record route option. See ipmp/README.


COPYRIGHT AND LICENSE
---------------------

Expand Down
55 changes: 55 additions & 0 deletions ipmp/Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
SHELL = @SHELL@


# THESE VARIABLES MAY CHANGE BETWEEN PACKAGES

# Set 'package' to the name of your package.
package := @CLICKPACKAGENAME@

# Set these variables appropriately.
top_builddir := .
subdir := .

# Require Click prefix settings.
# Generally, you will provide a '--with-click=CLICKPREFIX' option, and set:
include @clickdatadir@/config.mk

# Set 'MAKE_UPACKAGE', 'MAKE_KPACKAGE', and 'MAKE_BPACKAGE' to '0' or '1'
# to determine whether to build userlevel, linuxmodule, and bsdmodule
# packages, respectively.
MAKE_UPACKAGE = @BUILD_USERLEVEL@
MAKE_KPACKAGE = @BUILD_LINUXMODULE@
MAKE_BPACKAGE = @BUILD_BSDMODULE@

# Set 'STRIP_UPACKAGE' to 'strip -g' to strip debugging symbols from the
# userlevel package before installing.
#STRIP_UPACKAGE = $(STRIP) -g

# Set these variables as required.
DEFS = @DEFS@ $(CLICKDEFS)
INCLUDES = -I. -I$(top_builddir) -I$(srcdir) $(CLICKINCLUDES)

# Set this variable to force 'click-elem2package' to include a header,
# such as your package's '<config.h>', if necessary.
#ELEM2PACKAGE_INCLUDES = -i'<config.h>'

# END OF VARIABLES THAT MAY CHANGE BETWEEN PACKAGES


# Everything below here will probably stay unchanged

srcdir = @srcdir@
top_srcdir = @top_srcdir@

ifeq ($(CLICK_PACKAGE_MAKING),)
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libdir = @libdir@
mandir = @mandir@
datarootdir = @datarootdir@
datadir = @datadir@
endif

include $(clickdatadir)/pkg-Makefile
24 changes: 24 additions & 0 deletions ipmp/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Click-IPMP
##########

This package aims to implement the core functions of IPMP, the
IP Measurement Protocol, Draft version 5. See the thesis of Matthew
Luckie on IPMP:

http://www.wand.net.nz/~mluckie/pubs/mluckie-thesis.pdf

It includes the latest Draft, v5, in its appendix.

The Draft apparently didn't reach the status of a final RFC.
http://datatracker.ietf.org/doc/draft-mcgregor-ipmp/

To use Click-IPMP, just put the module in your data path. It acts as a IPMP
ping forwarder and -responder (most importantly, it puts Path Records in the
packets that flow through). For example configurations, see the files in the
conf-examples/ directory. For more information on how to use the element,
see ipmp_el.hh.

Florian Sesser, TU Munich <[email protected]> 2010-11
based on work by Matthew Luckie and Anthony McGregor, and of course
Eddie Kohler et al.

198 changes: 198 additions & 0 deletions ipmp/conf-examples/dsr-bowl-with-ipmp.click
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
// DSR Click configuration

// Some bugs fixed, DecIPTTL added, IPMP support added, tested on BOWL
// by Florian Sesser (TUM) <[email protected]> 2010

// Copyright 2002, Univerity of Colorado at Boulder.
//
// All Rights Reserved
//
// Permission to use, copy, modify, and distribute this software and its
// documentation for any purpose other than its incorporation into a
// commercial product is hereby granted without fee, provided that the
// above copyright notice appear in all copies and that both that
// copyright notice and this permission notice appear in supporting
// documentation, and that the name of the University not be used in
// advertising or publicity pertaining to distribution of the software
// without specific, written prior permission.
//
// UNIVERSITY OF COLORADO DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
// SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT SHALL THE UNIVERSITY
// OF COLORADO BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
// DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
// OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
//

ControlSocket(tcp, 9200);
ChatterSocket(tcp, 9201);

// nsclick-raw-dsr.click
//
// This is a simple and stupid flat routing mechanism.
// It broadcasts ARP requests if it wants to find a destination
// address, and it responds to ARP requests made for it.

elementclass MyDSRRouter {
$myaddr, $myaddr_ethernet |

class :: Classifier(12/0806 20/0001, 12/0806 20/0002, -);
myarpquerier :: ARPQuerier($myaddr,$myaddr_ethernet);
myarpresponder :: ARPResponder($myaddr $myaddr_ethernet);
// fake device
// th :: ToHost(tap2);
// fh :: FromHost(tap2, $myaddr/16, ETHER $myaddr_ethernet);

dsr_lt :: LinkTable(IP $myaddr);
rt_q_dsr :: Queue(10); //for DSR data packets
rt_q_data :: Queue(20); //for DSR routing packets
arp_q :: Queue(20); //for ARP packets


dsr_rt ::DSRRouteTable($myaddr, dsr_lt, OUTQUEUE rt_q_data, USE_BLACKLIST 1, DEBUG 0);

//wlinfo :: WirelessInfo(SSID raw, BSSID 01:01:01:01:01:01,CHANNEL 2)
ethout :: PrioSched
//-> WifiEncap(0x0, 00:00:00:00:00:00)
//-> WifiEncap(0x0, WIRELESS_INFO wlinfo)
// -> Print(out_mesh0)
//-> ExtraEncap()
-> ToDevice(mesh0);


// Packets sent out by the kernel get pushed into the ARP query module
kt::KernelTun($myaddr/16, DEVNAME tap2) // lol
// fh
// -> Print(frmkrn)
// -> fromhost_cl :: Classifier(12/0806, 12/0800)[1] // ARP reqs, IP
// -> Strip(14)
-> CheckIPHeader
// -> IPPrint(fromkernel)
-> GetIPAddress(16)
-> cl_broadcasts_to_iface1 :: IPClassifier(dst 255.255.255.255, -)[1]
-> [0]dsr_rt;

cl_broadcasts_to_iface1[0]
// -> IPPrint(Broadcast_To_Radio)
-> myarpquerier;

// Reply to ARP reqs the kernel sends to the fake device.
// fromhost_cl[0] -> ARPResponder(0.0.0.0/0 1:1:1:1:1:1) -> th;


//Packets from device go through classifiers
FromDevice(mesh0, SNIFFER false, PROMISC false)
//-> ExtraDecap()
//-> filtertx::FilterTX()
// -> Print(in_mesh0)
//-> WifiDecap()
-> HostEtherFilter($myaddr_ethernet,1)
// -> Print(to_class)
-> class;



//filtertx[1]->Print(Discard)->Discard;

//there is another option, feed it back to
//routing table entry [2]

// ARP queries from other nodes go to the ARP responder module
class[0] -> myarpresponder;

// ARP responses go to our query module
class[1] -> [1]myarpquerier;



// All other packets get checked to see if they're meant for us
class[2]
// -> Print(non_arp)
-> Strip(14)
-> CheckIPHeader
-> MarkIPHeader
-> GetIPAddress(16)
-> DecIPTTL // Flo: IP TTL == DSR TTL.
-> DSR_class1::Classifier(09/C8,-); //Ckeck for DSR packets


//ARP responder packets are queued in arp_q and has a higher
//priority in the queue
myarpresponder
// ->Print(arpresponse)
->arp_q;


//DSR routing packets should go to input 1 of the DSR router
DSR_class1[0]
// -> Print(dsr_class1)
-> StripDSRHeader
-> ipmpcl :: Classifier(9/A9, -) // IPMP, rest
// IPMP Out 0: forwarded IPMP packets
-> ipmpel :: IPMP(mesh0:ip)
-> dsr_unstrip::UnstripDSRHeader
-> [1]dsr_rt; // To DSR to be routed further
// IPMP Out 1: Received IPMP replies
ipmpel[1]
-> dsr_unstrip; // To DSR, which later feeds it to kernel
// IPMP Out 2: Replies from this machine
ipmpel[2]
-> [0]dsr_rt; // To DSR as a new IP packet
// IPMP Out 3: Discard
ipmpel[3]
-> Print("IPMP Discard") -> Discard;

ipmpcl[1]
// Non-IPMP Unicast IP traffic
-> dsr_unstrip;


//IP packets go to input 0 of the DSR router
DSR_class1[1]
-> DropBroadcasts
// -> Print(IPpacket)
-> [0]dsr_rt;

Idle -> [2]dsr_rt; //we do not care about this input


//IP packets go to the kernel
dsr_rt[0] -> CheckIPHeader
// -> IPPrint(fromrouter)
-> kt;
// -> EtherEncap(0x0800, 1:1:1:1:1:1, 2:2:2:2:2:2)
// -> th;

//DSR routing packets
dsr_rt[1] -> [0]myarpquerier;

//DSR data packets
dsr_rt[2] -> [0]myarpquerier;

// myarpquerier[0] -> DSR_class2::Classifier(09/C8,-);
myarpquerier[0] -> DSR_class2::Classifier(23/C8,-);
myarpquerier[1] -> arp_q;

DSR_class2[0] // -> Print(DSRtoQueue)
-> rt_q_dsr;

DSR_class2[1] // -> Print(IP)
-> rt_q_data;


arp_q -> [0]ethout;
rt_q_dsr ->[1]ethout;
rt_q_data ->[2]ethout;

}


//<IP address, interface address>
//AddressInfo(me_ip 192.168.32.1);
//AddressInfo(me_eth 00:0B:6B:84:B1:80);
//u :: MyDSRRouter(me_ip,me_eth);

u :: MyDSRRouter(mesh0:ip,mesh0:eth);

Loading