Organizing the member functions according to the IPv4 header description
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Wed, 2 Mar 2011 16:51:47 +0000 (17:51 +0100)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@intra2net.com>
Wed, 2 Mar 2011 16:51:47 +0000 (17:51 +0100)
src/ping/ipv4header.cpp
src/ping/ipv4header.h

index 67dace8..b7df6f8 100644 (file)
@@ -36,12 +36,12 @@ uint16_t Ipv4Header::get_identification() const
 
 bool Ipv4Header::dont_fragment() const
 {
-    return (Rep[ 6 ] & 0x40) != 0;
+    return ( ( Rep[ 6 ] & 0x40 ) != 0 );
 }
 
-bool Ipv4Header::have_more_fragments() const
+bool Ipv4Header::more_fragments() const
 {
-    return (Rep[ 6 ] & 0x20) != 0;
+    return ( ( Rep[ 6 ] & 0x20 ) != 0 );
 }
 
 uint16_t Ipv4Header::get_fragment_offset() const
index 67409f4..8132b6b 100644 (file)
@@ -51,11 +51,12 @@ public:
     uint16_t get_header_length() const;
     uint8_t get_type_of_service() const;
     uint16_t get_total_length() const;
-    uint16_t get_identification() const;
 
+    uint16_t get_identification() const;
     bool dont_fragment() const;
-    bool have_more_fragments() const;
+    bool more_fragments() const;
     uint16_t get_fragment_offset() const;
+
     uint8_t get_time_to_live() const;
     uint8_t get_protocol() const;
     uint16_t get_header_checksum() const;