Moved parseipaddress function into the header file.