Beispiel #1
0
 /// <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;
 }
Beispiel #2
0
 /// <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));
 }
Beispiel #3
0
 /// <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;
 }
Beispiel #4
0
 /// <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));
 }