diff options
author | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-04 11:28:42 +0100 |
---|---|---|
committer | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-04 11:28:42 +0100 |
commit | cfed33452eae200977ce15559cd9e36a1c486c21 (patch) | |
tree | a9093e45bdf19c90f285ae8cb2a784997cab0409 /datastructs.go | |
parent | bc937cdea6ad79c08b2237f87b078cff7dc888c3 (diff) |
added function and refactored the code
Diffstat (limited to 'datastructs.go')
-rw-r--r-- | datastructs.go | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/datastructs.go b/datastructs.go new file mode 100644 index 0000000..c885dea --- /dev/null +++ b/datastructs.go @@ -0,0 +1,29 @@ +package main + +type RawData struct { + ipDst string + time time.Time + port int + packetSize int +} + +func (rd *RawData) getVolSize() string { + return "medium" +} + +type CleanData struct { + ipbSrc string + ipbDst string + time time.Time + port int + volume string + occurances int +} + +func (cd *CleanData) equals(other *CleanData) bool { + return cd.ipdbSrc == other.ipbSrc && + cd.ipbDst == other.ipbDst && + cd.time == other.time && + cd.port == other.port && + cd.volume == other.volume +} |