/// <summary> /// Sets the flow label value. /// </summary> /// <param name="hdr"> /// The ipv6 header. /// </param> /// <param name="val"> /// The value. /// </param> public static void WINDIVERT_IPV6HDR_SET_FLOWLABEL(WINDIVERT_IPV6HDR hdr, uint val) { //hdr.FlowLabel0 = (uint)(val >> 16); //hdr.FlowLabel1 = (ushort)val; }
/// <summary> /// Gets the flow label value. /// </summary> /// <param name="hdr"> /// The ipv6 header. /// </param> /// <returns> /// The flow label value. /// </returns> public static uint WINDIVERT_IPV6HDR_GET_FLOWLABEL(WINDIVERT_IPV6HDR hdr) { return((uint)((hdr.FlowLabel0 << 16) | hdr.FlowLabel1)); }
/// <summary> /// Sets the traffic class value. /// </summary> /// <param name="hdr"> /// The ipv6 header. /// </param> /// <param name="val"> /// The value. /// </param> public static void WINDIVERT_IPV6HDR_SET_TRAFFICCLASS(WINDIVERT_IPV6HDR hdr, byte val) { hdr.TrafficClass0 = (byte)((val) >> 4); hdr.TrafficClass1 = val; }
/// <summary> /// Gets the traffic class value. /// </summary> /// <param name="hdr"> /// The ipv6 header. /// </param> /// <returns> /// The traffic class value. /// </returns> public static uint WINDIVERT_IPV6HDR_GET_TRAFFICCLASS(WINDIVERT_IPV6HDR hdr) { return((byte)((hdr.TrafficClass0 << 4) | (byte)hdr.TrafficClass1)); }