Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 294860a

Browse files
Renamed flow feature fields in FlowFeature.java
0 parents commit 294860a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4325
-0
lines changed

‎Ubuntu_VM/CIC-Flowmeter/.gitignore‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Ignore build artifacts
2+
build/
3+
*.o
4+
*.class
5+
6+
# Ignore logs and temporary files
7+
logs/
8+
*.log
9+
*.tmp
10+
11+
# Ignore data files (CSV, etc.)
12+
data/
13+
14+
# Ignore jnetpcap library
15+
jnetpcap/
16+
17+
# Ignore Gradle files
18+
.gradle/
19+
20+
21+
# Ignore Maven files if not needed
22+
pom.xml
23+
24+
# Ignore misc files
25+
ReadMe.txt
26+
LICENSE.txt
27+
28+
29+
.vscode/
30+

‎Ubuntu_VM/CIC-Flowmeter/README.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Install jnetpcap local repo
2+
3+
for linux, sudo is a prerequisite
4+
```
5+
//linux :at the pathtoproject/jnetpcap/linux/jnetpcap-1.4.r1425
6+
//windows: at the pathtoproject/jnetpcap/win/jnetpcap-1.4.r1425
7+
mvn install:install-file -Dfile=jnetpcap.jar -DgroupId=org.jnetpcap -DartifactId=jnetpcap -Dversion=1.4.1 -Dpackaging=jar
8+
```
9+
10+
## Run
11+
### IntelliJ IDEA
12+
open a Terminal in the IDE
13+
```
14+
//linux:
15+
$ sudo bash
16+
$ ./gradlew execute
17+
18+
//windows:
19+
$ gradlew execute
20+
```
21+
### Eclipse
22+
23+
Run eclipse with sudo
24+
```
25+
1. Right click App.java -> Run As -> Run Configurations -> Arguments -> VM arguments:
26+
-Djava.library.path="pathtoproject/jnetpcap/linux/jnetpcap-1.4.r1425" -> Run
27+
28+
2. Right click App.java -> Run As -> Java Application
29+
30+
```
31+
32+
## Make package
33+
34+
### IntelliJ IDEA
35+
open a Terminal in the IDE
36+
```
37+
//linux:
38+
$ ./gradlew distZip
39+
//window
40+
$ gradlew distZip
41+
```
42+
the zip file will be in the pathtoproject/CICFlowMeter/build/distributions
43+
44+
### Eclipse
45+
At the project root
46+
```
47+
mvn package
48+
```
49+
the jar file will be in the pathtoproject/CICFlowMeter/target

‎Ubuntu_VM/CIC-Flowmeter/build.gradle‎

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
apply plugin: 'java'
2+
apply plugin: 'maven'
3+
apply plugin: 'application'
4+
5+
group = 'cic.unb.ca'
6+
version = '4.0'
7+
description = """CICFlowMeterV4"""
8+
9+
sourceCompatibility = 1.8
10+
targetCompatibility = 1.8
11+
12+
repositories {
13+
mavenLocal()
14+
mavenCentral()
15+
maven { url "https://clojars.org/repo" }
16+
}
17+
dependencies {
18+
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.11.0'
19+
compile group: 'org.slf4j', name: 'slf4j-log4j12', version:'1.7.25'
20+
compile group: 'org.jnetpcap', name: 'jnetpcap', version:'1.4.1'
21+
compile group: 'junit', name: 'junit', version:'4.12'
22+
compile group: 'org.apache.commons', name: 'commons-lang3', version:'3.6'
23+
compile group: 'org.apache.commons', name: 'commons-math3', version:'3.5'
24+
compile group: 'commons-io', name: 'commons-io', version:'2.5'
25+
compile group: 'nz.ac.waikato.cms.weka', name: 'weka-stable', version:'3.6.14'
26+
// https://mvnrepository.com/artifact/org.jfree/jfreechart
27+
compile group: 'org.jfree', name: 'jfreechart', version: '1.5.0'
28+
// https://mvnrepository.com/artifact/com.google.guava/guava
29+
compile group: 'com.google.guava', name: 'guava', version: '23.6-jre'
30+
// https://mvnrepository.com/artifact/org.apache.tika/tika-core
31+
compile group: 'org.apache.tika', name: 'tika-core', version: '1.17'
32+
33+
}
34+
sourceSets {
35+
main {
36+
java {
37+
srcDir 'src'
38+
exclude '**/CICFlowMeter.java'
39+
}
40+
}
41+
}
42+
43+
task zipSrc(type: Zip){
44+
baseName "${applicationName}-Source"
45+
destinationDir = file('build/')
46+
from('.'){
47+
include '**/'
48+
exclude '.gradle/','build/','bin/','logs/','*.iml','*.ipr','*.iws','.idea/','out/','data/'
49+
into "${applicationName}V${version}-Src"
50+
}
51+
}
52+
53+
import org.apache.tools.ant.DirectoryScanner
54+
task zipPro(type: Zip){
55+
56+
doFirst {
57+
DirectoryScanner.defaultExcludes.each { DirectoryScanner.removeDefaultExclude it }
58+
//DirectoryScanner.addDefaultExclude 'something has to be in here or everything gets excluded'
59+
}
60+
61+
doLast {
62+
DirectoryScanner.resetDefaultExcludes()
63+
}
64+
65+
baseName "${applicationName}-Full"
66+
destinationDir = file('build/')
67+
68+
from('.'){
69+
include '**/'
70+
exclude '.gradle/','build/','bin/','logs/','*.iml','*.ipr','*.iws','.idea/','out/','data/',".git/"
71+
into "${applicationName}V${version}"
72+
}
73+
}
74+
75+
76+
task fatJar(type: Jar) {
77+
println 'type Jar'
78+
79+
manifest {
80+
81+
attributes 'Premain-Class': 'swing.common.ObjectSizeFetcher'
82+
attributes 'Can-Retransform-Classes': true
83+
attributes 'Implementation-Title': 'Gradle Jar File Example',
84+
'Implementation-Version': version,
85+
'Main-Class': 'cic.cs.unb.ca.ifm.App'
86+
87+
}
88+
/*baseName = "NetWorkTraffic" + '-all'
89+
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
90+
into(new File('build/jar/'))
91+
with jar*/
92+
}
93+
94+
95+
task execute(type: JavaExec) {
96+
println 'type JavaExec'
97+
98+
99+
main = "cic.cs.unb.ca.ifm.App" //main class
100+
classpath = sourceSets.main.runtimeClasspath
101+
String osName = System.getProperty('os.name').toLowerCase()
102+
if(osName.contains('windows')){
103+
jvmArgs '-Djava.library.path=jnetpcap/win/jnetpcap-1.4.r1425'
104+
}else{
105+
jvmArgs '-Djava.library.path=jnetpcap/linux/jnetpcap-1.4.r1425'
106+
}
107+
}
108+
109+
110+
task exeCMD(type: JavaExec){
111+
main = "cic.cs.unb.ca.ifm.Cmd" //main class
112+
classpath = sourceSets.main.runtimeClasspath
113+
String osName = System.getProperty('os.name').toLowerCase()
114+
if(osName.contains('windows')){
115+
jvmArgs '-Djava.library.path=jnetpcap/win/jnetpcap-1.4.r1425'
116+
}else{
117+
jvmArgs '-Djava.library.path=jnetpcap/linux/jnetpcap-1.4.r1425'
118+
}
119+
//args = ["/home/yzhang29/0a/Capture/", "/home/yzhang29/0a/Capture/out/"]
120+
}
121+
122+
123+
task cmdScript(type: CreateStartScripts) {
124+
mainClassName = "cic.cs.unb.ca.ifm.Cmd"
125+
applicationName = "cfm"
126+
outputDir = new File(project.buildDir, 'scripts')
127+
classpath = jar.outputs.files + project.configurations.runtime
128+
defaultJvmOpts = ["-Djava.library.path=../lib/native"]
129+
}
130+
131+
applicationDistribution.into("bin") {
132+
from(cmdScript)
133+
fileMode = 0755
134+
}
135+
136+
137+
// The Application Plugin
138+
mainClassName = "cic.cs.unb.ca.ifm.App"
139+
applicationName = "CICFlowMeter"
140+
applicationDefaultJvmArgs = ["-Djava.library.path=../lib/native"]
141+
142+
applicationDistribution.from("jnetpcap/linux/jnetpcap-1.4.r1425") {
143+
include "*.so"
144+
into('lib/native')
145+
}
146+
applicationDistribution.from("jnetpcap/win/jnetpcap-1.4.r1425") {
147+
include "*.dll"
148+
into('lib/native')
149+
}
150+
applicationDistribution.from('LICENSE.txt'){
151+
into('')
152+
}
153+
applicationDistribution.from('ReadMe.txt'){
154+
into('')
155+
rename("ReadMe.txt","README.md")
156+
}
53.4 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Fri May 25 10:05:01 ADT 2018
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-all.zip

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /