File diff r23482:de566f8c088d → r23483:3733e6b8ff17
src/network/core/address.cpp
Show inline comments
 
@@ -2,26 +2,24 @@
 

	
 
/*
 
 * This file is part of OpenTTD.
 
 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
 
 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @file core/address.cpp Implementation of the address. */
 

	
 
#include "../../stdafx.h"
 

	
 
#ifdef ENABLE_NETWORK
 

	
 
#include "address.h"
 
#include "../../debug.h"
 

	
 
#include "../../safeguards.h"
 

	
 
/**
 
 * Get the hostname; in case it wasn't given the
 
 * IPv4 dotted representation is given.
 
 * @return the hostname
 
 */
 
const char *NetworkAddress::GetHostname()
 
{
 
@@ -424,14 +422,12 @@ void NetworkAddress::Listen(int socktype
 
 * @return the string representation
 
 * @note only works for AF_INET, AF_INET6 and AF_UNSPEC
 
 */
 
/* static */ const char *NetworkAddress::AddressFamilyAsString(int family)
 
{
 
	switch (family) {
 
		case AF_UNSPEC: return "either IPv4 or IPv6";
 
		case AF_INET:   return "IPv4";
 
		case AF_INET6:  return "IPv6";
 
		default:        return "unsupported";
 
	}
 
}
 

	
 
#endif /* ENABLE_NETWORK */