/// <summary> /// Implementation Reference RFC 3403 /// </summary> /// <param name="buffer"></param> public NaptrRecord(DataBuffer buffer) { order = buffer.ReadShortUInt(); priority = buffer.ReadShortUInt(); flags = buffer.ReadCharString(); services = buffer.ReadCharString(); regexp = buffer.ReadCharString(); replacement = buffer.ReadCharString(); }
/// <summary> /// create a text array from record bytes /// </summary> /// <param name="buffer"> buffer of bytes </param> /// <param name="length"> length of bytes to use</param> 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); } }
/// <summary> /// create a text array from record bytes /// </summary> /// <param name="buffer"> buffer of bytes</param> public TextOnly(DataBuffer buffer) { text = new List <string>(); while (buffer.Next > 0) { text.Add(buffer.ReadCharString()); } }
/// <summary> /// Implementation Reference RFC 1183 /// </summary> /// <param name="buffer"></param> public IsdnRecord(DataBuffer buffer) { isdnAddress = buffer.ReadCharString(); subAddress = buffer.ReadCharString(); }