コード例 #1
0
ファイル: NaptrRecord.cs プロジェクト: dumpvn/minimvc
 public NaptrRecord(DataBuffer buffer)
 {
     _order       = buffer.ReadShortUInt();
     _priority    = buffer.ReadShortUInt();
     _flags       = buffer.ReadCharString();
     _services    = buffer.ReadCharString();
     _regexp      = buffer.ReadCharString();
     _replacement = buffer.ReadCharString();
 }
コード例 #2
0
ファイル: NaptrRecord.cs プロジェクト: yslib/minimvc
 public NaptrRecord(DataBuffer buffer)
 {
     _order = buffer.ReadShortUInt();
     _priority = buffer.ReadShortUInt();
     _flags = buffer.ReadCharString();
     _services = buffer.ReadCharString();
     _regexp = buffer.ReadCharString();
     _replacement = buffer.ReadCharString();
 }
コード例 #3
0
        public TextOnly(DataBuffer buffer, int length)
        {
            int len = length;
            int pos = buffer.Position;

            _text = new List <string>();
            byte next = buffer.Next;

            while (length > 0)
            {
                _text.Add(buffer.ReadCharString());
                length -= next + 1;
                if (length < 0)
                {
                    buffer.Position = pos - len;  //Reset current Pointer of Buffer to end of this record
                    throw new DnsQueryException("Buffer Over Run in TextOnly Record Data Type", null);
                }
                next = buffer.Next;
            }
            if (length > 0)
            {
                buffer.Position = pos - len;  //Reset current Pointer of Buffer to end of this record
                throw new DnsQueryException("Buffer Under Run in TextOnly Record Data Type", null);
            }
        }
コード例 #4
0
 public TextOnly(DataBuffer buffer)
 {
     _text = new List <string>();
     while (buffer.Next > 0)
     {
         _text.Add(buffer.ReadCharString());
     }
 }
コード例 #5
0
ファイル: TextOnly.cs プロジェクト: yslib/minimvc
 public TextOnly(DataBuffer buffer, int length)
 {
     int len = length;
     int pos = buffer.Position;
     _text = new List<string>();
     byte next = buffer.Next;
     while (length > 0)
     {
         _text.Add(buffer.ReadCharString());
         length -= next + 1;
         if (length < 0)
         {
             buffer.Position = pos - len;  //Reset current Pointer of Buffer to end of this record
             throw new DnsQueryException("Buffer Over Run in TextOnly Record Data Type", null);
         }
         next = buffer.Next;
     }
     if (length > 0)
     {
         buffer.Position = pos - len;  //Reset current Pointer of Buffer to end of this record
         throw new DnsQueryException("Buffer Under Run in TextOnly Record Data Type", null);
     }
 }
コード例 #6
0
ファイル: IsdnRecord.cs プロジェクト: yslib/minimvc
 public IsdnRecord(DataBuffer buffer)
 {
     _isdnAddress = buffer.ReadCharString();
     _subAddress = buffer.ReadCharString();
 }
コード例 #7
0
ファイル: IsdnRecord.cs プロジェクト: dumpvn/minimvc
 public IsdnRecord(DataBuffer buffer)
 {
     _isdnAddress = buffer.ReadCharString();
     _subAddress  = buffer.ReadCharString();
 }
コード例 #8
0
ファイル: TextOnly.cs プロジェクト: yslib/minimvc
 public TextOnly(DataBuffer buffer)
 {
     _text = new List<string>();
     while(buffer.Next > 0)
         _text.Add(buffer.ReadCharString());
 }