modified length parameter, use inet_aton