Use inet_ntop to format ip addresses
Store ip and port information in special struct

Keeping all function parameters free from types with a size makes it easier to
extend it later to other network layer protocols. This could for example allow
IPv6 support.