diff --git a/src/arp.cpp b/src/arp.cpp index ab58e43..6e01902 100644 --- a/src/arp.cpp +++ b/src/arp.cpp @@ -48,7 +48,7 @@ Tins::ARP::ARP(uint32_t target_ip, uint32_t sender_ip, const uint8_t *target_hw, Tins::ARP::ARP(const uint8_t *buffer, uint32_t total_sz) : PDU(0x0608) { if(total_sz < sizeof(arphdr)) - throw std::runtime_error("Not enought size for an ARP header in the buffer."); + throw std::runtime_error("Not enough size for an ARP header in the buffer."); memcpy(&_arp, buffer, sizeof(arphdr)); total_sz -= sizeof(arphdr); if(total_sz) diff --git a/src/bootp.cpp b/src/bootp.cpp index 0199e5f..9b5105f 100644 --- a/src/bootp.cpp +++ b/src/bootp.cpp @@ -13,7 +13,7 @@ Tins::BootP::BootP() : PDU(255), _vend_size(64) { Tins::BootP::BootP(const uint8_t *buffer, uint32_t total_sz, uint32_t vend_field_size) : PDU(255), _vend(0), _vend_size(vend_field_size) { if(total_sz < sizeof(bootphdr) + vend_field_size) - throw std::runtime_error("Not enought size for a BootP header in the buffer."); + throw std::runtime_error("Not enough size for a BootP header in the buffer."); std::memcpy(&_bootp, buffer, sizeof(bootphdr)); buffer += sizeof(bootphdr); total_sz -= sizeof(bootphdr); diff --git a/src/dhcp.cpp b/src/dhcp.cpp index d26d44c..47f2215 100644 --- a/src/dhcp.cpp +++ b/src/dhcp.cpp @@ -46,13 +46,13 @@ Tins::DHCP::DHCP(const uint8_t *buffer, uint32_t total_sz) : BootP(buffer, total args[i] = *(buffer++); total_sz--; if(!total_sz) - throw std::runtime_error("Not enought size for a DHCP header in the buffer."); + throw std::runtime_error("Not enough size for a DHCP header in the buffer."); } // If the END-OF-OPTIONS was not found... if(args[0] != END) { // Not enough size for this option if(total_sz < args[1]) - throw std::runtime_error("Not enought size for a DHCP header in the buffer."); + throw std::runtime_error("Not enough size for a DHCP header in the buffer."); add_option((Options)args[0], args[1], buffer); buffer += args[1]; total_sz -= args[1]; diff --git a/src/ethernetII.cpp b/src/ethernetII.cpp index 9a3f38e..7fa793c 100644 --- a/src/ethernetII.cpp +++ b/src/ethernetII.cpp @@ -58,7 +58,7 @@ Tins::EthernetII::EthernetII(uint32_t iface_index, const uint8_t* dst_hw_addr, c Tins::EthernetII::EthernetII(const uint8_t *buffer, uint32_t total_sz) : PDU(ETHERTYPE_IP) { if(total_sz < sizeof(ethhdr)) - throw std::runtime_error("Not enought size for an ethernetII header in the buffer."); + throw std::runtime_error("Not enough size for an ethernetII header in the buffer."); memcpy(&_eth, buffer, sizeof(ethhdr)); PDU *next = 0; switch(payload_type()) { diff --git a/src/icmp.cpp b/src/icmp.cpp index e3ca194..e7bc639 100644 --- a/src/icmp.cpp +++ b/src/icmp.cpp @@ -50,7 +50,7 @@ Tins::ICMP::ICMP(Flags flag) : PDU(IPPROTO_ICMP) { Tins::ICMP::ICMP(const uint8_t *buffer, uint32_t total_sz) : PDU(IPPROTO_ICMP) { if(total_sz < sizeof(icmphdr)) - throw std::runtime_error("Not enought size for an ICMP header in the buffer."); + throw std::runtime_error("Not enough size for an ICMP header in the buffer."); std::memcpy(&_icmp, buffer, sizeof(icmphdr)); total_sz -= sizeof(icmphdr); if(total_sz) diff --git a/src/ip.cpp b/src/ip.cpp index ab62951..1ba0834 100644 --- a/src/ip.cpp +++ b/src/ip.cpp @@ -48,7 +48,7 @@ Tins::IP::IP(const string &ip_dst, const string &ip_src, PDU *child) : PDU(IPPRO Tins::IP::IP(const uint8_t *buffer, uint32_t total_sz) : PDU(IPPROTO_IP) { if(total_sz < sizeof(iphdr)) - throw std::runtime_error("Not enought size for an IP header in the buffer."); + throw std::runtime_error("Not enough size for an IP header in the buffer."); std::memcpy(&_ip, buffer, sizeof(iphdr)); /* Options... */ diff --git a/src/tcp.cpp b/src/tcp.cpp index 5f662e0..60560ad 100644 --- a/src/tcp.cpp +++ b/src/tcp.cpp @@ -44,7 +44,7 @@ Tins::TCP::TCP(uint16_t dport, uint16_t sport) : PDU(IPPROTO_TCP), _options_size Tins::TCP::TCP(const uint8_t *buffer, uint32_t total_sz) : PDU(IPPROTO_TCP) { if(total_sz < sizeof(tcphdr)) - throw std::runtime_error("Not enought size for an TCP header in the buffer."); + throw std::runtime_error("Not enough size for an TCP header in the buffer."); std::memcpy(&_tcp, buffer, sizeof(tcphdr)); buffer += sizeof(tcphdr); diff --git a/src/udp.cpp b/src/udp.cpp index ca0250c..a274c91 100644 --- a/src/udp.cpp +++ b/src/udp.cpp @@ -39,7 +39,7 @@ Tins::UDP::UDP(uint16_t dport, uint16_t sport, PDU *child) : PDU(IPPROTO_UDP, ch Tins::UDP::UDP(const uint8_t *buffer, uint32_t total_sz) : PDU(IPPROTO_UDP) { if(total_sz < sizeof(udphdr)) - throw std::runtime_error("Not enought size for an UDP header in the buffer."); + throw std::runtime_error("Not enough size for an UDP header in the buffer."); std::memcpy(&_udp, buffer, sizeof(udphdr)); total_sz -= sizeof(udphdr); if(total_sz)