<commit_before>/** 
 *  @file       netflow.hpp
 *  @brief      Network Traffic Capturing With Application Tags
 *  @details    Bachelor's Thesis, FIT VUT Brno
 *  @author     <NAME> (xzuzel00)
 *  Mail:       <EMAIL>
 *  Created:    26.02.2017 23:13
 *  Edited:     14.03.2017 15:12
 *  Version:    1.0.0
 *  g++:        Apple LLVM version 8.0.0 (clang-800.0.42.1)
 */

#pragma once

#include <string>           //  string
#include <netinet/in.h>     //  in_addr, in6_addr

enum class Directions { OUTBOUND, INBOUND };


class Netflow  // rozlisovat ipv4 a ipv6 (rozne velkosti adries)
{
    Directions dir;
    unsigned char ipVersion;
    void *srcIp = nullptr;
    void *dstIp = nullptr;
    unsigned short srcPort;
    unsigned short dstPort;
    unsigned char proto;
    const char *interface = nullptr;
    long startTime;
    long endTime;
public:
    Netflow(const char *intf) { interface = intf; }
    Netflow() {}
    Directions getDir()                         { return dir; }
    void setDir(Directions d)                   { dir = d; }
    unsigned char getIpVersion()                { return ipVersion; }
    void setIpVersion(unsigned char ipV)        { ipVersion = ipV; }
    //void *getSrcIp()                            { return srcIp;  }
    void setSrcIp(void *newIp)                  { srcIp = newIp; }
    //void *getDstIp()                            { return dstIp;  }
    void setDstIp(void *newIp)                  { dstIp = newIp; }
    unsigned short getSrcPort()                 { return srcPort;    }
    void setSrcPort(unsigned short newPort)     { srcPort = newPort; }
    unsigned short getDstPort()                 { return dstPort;    }
    void setDstPort(unsigned short newPort)     { dstPort = newPort; }
    unsigned char getProto()                    { return proto;    }
    void setProto(unsigned char newProto)       { proto = newProto; }
    //char *getInterface()                        { return interface; }
    void setInterface(char *newInt)             { interface = newInt; }
    //int getStartTime()                          { return startTime;    }
    void setStartTime(long newTime)             { startTime = newTime; }
    int getEndTime()                            { return endTime;    }
    void setEndTime(long newTime)               { endTime = newTime; }<commit_msg>IP get methods in Netflow uncommented<commit_after>/** 
 *  @file       netflow.hpp
 *  @brief      Network Traffic Capturing With Application Tags
 *  @details    Bachelor's Thesis, FIT VUT Brno
 *  @author     <NAME> (xzuzel00)
 *  Mail:       <EMAIL>
 *  Created:    26.02.2017 23:13
 *  Edited:     15.03.2017 03:17
 *  Version:    1.0.0
 *  g++:        Apple LLVM version 8.0.0 (clang-800.0.42.1)
 */

#pragma once

#include <string>           //  string
#include <netinet/in.h>     //  in_addr, in6_addr

enum class Directions { OUTBOUND, INBOUND };


class Netflow  // rozlisovat ipv4 a ipv6 (rozne velkosti adries)
{
    Directions dir;
    unsigned char ipVersion;
    void *srcIp = nullptr;
    void *dstIp = nullptr;
    unsigned short srcPort;
    unsigned short dstPort;
    unsigned char proto;
    const char *interface = nullptr;
    long startTime;
    long endTime;
public:
    Netflow(const char *intf) { interface = intf; }
    Netflow() {}
    Directions getDir()                         { return dir; }
    void setDir(Directions d)                   { dir = d; }
    unsigned char getIpVersion()                { return ipVersion; }
    void setIpVersion(unsigned char ipV)        { ipVersion = ipV; }
    void *getSrcIp()                            { return srcIp;  }
    void setSrcIp(void *newIp)                  { srcIp = newIp; }
    void *getDstIp()                            { return dstIp;  }
    void setDstIp(void *newIp)                  { dstIp = newIp; }
    unsigned short getSrcPort()                 { return srcPort;    }
    void setSrcPort(unsigned short newPort)     { srcPort = newPort; }
    unsigned short getDstPort()                 { return dstPort;    }
    void setDstPort(unsigned short newPort)     { dstPort = newPort; }
    unsigned char getProto()                    { return proto;    }
    void setProto(unsigned char newProto)       { proto = newProto; }
    //char *getInterface()                        { return interface; }
    void setInterface(char *newInt)             { interface = newInt; }
    //int getStartTime()                          { return startTime;    }
    void setStartTime(long newTime)             { startTime = newTime; }
    int getEndTime()                            { return endTime;    }
    void setEndTime(long newTime)               { endTime = newTime; }
{'fraction_non_alphanumeric': 0.09662248824283882, 'fraction_numerical': 0.01795639162035058, 'mean_word_length': 1.7426729191090269, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6669615', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1378, 'n_words': 387}