예제 #1
0
        internal override bool EqualsData(DnsOption other)
        {
            DnsOptionLongLivedQuery castedOther = (DnsOptionLongLivedQuery)other;

            return(Version.Equals(castedOther.Version) &&
                   OpCode.Equals(castedOther.OpCode) &&
                   ErrorCode.Equals(castedOther.ErrorCode) &&
                   Id.Equals(castedOther.Id) &&
                   LeaseLife.Equals(castedOther.LeaseLife));
        }
예제 #2
0
파일: DnsOption.cs 프로젝트: pedoc/Pcap.Net
        internal static DnsOption CreateInstance(DnsOptionCode code, DataSegment data)
        {
            switch (code)
            {
            case DnsOptionCode.LongLivedQuery:
                return(DnsOptionLongLivedQuery.Read(data));

            case DnsOptionCode.UpdateLease:
                return(DnsOptionUpdateLease.Read(data));

            case DnsOptionCode.ClientSubnet:
                return(DnsOptionClientSubnet.Read(data));

            case DnsOptionCode.NameServerIdentifier:
            default:
                return(new DnsOptionAnything(code, data));
            }
        }