add raw integer query for ipv4::ip octets

This commit is contained in:
Danny Robson 2011-06-25 11:52:20 +10:00
parent 5a9d7c70c0
commit 523e4c1ab5

3
ip.hpp
View File

@ -26,7 +26,10 @@
namespace ipv4 { namespace ipv4 {
struct ip { struct ip {
union {
uint8_t m_octets[4]; uint8_t m_octets[4];
uint32_t m_integer;
};
ip (uint8_t a, uint8_t b, uint8_t c, uint8_t d); ip (uint8_t a, uint8_t b, uint8_t c, uint8_t d);