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.
*/
}
/**
- * @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 ];
}
* 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 | |
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;