ComHostUtils.cpp revision cc28a0490da37269088ec0710c3fbbd3d928fbdd
/* $Id$ */
/** @file
*/
/*
* Copyright (C) 2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#ifdef RT_OS_WINDOWS
# define VBOX_COM_OUTOFPROC_MODULE
#endif
#include <iprt/buildconfig.h>
#include <iprt/initterm.h>
#include "../NetLib/VBoxNetLib.h"
#include "../NetLib/shared_ptr.h"
#include <vector>
#include <list>
#include <string>
#include <map>
#include "../NetLib/VBoxNetBaseService.h"
#ifdef RT_OS_WINDOWS /* WinMain */
# include <Windows.h>
# include <stdlib.h>
# ifdef INET_ADDRSTRLEN
/* On Windows INET_ADDRSTRLEN defined as 22 Ws2ipdef.h, because it include port number */
# endif
# define INET_ADDRSTRLEN 16
#else
#endif
#include "utils.h"
{
{
{
char szAddr[17];
char *pszTerm;
if ( pszTerm
{
if (RT_SUCCESS(rc))
{
if (u32Off != 0)
}
}
}
}
else
return VERR_NOT_FOUND;
return VINF_SUCCESS;
}
/**
* @note: const dropped here, because of map<K,V>::operator[] which isn't const, map<K,V>::at() has const
* variant but it's C++11.
*/
{
{
int rc;
{
if (RT_SUCCESS(rc))
{
{
/* XXX: here we want map<K,V>::at(const K& k) const */
{
}
else
continue; /* XXX: Warning here (local mapping wasn't registered) */
}
}
}
}
else
return VERR_NOT_FOUND;
return VINF_SUCCESS;
}
{
{
{
}
}
else
return VERR_NOT_FOUND;
return VINF_SUCCESS;
}
{
{
return VINF_SUCCESS;
}
return VERR_NOT_FOUND;
}
{
return VINF_SUCCESS;
}