Updated "Type of Service" field name to "Differentiated Services"
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Sat, 12 Nov 2011 18:43:02 +0000 (16:43 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Sat, 12 Nov 2011 18:43:02 +0000 (16:43 -0200)
src/ip/ipv4header.cpp
src/ip/ipv4header.h

index b34ce04..c243e61 100644 (file)
@@ -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 ];
 }
index 00ed0c6..aa9d9cc 100644 (file)
@@ -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;