netaddrstr2.cpp revision 64eea8161bef2aa3c6516481383c830bca27abfe
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * IPRT - Network Address String Handling.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Copyright (C) 2013 Oracle Corporation
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * available from http://www.virtualbox.org. This file is free software;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * you can redistribute it and/or modify it under the terms of the GNU
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * General Public License (GPL) as published by the Free Software
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * The contents of this file may alternatively be used under the terms
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * of the Common Development and Distribution License Version 1.0
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * VirtualBox OSE distribution, in which case the provisions of the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * CDDL are applicable instead of those of the GPL.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * You may elect to license modified versions of this file under the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * terms and conditions of either the GPL or the CDDL or both.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/*******************************************************************************
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync* Header Files *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync*******************************************************************************/
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncRTDECL(int) RTNetStrToIPv4Addr(const char *pszAddr, PRTNETADDRIPV4 pAddr)
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int rc = RTStrToUInt8Ex(RTStrStripL(pszAddr), &pszNext, 10, &pAddr->au8[0]);
return VERR_INVALID_PARAMETER;
return VERR_INVALID_PARAMETER;
return VERR_INVALID_PARAMETER;
return VERR_INVALID_PARAMETER;
return VERR_INVALID_PARAMETER;
return VERR_INVALID_PARAMETER;
return VERR_INVALID_PARAMETER;
if (*pszNext)
return VERR_INVALID_PARAMETER;
return VINF_SUCCESS;