Ejemplo n.º 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;
 }
Ejemplo n.º 2
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;
 }
Ejemplo n.º 3
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));
 }
Ejemplo n.º 4
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));
 }
Ejemplo n.º 5
0
#pragma warning disable IDE0060 // 删除未使用的参数
        /// <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)
        {
#pragma warning restore IDE0060 // 删除未使用的参数
            //hdr.FlowLabel0 = (uint)(val >> 16);
            //hdr.FlowLabel1 = (ushort)val;
        }