INLINE_OPTS_NORMAL = [ '-finline-limit=5000' ],
INLINE_OPTS = [ '$INLINE_OPTS_NORMAL' ],
CXXFLAGS = [ '-Wall', '-Woverloaded-virtual', '-Wno-long-long', '$INLINE_OPTS',
- '$CXXFLAGS_' ],
+ '-pipe', '$CXXFLAGS_' ],
CXXFLAGS_ = senfutil.BuildTypeOptions('CXXFLAGS'),
CXXFLAGS_final = [ '-O3' ],
CXXFLAGS_normal = [ '-O0', '-g' ],
return senf::INet4Address::from_inaddr(ina.s_addr);
if (s.empty())
- throw AddressSyntaxException();
+ throw AddressSyntaxException() << ": empty string";
int herr (0);
{
std::string::size_type i (s.find('/'));
if (i == std::string::npos)
- throw AddressSyntaxException();
+ throw AddressSyntaxException(s);
try {
prefix_len_ = boost::lexical_cast<unsigned>(std::string(s,i+1));
} catch (boost::bad_lexical_cast const &) {
- throw AddressSyntaxException();
+ throw AddressSyntaxException(s);
}
address_ = INet4Address(INet4Address::from_string(std::string(s, 0, i)).address() & mask());
}
return senf::INet6Address::from_data(&ina.s6_addr[0]);
if (s.empty())
- throw AddressSyntaxException();
+ throw AddressSyntaxException() << ": empty string";
int herr (0);
using boost::lambda::_2;
std::string::size_type i (s.find('/'));
if (i == std::string::npos)
- throw AddressSyntaxException();
+ throw AddressSyntaxException(s);
try {
prefix_len_ = boost::lexical_cast<unsigned>(std::string(s,i+1));
} catch (boost::bad_lexical_cast const &) {
- throw AddressSyntaxException();
+ throw AddressSyntaxException(s);
}
address_ = INet6Address::from_string(std::string(s, 0, i));
detail::apply_mask(prefix_len_, address_.begin(), address_.end(), _1 &= _2);
? addr : std::string(addr,portIx+1)) );
}
catch (boost::bad_lexical_cast const &) {
- throw AddressSyntaxException() << "invalid port number";
+ throw AddressSyntaxException(addr) << ": invalid port number";
}
if (portIx != std::string::npos)
address( INet4Address::from_string(std::string(addr,0,portIx)) );
boost::smatch match;
if (! regex_match(addr, match, addressRx))
- throw AddressSyntaxException();
+ throw AddressSyntaxException(addr);
if (match[ZoneId].matched)
assignIface(match[ZoneId]);
else {
sockaddr_.sin6_scope_id = if_nametoindex(iface.c_str());
if (sockaddr_.sin6_scope_id == 0)
- throw AddressSyntaxException();
+ throw AddressSyntaxException(iface);
}
}
prefix_ senf::MACAddress senf::MACAddress::from_eui64(senf::EUI64 const & eui)
{
if (eui[3] != 0xffu || eui[4] != 0xfeu)
- throw AddressSyntaxException();
+ throw AddressSyntaxException() << "EUI64 is not MAC compatible: " << eui;
MACAddress mac (senf::noinit);
mac[0] = eui[0];
mac[1] = eui[1];
std::string(boost::begin(*i),boost::end(*i))));
}
catch (std::bad_cast &) {
- throw AddressSyntaxException();
+ throw AddressSyntaxException(value);
}
if (i!=i_end || f!=l)
- throw AddressSyntaxException();
+ throw AddressSyntaxException(value);
}
///////////////////////////////ct.e////////////////////////////////////////