Use C99 sized integer types to store ip/port
Use GNU TCP/UDP header definitions to have access to _GNU_SOURCE functions

The code currently assumes to have path names with limited length. This seems
to cause crashes and thus these static allocations will be replaced with
asprintf to avoid buffer overflows by str* functions. Unfortunately, the change
to _GNU_SOURCE also changes the definiton of the struct tcphdr and udphdr.
Use asprintf to dynamically allocate filenames/paths

The current routines to create filenames/paths use static created buffers. This
creates buffer overflows for longer names and causes avoidable crashes. Instead
asprintf can be used to dynamically allocate the buffers and always be on the
safe side regarding the buffer lengths.
Free hashtable on normal exits to make spotting memleaks easier