From: Guilherme Maciel Ferreira Date: Sat, 12 Nov 2011 18:43:02 +0000 (-0200) Subject: Updated "Type of Service" field name to "Differentiated Services" X-Git-Tag: v1.2~21 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=0612cc8a7c35842620ecb967f9c4a608319b58b2;p=pingcheck Updated "Type of Service" field name to "Differentiated Services" --- diff --git a/src/ip/ipv4header.cpp b/src/ip/ipv4header.cpp index b34ce04..c243e61 100644 --- a/src/ip/ipv4header.cpp +++ b/src/ip/ipv4header.cpp @@ -27,11 +27,12 @@ Ipv4Header::Ipv4Header() : Payload( Ipv4HeaderSizeInBytes ) { } + /** * @brief Get the IP version. * * The Version field keeps track of which version of the protocol the - * datagram belongs to. + * packet belongs to. * * @return The 4-bits representing the Version field. */ @@ -59,13 +60,13 @@ uint16_t Ipv4Header::get_header_length() const } /** - * @brief Get the type of service. + * @brief Get the Differentiated Services, originally called Type of Service. * - * The Type of Service field is used to provide QoS. + * The Differentiated Services field is used to provide QoS. * - * @return The 8-bits representing the Type of Service. + * @return The 8-bits representing the Differentiated Services. */ -uint8_t Ipv4Header::get_type_of_service() const +uint8_t Ipv4Header::get_differentiated_services() const { return Payload[ 1 ]; } diff --git a/src/ip/ipv4header.h b/src/ip/ipv4header.h index 00ed0c6..aa9d9cc 100644 --- a/src/ip/ipv4header.h +++ b/src/ip/ipv4header.h @@ -26,8 +26,8 @@ * 0 3 4 7 8 15 16 31 * +-------+-------+---------------+------------------------------+ --- * | | | | | ^ - * |version|header | type of | total length in bytes | | - * | (4) | length| service | | | + * |version|header | differentiated| total length in bytes | | + * | (4) | length| services | | | * +-------+-------+---------------+-+-+-+------------------------+ | * | | | | | | | * | identification |0|D|M| fragment offset | | @@ -61,7 +61,7 @@ public: uint8_t get_version() const; uint16_t get_header_length() const; - uint8_t get_type_of_service() const; + uint8_t get_differentiated_services() const; uint16_t get_total_length() const; uint16_t get_identification() const;