예제 #1
0
        /// <summary>
        /// Descriptive text
        /// </summary>
        /// <param name="Name">Name</param>
        /// <param name="Type">Resource Record Type</param>
        /// <param name="Class">Resource Record Class</param>
        /// <param name="Ttl">Time to live</param>
        /// <param name="Data">RR-specific binary data.</param>
        /// <param name="EndPos">End position of record.</param>
        public TXT(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
            : base(Name, Type, Class, Ttl)
        {
            List <string> Text = new List <string>();

            while (Data.Position < EndPos)
            {
                Text.Add(DnsClient.ReadString(Data));
            }

            this.text = Text.ToArray();
        }
예제 #2
0
 /// <summary>
 /// General information about a host.
 /// </summary>
 /// <param name="Name">Name</param>
 /// <param name="Type">Resource Record Type</param>
 /// <param name="Class">Resource Record Class</param>
 /// <param name="Ttl">Time to live</param>
 /// <param name="Data">RR-specific binary data.</param>
 public HINFO(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data)
     : base(Name, Type, Class, Ttl)
 {
     this.cpu = DnsClient.ReadString(Data);
     this.os  = DnsClient.ReadString(Data);
 }