dhcp ip: DSCP settings for transmitted DHCP packets
Type: feature
- Define the ip_dscp_t and use in the IP headers
- Add DSCP setting to the DHCP client for use with packet TX
Change-Id: If220dde0017ea78793747d65f53e11daf23a28fa
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h
index c8bc4c8..c1bd2aa 100644
--- a/src/vnet/ip/ip6_packet.h
+++ b/src/vnet/ip/ip6_packet.h
@@ -383,13 +383,13 @@
ip6_address_t src_address, dst_address;
} ip6_header_t;
-always_inline u8
+always_inline ip_dscp_t
ip6_traffic_class (const ip6_header_t * i)
{
return (i->ip_version_traffic_class_and_flow_label & 0x0FF00000) >> 20;
}
-static_always_inline u8
+static_always_inline ip_dscp_t
ip6_traffic_class_network_order (const ip6_header_t * ip6)
{
return (clib_net_to_host_u32 (ip6->ip_version_traffic_class_and_flow_label)
@@ -397,7 +397,7 @@
}
static_always_inline void
-ip6_set_traffic_class_network_order (ip6_header_t * ip6, u8 dscp)
+ip6_set_traffic_class_network_order (ip6_header_t * ip6, ip_dscp_t dscp)
{
u32 tmp =
clib_net_to_host_u32 (ip6->ip_version_traffic_class_and_flow_label);