/* * Class providing utilities functions. */ #ifndef UTILITIES_H #define UTILITIES_H #include #include #include #include #include #include #include #include #include typedef unsigned short u16; typedef unsigned long u32; using namespace Tins; std::string getIPv4Class(const std::string &ipAddress); void convertIPv4toArray(const std::string &IP, unsigned short IP_bytes[]); void split_str(const std::string& s, char delim,std::vector& v); u16 tcp_sum_calc(u16 len_tcp, u16 src_addr[],u16 dest_addr[], bool padding, u16 buff[]); bool check_tcpChecksum(const std::string &ipAddressSender, const std::string &ipAddressReceiver, TCP tcpPkt); template std::string integral_to_binary_string(T byte); #endif //UTILITIES_H