예제 #1
0
 /// <summary>
 /// Writes this RR in DNS wire format to the <paramref name="buffer"/>
 /// </summary>
 /// <param name="buffer">The buffer to which DNS wire data are written</param>
 protected override void SerializeRecordData(DnsBuffer buffer)
 {
     buffer.AddUshort((ushort)m_certType);
     buffer.AddUshort(m_keyTag);
     buffer.AddByte(m_algorithm);
     buffer.AddBytes(m_certData);
 }
예제 #2
0
        /// <summary>
        /// Writes this RR in DNS wire format to the <paramref name="buffer"/>
        /// </summary>
        /// <param name="buffer">The buffer to which DNS wire data are written</param>
        protected override void SerializeRecordData(DnsBuffer buffer)
        {
            foreach (string text in this.m_strings)
            {
                if (text.Length > byte.MaxValue)
                {
                    throw new DnsProtocolException(DnsProtocolError.StringTooLong);
                }

                buffer.AddByte((byte)text.Length);
                buffer.AddChars(text);
            }
        }
예제 #3
0
파일: TextRecord.cs 프로젝트: DM-TOR/nhin-d
 /// <summary>
 /// Writes this RR in DNS wire format to the <paramref name="buffer"/>
 /// </summary>
 /// <param name="buffer">The buffer to which DNS wire data are written</param>
 protected override void SerializeRecordData(DnsBuffer buffer)
 {
     foreach(string text in this.m_strings)
     {
         if (text.Length > byte.MaxValue)
         {
             throw new DnsProtocolException(DnsProtocolError.StringTooLong);
         }
         
         buffer.AddByte((byte) text.Length);
         buffer.AddChars(text);
     }
 }
예제 #4
0
파일: CertRecord.cs 프로젝트: DM-TOR/nhin-d
 /// <summary>
 /// Writes this RR in DNS wire format to the <paramref name="buffer"/>
 /// </summary>
 /// <param name="buffer">The buffer to which DNS wire data are written</param>
 protected override void SerializeRecordData(DnsBuffer buffer)
 {
     buffer.AddUshort((ushort) m_certType);
     buffer.AddUshort(m_keyTag);
     buffer.AddByte(m_algorithm);
     buffer.AddBytes(m_certData);
 }