// $Id$
//
-// Copyright (C) 2007
-// Fraunhofer Institute for Open Communication Systems (FOKUS)
-// Competence Center NETwork research (NET), St. Augustin, GERMANY
+// Copyright (C) 2007
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
// Stefan Bund <g0dil@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
#include <boost/array.hpp>
#include <boost/operators.hpp>
#include "../../../Utils/safe_bool.hh"
+#include "../../../Utils/Tags.hh"
#include "INet4Address.hh"
+#include "../AddressExceptions.hh"
//#include "INet6Address.mpp"
#include "INet6Address.ih"
static INet6Address const AllNodes; ///< The 'all nodes' link-local multicast address
static INet6Address const AllRouters; ///< The 'all routers' link-local multicast address
- enum NoInit_t { noinit };
enum Resolve_t { ResolveINet6, ResolveINet4 };
/** \brief Possible scope values
///\name Structors and default members
///@{
- explicit INet6Address(NoInit_t); ///< Construct uninitialized (!) address
+ explicit INet6Address(senf::NoInit_t); ///< Construct uninitialized (!) address
INet6Address(boost::uint16_t a0=0u, boost::uint16_t a1=0u, boost::uint16_t a2=0u,
boost::uint16_t a3=0u, boost::uint16_t a4=0u, boost::uint16_t a5=0u,
boost::uint16_t a6=0u, boost::uint16_t a7=0u);
\attention This call may block if \a s represents a
hostname which must be looked up via some network
protocol like DNS or NIS
- \throws SyntaxException if the address cannot be
+ \throws AddressSyntaxException if the address cannot be
converted for some reason
\param[in] s Address literal or hostname
\param[in] resolve If this is set to \c ResolveINet4,
///@}
- /** \brief Base-class for INet6Address exceptions */
- struct AddressException : public std::exception {};
-
- /** \brief Invalid INet4 address syntax */
- struct SyntaxException : public AddressException
- { virtual char const * what() const throw()
- { return "invalid INet6 address syntax"; } };
-
- /** \brief Resolver failure */
- struct UnknownHostnameException : public AddressException
- { virtual char const * what() const throw()
- { return "failed to resolve INet6 hostname"; } };
};
/** \brief Output INet6Address instance as it's string representation