diff options
author | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-16 14:02:02 +0100 |
---|---|---|
committer | Daniel Langesten <daniel.langest@gmail.com> | 2015-03-16 14:02:02 +0100 |
commit | fdf5b53d008253c32c914d23b0886ffe155bb065 (patch) | |
tree | 2f4ada221ee85dc746daa2fb4b292251ea2a27c2 /datastructs.go | |
parent | 3caee15a2597feed739f48cc0cd3334b98233630 (diff) |
updated the processing to the new spec
Diffstat (limited to 'datastructs.go')
-rw-r--r-- | datastructs.go | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/datastructs.go b/datastructs.go index a4ac45c..b970cec 100644 --- a/datastructs.go +++ b/datastructs.go @@ -8,34 +8,34 @@ import ( type RawData struct { ipSrc string ipDst string + asSrc int + asDst int + portSrc int + portDst int + packets int + pktLenDist string time time.Time - port int - packetSize int -} - -func (rd *RawData) getVolSize(conf Config) (string, error) { - for _, volume := range conf.Volumes { - if volume.Lower <= rd.packetSize && - (rd.packetSize < volume.Upper || volume.Upper == 0) { - return volume.Size, nil - } - } - return "N/A", errors.New("Could not find a fitting size volume") } type CleanData struct { ipbSrc string ipbDst string - time time.Time - port int - volume string + asSrc int + asDst int + portSrc int + portDst int occurances int + volume string + time time.Time } func (cd *CleanData) equals(other *CleanData) bool { return cd.ipbSrc == other.ipbSrc && cd.ipbDst == other.ipbDst && - cd.time == other.time && - cd.port == other.port && - cd.volume == other.volume + cd.asSrc == other.asSrc && + cd.asDst == othr.asDst && + cd.portSrc == other.portSrc && + cd.portDst == other.portDst && + cd.volume == other.volume && + cd.time == other.time } |