Commit d58b8195 authored by Ricardo Fonseca's avatar Ricardo Fonseca
Browse files

Initial commit

parents
*/target
**/*.pyc
network-visualiser/catalina/logs
network-visualiser/catalina/webapps/visualiser
network-visualiser/catalina/work
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## varanus: _A set of applications for providing resilient communications in a Software-Defined Network_
#### Overview
TODO
#### Requisites
For all applications:
- 64-bit Linux-based operating system with a bash shell
For the sdncontroller and collector applications:
- Java (8 or higher) for building and running the applications
- Ant build tool for building the applications
- Libpcap for running the collector application
For the network-manager application:
- Mininet (v.2.2.2 or higher) for running the application
- Open vSwitch (v2.5 or higher) for managing software switches in the local machine
For the network-visualiser application:
- Tomcat (v8.5 or higher) for running the local server
- Java (8 or higher) for running the tomcat server and for building and running the xml-proxy
- Web browser with enabled JavaScript for interacting with the application
#### Demo instructions
Build all Java applications:
<big><pre>
$ cd &lt;repository directory&gt;
$ ant pack-all
</pre></big>
Open a terminal and launch the network manager:
<big><pre>
$ cd &lt;repository directory&gt;
$ ./demo/launch\_network.sh
</pre></big>
Open another terminal and launch the network visualiser:
<big><pre>
$ cd &lt;repository directory&gt;
$ ./demo/launch\_visualiser.sh
</pre></big>
Open a web browser and go to 'localhost:8080/visualiser' (default password is "password").
#### Contributors
Ricardo Fonseca
Eric Vial
Nuno Neves
Fernando Ramos
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="help" basedir="." name="varanus">
<include file="sdncontroller/build.xml" as="sdncontroller" />
<include file="collector/build.xml" as="collector" />
<include file="xml-proxy/build.xml" as="xmlproxy" />
<target name="help">
<echo>Specify one of these targets:
compile-sdncontroller : compiles the SDN Controller application
compile-collector : compiles the Collector application
compile-xmlproxy : compiles the XML Proxy application
compile-all : compiles all applications
pack-sdncontroller : compiles and packs the SDN Controller into a jar file
pack-collector : compiles and packs the Collector into a jar file
pack-xmlproxy : compiles and packs the XML Proxy into a jar file
pack-all : compiles and packs all applications
clean-sdncontroller : cleans SDN Controller built files and directories
clean-collector : cleans Collector built files and directories
clean-xmlproxy : cleans XML Proxy built files and directories
clean-all : cleans all applications
</echo>
</target>
<target name="compile-sdncontroller" depends="sdncontroller.compile" />
<target name="compile-collector" depends="collector.compile" />
<target name="compile-xmlproxy" depends="xmlproxy.compile" />
<target name="compile-all" depends="compile-sdncontroller,compile-collector,compile-xmlproxy" />
<target name="pack-sdncontroller" depends="sdncontroller.pack" />
<target name="pack-collector" depends="collector.pack" />
<target name="pack-xmlproxy" depends="xmlproxy.pack" />
<target name="pack-all" depends="pack-sdncontroller,pack-collector,pack-xmlproxy" />
<target name="clean-sdncontroller" depends="sdncontroller.clean" />
<target name="clean-collector" depends="collector.clean" />
<target name="clean-xmlproxy" depends="xmlproxy.clean" />
<target name="clean-all" depends="clean-sdncontroller,clean-collector,clean-xmlproxy" />
</project>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="pack" basedir="." name="varanus-collector">
<!--
When this file is included the basedir property is ignored, this hack is required to retrieve it.
-->
<dirname property="collector.basedir" file="${ant.file.varanus-collector}" />
<property name="collector.target" location="${collector.basedir}/target" />
<property name="collector.build" location="${collector.target}/bin" />
<property name="collector.src" location="${collector.basedir}/src/main/java" />
<property name="collector.lib" location="${collector.basedir}/lib" />
<property name="collector.jar" location="${collector.target}/varanus-collector.jar" />
<property name="collector.main_class" value="net.varanus.collector.Main" />
<property name="ant.build.javac.source" value="1.8" />
<property name="ant.build.javac.target" value="1.8" />
<include file="${collector.basedir}/../mirroring-protocol/build.xml" as="mirroring" />
<include file="${collector.basedir}/../utils/build.xml" as="utils" />
<include file="${collector.basedir}/../common-lib/build.xml" as="common" />
<patternset id="collector-lib">
<include name="jackson-annotations-2.4.4.jar" />
<include name="jnetpcap-1.4.r1425/jnetpcap.jar" />
<include name="logback-classic-1.0.0.jar" />
<include name="logback-core-1.0.0.jar" />
</patternset>
<path id="collector-classpath">
<fileset dir="${collector.lib}">
<patternset refid="collector-lib" />
</fileset>
<fileset dir="${common.lib}">
<patternset refid="utils-common-lib" />
</fileset>
<pathelement path="${mirroring.build}" />
<pathelement path="${utils.build}" />
</path>
<target name="init" depends="mirroring.init,utils.init">
<mkdir dir="${collector.build}" />
</target>
<target name="compile" depends="init,mirroring.compile,utils.compile">
<javac includeAntRuntime="false"
classpathref="collector-classpath"
debug="true"
srcdir="${collector.src}"
destdir="${collector.build}">
<compilerarg value="-Xlint" />
</javac>
</target>
<target name="clean" depends="mirroring.clean,utils.clean">
<delete dir="${collector.target}" />
</target>
<target name="pack" depends="compile">
<jar destfile="${collector.jar}" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="${collector.main_class}" />
<attribute name="Class-Path" value="." />
</manifest>
<fileset dir="${collector.build}" />
<fileset dir="${mirroring.build}" />
<fileset dir="${utils.build}" />
<zipgroupfileset dir="${collector.lib}" excludes="META-INF/*.SF">
<patternset refid="collector-lib" />
</zipgroupfileset>
<zipgroupfileset dir="${common.lib}" excludes="META-INF/*.SF">
<patternset refid="utils-common-lib" />
</zipgroupfileset>
</jar>
</target>
</project>
# { collector_id : { switch_id : interface } }
switchIfaceMapping={}
# hostname/IP:port
controllerAddress=127.0.0.1:32800
switchAliases={}
# if true, then BSN packets are discarded
ignoreBSNPackets=YES
switchIfaceMapping={"1" : {"0x100000001" : "c1-e1","0x100000002" : "c1-e2","0x100000003" : "c1-e3","0x100000004" : "c1-e4","0x100000005" : "c1-e5","0x100000006" : "c1-e6","0x100000007" : "c1-e7","0x100000008" : "c1-e8","0x100000009" : "c1-e9","0x10000000a" : "c1-e10","0x10000000b" : "c1-e11"}}
controllerAddress=127.0.0.1:32800
switchAliases={"0x100000001" : "Core1","0x100000002" : "A1","0x100000003" : "A2","0x100000004" : "A3","0x100000005" : "Core2","0x100000006" : "Core3","0x100000007" : "B1","0x100000008" : "B2","0x100000009" : "B3","0x10000000a" : "Core4","0x10000000b" : "Core5"}
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%date{yyyy-MM-dd HH:mm:ss.S} %-5level [%logger{15}] %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
<logger name="org" level="INFO"/>
<logger name="LogService" level="INFO"/> <!-- Restlet access logging -->
<logger name="net.varanus.collector" level="INFO"/>
<logger name="net.varanus.collector.internal.Collector-sampling" level="INFO"/>
<logger name="net.varanus.collector.internal.Collector-probing" level="INFO"/>
</configuration>
################################################################################
#
# Copyright (C) 2007-2010 Sly Technologies, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
################################################################################
jNetPcap Package
Change Log
== Release 1.3.b4 (2010-12-15) ==
* Fixes
- Memory swings - Object finalization is replaced with java Reference
cleanup. Memory is now managed through Reference and
ReferenceQueue mechanism.
- Various performance optimizations in JMemory and JBuffer class. Optimized
memory allocation path in JMemoryPool for certain object
types.
- Fixed boundary check in Checksum calculation with truncated jumbo
Ethernet frames.
- Fixed an issue when an JMemory based object tried to peer to itself.
- Fixed JMemory resize issue.
- Fixed Bug#3108615 - Ethernet FCS - FCS calculation and various Ethernet
header APIs that check for presence of FCS field, allow
verification, calculation and setting of new FCS value.
* Added
- Added a new management class named DisposableGC which runs in
a background system thread and schedules native memory
cleanup.
- Added several system properties (nio.mx, nio.ms, nio.blocksize) which
affect native memory allocation, limits and DisposableGC
behavior.
- PcapPacket.peerAndScan - convenience method peering header and buffer
to a PcapPacket object. Implements certain optimizations
to perform the task faster.
* Changes
- Changed the format of the debug output for
PcapPacket.State.toDebugString() method. The output produced
is more tabular with a table heading on top.
- Removed no longer used classes and directories from source such as
tests/beta1.5, JReference class, JMemory.references field
* Non-code changes
- Added complete MANIFEST to jnetpcap.jar file, which describes version
information of the jNetPcap library being used.
- Changed the native and java library files names to not include full
version information. The versioning is now fully accomplished
through the use of jnetpcap root distribution directory
instead. This allows easier switching between different
versions of jNetPcap.
- Updated file headers which reflects the proper copyright and license
agreement (LGPL v3)
- Updated all javadoc comments and tags for all classes
== Release 1.3.b3 (2010-10-01) ==
* Fixes
- Bug#3078703 - JMemory.transferTo(ByteBuffer) (array version)
- Bug#3078704 - Debug message coming from Tcp header when options are parsed
* Removed
- org.jnetpcap.package.dissect - left over and unusable package intended for
the native dissector feature which has been removed from 1.3
release
- SipHandler interface - left over from analyzer feature that has been
removed from 1.3 release
* Modifications/Updates
- org.jnetpcap.protocol.voip - updated javadocs, cleaned up warnings on all
the classes in this package
== Release 1.3.b2 (2010-09-26) ==
* Fixes
- Bug#3062026 - Scanner.reloadAll() in JPacket.scan()
- Bug#3062029 - Memory leak in native scanner reloadAll() tables
- Bug#3062031 - @Bind method with multiple same headers, gets wrong header
- Bug#3062035 - AnnotatedMethod doesn't open up method access perm
- Bug#3062037 - Checksum.pseudoUDP coredumps on invalid headers
- Bug#3062050 - Main scanner loop processes 0 length headers
- Bug#3062053 - @Deprecated JPacket.getScanner method
- Bug#3065968 - Missing sendPacket(JBuffer) implementation
- Bug#3066662 - UDP header missing setter methods
- Bug#3066959 - VLAN definition incorrectly assumes 802.1d as next header
- Bug#2353774 - Tcp header incomplete - missing tcp options
- Bug#3067088 - Ip4.Timestamp incorrectly initialized
- Bug#3067096 - JPacket.toString() exceptions consume all output in progress
- Bug#2933449 - SIP PRACK Message dosn't recognized
- Bug#3018072 - Wrong scanning Sdp headers in Linux
== Release 1.3 final (2010-08-24) ==
* No code changes (b1 code thoroughly tested and deployed for several months)
* Various build script changes
- Added x86_64 builds
== Release 1.3.b1 (2010-04-05) ==
* Fixes
- Bug#2981951 - Intermittent crashes in scanner
- Bug#2978441 - JRegistry.addBinding(JBinding) not working
- Bug#2890736 - reopened bug ConcurrentModificationException in JMemoryPool
- Bug#2906021 - Ethernet trailer end up in last header payload
- Bug#2908252 - JFormatter invalid state after exception during format output
- Bug#2908513 - exception thrown by Checksum for truncated or recursive ICMP
headers.
* Added
- Added testcase for Bug#2899902 ( buffer underflow on 64-bit systems)
== Release 1.3.a1 (2009-11-06) ==
* Fixes
- Bug#2890773 - PcapPacketHandler invalid PcapHeader peer
- Bug#2890736 - JMemoryPool concurrent mod exception
- Bug#2890094 - JPacket.toHexdump doesn't work on unintialized packets
- Bug#2878768 - JMemoryPacket(int) constructor doesn't work
- Bug#2857282 - Ip4.destination(byte[]) setter uses incorrect offset
- Bug#2897714 - invalid (char *) to (int) conversion in packet_protocol.cpp
* Added
- Feature#2848659 - Add frame counter reset on JScanner
== No Official 1.2 stable release ==
* Notes
- Release 1.2 branch was deprecated and replaced with stable 1.3 branch
== Release 1.2.rc5 (2009-3-18) ==
* Fixes
- #2688877 - reported that debian package is missing .so soft link to .so.rc4
main lib file. Will add that link in post-install to debian
package control file
- #2648427 - PcapDumper.dump() core-dumps. A patch is available upon request.
- #2557009 - LLC header problem
* Added