Beispiel #1
0
 internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
 {
     Priority = DnsMessageBase.ParseUShort(resultData, ref startPosition);
     Weight   = DnsMessageBase.ParseUShort(resultData, ref startPosition);
     Port     = DnsMessageBase.ParseUShort(resultData, ref startPosition);
     Target   = DnsMessageBase.ParseDomainName(resultData, ref startPosition);
 }
Beispiel #2
0
        internal override void ParseRecordData(byte[] resultData, int currentPosition, int length)
        {
            int startPosition = currentPosition;

            Precedence  = resultData[currentPosition++];
            GatewayType = (IpSecGatewayType)resultData[currentPosition++];
            Algorithm   = (IpSecAlgorithm)resultData[currentPosition++];
            switch (GatewayType)
            {
            case IpSecGatewayType.None:
                Gateway = String.Empty;
                break;

            case IpSecGatewayType.IpV4:
                Gateway = new IPAddress(DnsMessageBase.ParseByteData(resultData, ref currentPosition, 4)).ToString();
                break;

            case IpSecGatewayType.IpV6:
                Gateway = new IPAddress(DnsMessageBase.ParseByteData(resultData, ref currentPosition, 16)).ToString();
                break;

            case IpSecGatewayType.Domain:
                Gateway = DnsMessageBase.ParseDomainName(resultData, ref currentPosition);
                break;
            }
            PublicKey = DnsMessageBase.ParseByteData(resultData, ref currentPosition, length + startPosition - currentPosition);
        }
Beispiel #3
0
        internal override void ParseRecordData(byte[] resultData, int currentPosition, int length)
        {
            int endPosition = currentPosition + length;

            NextDomainName = DnsMessageBase.ParseDomainName(resultData, ref currentPosition);

            Types = ParseTypeBitMap(resultData, ref currentPosition, endPosition);
        }
Beispiel #4
0
 internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
 {
     Order       = DnsMessageBase.ParseUShort(resultData, ref startPosition);
     Preference  = DnsMessageBase.ParseUShort(resultData, ref startPosition);
     Flags       = DnsMessageBase.ParseText(resultData, ref startPosition);
     Services    = DnsMessageBase.ParseText(resultData, ref startPosition);
     RegExp      = DnsMessageBase.ParseText(resultData, ref startPosition);
     Replacement = DnsMessageBase.ParseDomainName(resultData, ref startPosition);
 }
Beispiel #5
0
        internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
        {
            MasterName      = DnsMessageBase.ParseDomainName(resultData, ref startPosition);
            ResponsibleName = DnsMessageBase.ParseDomainName(resultData, ref startPosition);

            SerialNumber       = DnsMessageBase.ParseUInt(resultData, ref startPosition);
            RefreshInterval    = DnsMessageBase.ParseInt(resultData, ref startPosition);
            RetryInterval      = DnsMessageBase.ParseInt(resultData, ref startPosition);
            ExpireInterval     = DnsMessageBase.ParseInt(resultData, ref startPosition);
            NegativeCachingTTL = DnsMessageBase.ParseInt(resultData, ref startPosition);
        }
Beispiel #6
0
        internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
        {
            Algorithm  = TSigAlgorithmHelper.GetAlgorithmByName(DnsMessageBase.ParseDomainName(resultData, ref startPosition));
            TimeSigned = ParseDateTime(resultData, ref startPosition);
            Fudge      = TimeSpan.FromSeconds(DnsMessageBase.ParseUShort(resultData, ref startPosition));
            int macSize = DnsMessageBase.ParseUShort(resultData, ref startPosition);

            Mac        = DnsMessageBase.ParseByteData(resultData, ref startPosition, macSize);
            OriginalID = DnsMessageBase.ParseUShort(resultData, ref startPosition);
            Error      = (ReturnCode)DnsMessageBase.ParseUShort(resultData, ref startPosition);
            int otherDataSize = DnsMessageBase.ParseUShort(resultData, ref startPosition);

            OtherData = DnsMessageBase.ParseByteData(resultData, ref startPosition, otherDataSize);
        }
Beispiel #7
0
        internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
        {
            int currentPosition = startPosition;

            TypeCovered         = (RecordType)DnsMessageBase.ParseUShort(resultData, ref currentPosition);
            Algorithm           = (DnsSecAlgorithm)resultData[currentPosition++];
            Labels              = resultData[currentPosition++];
            OriginalTimeToLive  = DnsMessageBase.ParseInt(resultData, ref currentPosition);
            SignatureExpiration = ParseDateTime(resultData, ref currentPosition);
            SignatureInception  = ParseDateTime(resultData, ref currentPosition);
            KeyTag              = DnsMessageBase.ParseUShort(resultData, ref currentPosition);
            SignersName         = DnsMessageBase.ParseDomainName(resultData, ref currentPosition);
            Signature           = DnsMessageBase.ParseByteData(resultData, ref currentPosition, length + startPosition - currentPosition);
        }
Beispiel #8
0
        internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
        {
            Algorithm  = TSigAlgorithmHelper.GetAlgorithmByName(DnsMessageBase.ParseDomainName(resultData, ref startPosition));
            Inception  = ParseDateTime(resultData, ref startPosition);
            Expiration = ParseDateTime(resultData, ref startPosition);
            Mode       = (TKeyMode)DnsMessageBase.ParseUShort(resultData, ref startPosition);
            Error      = (ReturnCode)DnsMessageBase.ParseUShort(resultData, ref startPosition);
            int keyLength = DnsMessageBase.ParseUShort(resultData, ref startPosition);

            Key = DnsMessageBase.ParseByteData(resultData, ref startPosition, keyLength);
            int otherDataLength = DnsMessageBase.ParseUShort(resultData, ref startPosition);

            OtherData = DnsMessageBase.ParseByteData(resultData, ref startPosition, otherDataLength);
        }
Beispiel #9
0
        internal override void ParseRecordData(byte[] resultData, int currentPosition, int length)
        {
            int endPosition = currentPosition + length;

            int hitLength = resultData[currentPosition++];

            Algorithm = (IpSecKeyRecord.IpSecAlgorithm)resultData[currentPosition++];
            int publicKeyLength = DnsMessageBase.ParseUShort(resultData, ref currentPosition);

            Hit               = DnsMessageBase.ParseByteData(resultData, ref currentPosition, hitLength);
            PublicKey         = DnsMessageBase.ParseByteData(resultData, ref currentPosition, publicKeyLength);
            RendezvousServers = new List <string>();
            while (currentPosition < endPosition)
            {
                RendezvousServers.Add(DnsMessageBase.ParseDomainName(resultData, ref currentPosition));
            }
        }
Beispiel #10
0
 internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
 {
     MailBox       = DnsMessageBase.ParseDomainName(resultData, ref startPosition);
     TxtDomainName = DnsMessageBase.ParseDomainName(resultData, ref startPosition);
 }
Beispiel #11
0
 internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
 {
     Preference = DnsMessageBase.ParseUShort(resultData, ref startPosition);
     Exchanger  = DnsMessageBase.ParseDomainName(resultData, ref startPosition);
 }
Beispiel #12
0
 internal override void ParseRecordData(byte[] resultData, int startPosition, int length)
 {
     SubType  = (AfsSubType)DnsMessageBase.ParseUShort(resultData, ref startPosition);
     Hostname = DnsMessageBase.ParseDomainName(resultData, ref startPosition);
 }