public LocRecord(DataBuffer buffer) { _version = buffer.ReadShortInt(); _size = buffer.ReadShortInt(); _horzPrecision = buffer.ReadShortInt(); _vertPrecision = buffer.ReadShortInt(); _lattitude = buffer.ReadInt(); _longitude = buffer.ReadInt(); _altitude = buffer.ReadInt(); }
public LocRecord(DataBuffer buffer) { _version = buffer.ReadShortInt(); _size = buffer.ReadShortInt(); _horzPrecision = buffer.ReadShortInt(); _vertPrecision = buffer.ReadShortInt(); _lattitude = buffer.ReadInt(); _longitude = buffer.ReadInt(); _altitude = buffer.ReadInt(); }
public DnsEntry(DataBuffer buffer) { try { _domain = buffer.ReadDomainName(); byte b = buffer.ReadByte(); _recType = (RecordType)buffer.ReadShortInt(); _classType = buffer.ReadShortInt(); _ttl = buffer.ReadInt(); int length = buffer.ReadByte(); switch (_recType) { case RecordType.A: _data = new ARecord(buffer); break; case RecordType.NS: _data = new NSRecord(buffer); break; case RecordType.CNAME: _data = new CNameRecord(buffer); break; case RecordType.SOA: _data = new SoaRecord(buffer); break; case RecordType.MB: _data = new MBRecord(buffer); break; case RecordType.MG: _data = new MGRecord(buffer); break; case RecordType.MR: _data = new MRRecord(buffer); break; case RecordType.NULL: _data = new NullRecord(buffer, length); break; case RecordType.WKS: _data = new WksRecord(buffer, length); break; case RecordType.PTR: _data = new PtrRecord(buffer); break; case RecordType.HINFO: _data = new HInfoRecord(buffer, length); break; case RecordType.MINFO: _data = new MInfoRecord(buffer); break; case RecordType.MX: _data = new MXRecord(buffer); break; case RecordType.TXT: _data = new TxtRecord(buffer, length); break; case RecordType.RP: _data = new RPRecord(buffer); break; case RecordType.AFSDB: _data = new AfsdbRecord(buffer); break; case RecordType.X25: _data = new X25Record(buffer); break; case RecordType.ISDN: _data = new IsdnRecord(buffer); break; case RecordType.RT: _data = new RTRecord(buffer); break; case RecordType.NSAP: _data = new NsapRecord(buffer, length); break; case RecordType.SIG: _data = new SigRecord(buffer, length); break; case RecordType.KEY: _data = new KeyRecord(buffer, length); break; case RecordType.PX: _data = new PXRecord(buffer); break; case RecordType.AAAA: _data = new AAAARecord(buffer); break; case RecordType.LOC: _data = new LocRecord(buffer); break; case RecordType.SRV: _data = new SrvRecord(buffer); break; case RecordType.NAPTR: _data = new NaptrRecord(buffer); break; case RecordType.KX: _data = new KXRecord(buffer); break; case RecordType.A6: _data = new A6Record(buffer); break; case RecordType.DNAME: _data = new DNameRecord(buffer); break; case RecordType.DS: _data = new DSRecord(buffer, length); break; case RecordType.TKEY: _data = new TKeyRecord(buffer); break; case RecordType.TSIG: _data = new TSigRecord(buffer); break; default: throw new DnsQueryException("Invalid DNS Record Type in DNS Response", null); } } catch (Exception ex) { _data = new ExceptionRecord(ex.Message); throw ex; } }
public SigRecord(DataBuffer buffer, int length) { int pos = buffer.Position; _coveredType = buffer.ReadShortInt(); _algorithm = buffer.ReadByte(); _numLabels = buffer.ReadByte(); _expiration = buffer.ReadUInt(); _inception = buffer.ReadUInt(); _keyTag = buffer.ReadShortInt(); _signer = buffer.ReadDomainName(); buffer.Position = pos - length; }
public SigRecord(DataBuffer buffer, int length) { int pos = buffer.Position; _coveredType = buffer.ReadShortInt(); _algorithm = buffer.ReadByte(); _numLabels = buffer.ReadByte(); _expiration = buffer.ReadUInt(); _inception = buffer.ReadUInt(); _keyTag = buffer.ReadShortInt(); _signer = buffer.ReadDomainName(); buffer.Position = pos - length; }
public DSRecord(DataBuffer buffer, int length) { _key = buffer.ReadShortInt(); _algorithm = buffer.ReadByte(); _digestType = buffer.ReadByte(); _digest = buffer.ReadBytes(length - 4); }
public KeyRecord(DataBuffer buffer, int length) { _flags = buffer.ReadShortInt(); _protocol = buffer.ReadByte(); _algorithm = buffer.ReadByte(); _publicKey = buffer.ReadBytes(length - 4); }
public SrvRecord(DataBuffer buffer) { _priority = buffer.ReadShortInt(); _weight = buffer.ReadShortUInt(); _port = buffer.ReadShortUInt(); _domain = buffer.ReadDomainName(); }
public DSRecord(DataBuffer buffer, int length) { _key = buffer.ReadShortInt(); _algorithm = buffer.ReadByte(); _digestType = buffer.ReadByte(); _digest = buffer.ReadBytes(length - 4); }
public KeyRecord(DataBuffer buffer, int length) { _flags = buffer.ReadShortInt(); _protocol = buffer.ReadByte(); _algorithm = buffer.ReadByte(); _publicKey = buffer.ReadBytes(length - 4); }
public SrvRecord(DataBuffer buffer) { _priority = buffer.ReadShortInt(); _weight = buffer.ReadShortUInt(); _port = buffer.ReadShortUInt(); _domain = buffer.ReadDomainName(); }
public AfsdbRecord(DataBuffer buffer) { _subType = buffer.ReadShortInt(); _domain = buffer.ReadDomainName(); }
public AfsdbRecord(DataBuffer buffer) { _subType = buffer.ReadShortInt(); _domain = buffer.ReadDomainName(); }
public DnsEntry(DataBuffer buffer) { try { _domain = buffer.ReadDomainName(); byte b = buffer.ReadByte(); _recType = (RecordType)buffer.ReadShortInt(); _classType = buffer.ReadShortInt(); _ttl = buffer.ReadInt(); int length = buffer.ReadByte(); switch (_recType) { case RecordType.A: _data = new ARecord(buffer); break; case RecordType.NS: _data = new NSRecord(buffer); break; case RecordType.CNAME: _data = new CNameRecord(buffer); break; case RecordType.SOA: _data = new SoaRecord(buffer); break; case RecordType.MB: _data = new MBRecord(buffer); break; case RecordType.MG: _data = new MGRecord(buffer); break; case RecordType.MR: _data = new MRRecord(buffer); break; case RecordType.NULL: _data = new NullRecord(buffer, length); break; case RecordType.WKS: _data = new WksRecord(buffer, length); break; case RecordType.PTR: _data = new PtrRecord(buffer); break; case RecordType.HINFO: _data = new HInfoRecord(buffer, length); break; case RecordType.MINFO: _data = new MInfoRecord(buffer); break; case RecordType.MX: _data = new MXRecord(buffer); break; case RecordType.TXT: _data = new TxtRecord(buffer, length); break; case RecordType.RP: _data = new RPRecord(buffer); break; case RecordType.AFSDB: _data = new AfsdbRecord(buffer); break; case RecordType.X25: _data = new X25Record(buffer); break; case RecordType.ISDN: _data = new IsdnRecord(buffer); break; case RecordType.RT: _data = new RTRecord(buffer); break; case RecordType.NSAP: _data = new NsapRecord(buffer, length); break; case RecordType.SIG: _data = new SigRecord(buffer, length); break; case RecordType.KEY: _data = new KeyRecord(buffer, length); break; case RecordType.PX: _data = new PXRecord(buffer); break; case RecordType.AAAA: _data = new AAAARecord(buffer); break; case RecordType.LOC: _data = new LocRecord(buffer); break; case RecordType.SRV: _data = new SrvRecord(buffer); break; case RecordType.NAPTR: _data = new NaptrRecord(buffer); break; case RecordType.KX: _data = new KXRecord(buffer); break; case RecordType.A6: _data = new A6Record(buffer); break; case RecordType.DNAME: _data = new DNameRecord(buffer); break; case RecordType.DS: _data = new DSRecord(buffer, length); break; case RecordType.TKEY: _data = new TKeyRecord(buffer); break; case RecordType.TSIG: _data = new TSigRecord(buffer); break; default: throw new DnsQueryException("Invalid DNS Record Type in DNS Response", null); } } catch (Exception ex) { _data = new ExceptionRecord(ex.Message); throw ex; } }