From 64c7fec357a021b24c3cd810f44d6799382eeb6c Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Wed, 2 Mar 2011 17:51:47 +0100 Subject: [PATCH] Organizing the member functions according to the IPv4 header description --- src/ping/ipv4header.cpp | 6 +++--- src/ping/ipv4header.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ping/ipv4header.cpp b/src/ping/ipv4header.cpp index 67dace8..b7df6f8 100644 --- a/src/ping/ipv4header.cpp +++ b/src/ping/ipv4header.cpp @@ -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 diff --git a/src/ping/ipv4header.h b/src/ping/ipv4header.h index 67409f4..8132b6b 100644 --- a/src/ping/ipv4header.h +++ b/src/ping/ipv4header.h @@ -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; -- 1.7.1