BOOST_CHECK( addr );
BOOST_CHECK( ! INet4Address() );
BOOST_CHECK_THROW( INet4Address::from_string(""), AddressSyntaxException );
- BOOST_CHECK( INet4Address::from_string("www.6bone.net") != INet4Address::None );
+ BOOST_CHECK( INet4Address::from_string("www.go6.net") != INet4Address::None );
BOOST_CHECK_THROW( INet4Address::from_string("invalid.host.fhg.de"), UnknownHostnameException);
{
BOOST_CHECK_EQUAL( addr1[13], 14 );
BOOST_CHECK_EQUAL( addr1[14], 15 );
BOOST_CHECK_EQUAL( addr1[15], 0 );
- BOOST_CHECK( INet6Address::from_string("www.6bone.net") != INet6Address::None );
+ BOOST_CHECK( INet6Address::from_string("www.go6.net") != INet6Address::None );
INet6Address addr2;
BOOST_CHECK_EQUAL( senf::str(addr2), "::" );
addr2 = INet6Address::from_string("::1");
INet4Address wraps the standard sockaddr_in datatype. It provides simple accessor methods
to access the host and port. It does \e not integrate \c gethostbyname or DNS lookup.
-
+
\implementation This implementation is based on sockaddr_in, which is needed since it needs
to provide a non-const struct sockaddr * for legacy compatibility.
\throws UnknownHostnameException if the
address cannot be resolved. */
- INet4SocketAddress(INet4Address const & addr, unsigned port);
+ INet4SocketAddress(INet4Address const & addr, unsigned port);
///< Set address and port explicitly
/**< \param[in] addr IP address
\param[in] port port number */
Where \e address is an arbitrary numeric IPv6 address, \e zone-id is an optional network
interface name and \e port is the port number. So some example addresses are
-
+
\par ""
<tt>[2001:db8:1::1]:80</tt> \n
- <tt>www.6bone.net:80</tt> \n
+ <tt>www.go6.net:80</tt> \n
<tt>[fe80::1\%eth0]:443</tt>
\implementation The sockaddr_in6 structure has an sin6_flowinfo member. However RFC3493 does
///@{
INet6SocketAddress(); ///< Create empty instance
- explicit INet6SocketAddress(std::string const & addr,
+ explicit INet6SocketAddress(std::string const & addr,
INet6Address::Resolve_t resolve = INet6Address::ResolveINet6);
///< Initialize/convert from string representation
/**< \throws AddressSyntaxException if the address syntax is
//#include "INetAddressing.mpp"
#endif
-\f
+
// Local Variables:
// mode: c++
// fill-column: 100
BOOST_CHECK_EQUAL( addr.port(), 12345u );
BOOST_CHECK_EQUAL( addr.iface(), "" );
BOOST_CHECK_EQUAL( addr, INet6SocketAddress("[12::21]:12345") );
- SENF_CHECK_NO_THROW( INet6SocketAddress("www.6bone.net:80") );
+ SENF_CHECK_NO_THROW( INet6SocketAddress("www.go6.net:80") );
addr = INet6SocketAddress("1.2.3.4:12345", INet6Address::ResolveINet4);
BOOST_CHECK_EQUAL( addr.address(), INet6Address::from_string("::ffff:1.2.3.4") );
BOOST_CHECK_EQUAL( addr.port(), 12345u );
}
{
- BOOST_CHECK_THROW( INet6SocketAddress(INet6Address::Loopback, 1, "invalid_iface"),
+ BOOST_CHECK_THROW( INet6SocketAddress(INet6Address::Loopback, 1, "invalid_iface"),
AddressSyntaxException );
INet6SocketAddress addr (INet6Address::Loopback, 1, "lo");
BOOST_CHECK_EQUAL( addr, INet6SocketAddress("[::1%lo]:1") );