1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 20:24:26 +01:00

PacketSender now throws on error. Fixed the documentation on several header files.

This commit is contained in:
Matias Fontanini
2012-10-19 12:01:34 -03:00
parent 15b58b4f37
commit abaa2bf926
20 changed files with 251 additions and 176 deletions

View File

@@ -104,7 +104,7 @@ uint32_t EthernetII::header_size() const {
}
#ifndef WIN32
bool EthernetII::send(PacketSender &sender) {
void EthernetII::send(PacketSender &sender) {
if(!_iface)
throw std::runtime_error("Interface has not been set");
struct sockaddr_ll addr;
@@ -117,7 +117,7 @@ bool EthernetII::send(PacketSender &sender) {
addr.sll_ifindex = _iface.id();
memcpy(&(addr.sll_addr), _eth.dst_mac, address_type::address_size);
return sender.send_l2(*this, (struct sockaddr*)&addr, (uint32_t)sizeof(addr));
sender.send_l2(*this, (struct sockaddr*)&addr, (uint32_t)sizeof(addr));
}
#endif // WIN32