Extract IPv4 and IPv6 source addresses