Пример #1
0
        internal override IpV6FlowIdentificationSubOption CreateInstance(DataSegment data)
        {
            if (data.Length < OptionDataMinimumLength)
            {
                return(null);
            }

            IpV6FlowIdentificationTrafficSelectorFormat trafficSelectorFormat = (IpV6FlowIdentificationTrafficSelectorFormat)data[Offset.TrafficSelectorFormat];
            DataSegment trafficSelector = data.Subsegment(Offset.TrafficSelector, data.Length - Offset.TrafficSelector);

            return(new IpV6FlowIdentificationSubOptionTrafficSelector(trafficSelectorFormat, trafficSelector));
        }
 /// <summary>
 /// Creates an instance from traffic selector format and traffic selector.
 /// </summary>
 /// <param name="trafficSelectorFormat">Indicates the Traffic Selector Format.</param>
 /// <param name="trafficSelector">The traffic selector formatted according to TrafficSelectorFormat.</param>
 public IpV6FlowIdentificationSubOptionTrafficSelector(IpV6FlowIdentificationTrafficSelectorFormat trafficSelectorFormat, DataSegment trafficSelector)
     : base(IpV6FlowIdentificationSubOptionType.TrafficSelector)
 {
     TrafficSelectorFormat = trafficSelectorFormat;
     TrafficSelector = trafficSelector;
 }
Пример #3
0
 /// <summary>
 /// Creates an instance from traffic selector format and traffic selector.
 /// </summary>
 /// <param name="trafficSelectorFormat">Indicates the Traffic Selector Format.</param>
 /// <param name="trafficSelector">The traffic selector formatted according to TrafficSelectorFormat.</param>
 public IpV6FlowIdentificationSubOptionTrafficSelector(IpV6FlowIdentificationTrafficSelectorFormat trafficSelectorFormat, DataSegment trafficSelector)
     : base(IpV6FlowIdentificationSubOptionType.TrafficSelector)
 {
     TrafficSelectorFormat = trafficSelectorFormat;
     TrafficSelector       = trafficSelector;
 }