Lines like
const char *Bittorrent = "BitTorrent protocol";
const char eight_byte[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
define theses global variables no matter if that codes is in header file or ine a .c directly (#include
is just textual insertion of the header's contents).
Instead you should have the definitions in exaclty one source file and change the header to provide an extern
declaration instead:
extern const char *Bittorrent;
extern const char *eight_byte;
Then all your sources using thes variables can be compiled but the linker will the variables once only.