Begginings of IPv6 introduced

TODO:
1) terminate whole application on error, not just one thread
2) clean up ipv4 vs ipv6 implementations
3) add unit tests for functions
4) reorganize code
6) remove useless functions
7) move most of the program to main()