-
Notifications
You must be signed in to change notification settings - Fork 0
/
RecordA.cs
39 lines (32 loc) · 787 Bytes
/
RecordA.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System;
/*
3.4.1. A RDATA format
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| ADDRESS |
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
where:
ADDRESS A 32 bit Internet address.
Hosts that have multiple Internet addresses will have multiple A
records.
*
*/
namespace Heijden.DNS
{
public class RecordA : Record
{
public System.Net.IPAddress Address;
public RecordA(RecordReader rr)
{
Address = new System.Net.IPAddress(rr.ReadBytes(4));
//System.Net.IPAddress.TryParse(string.Format("{0}.{1}.{2}.{3}",
// rr.ReadByte(),
// rr.ReadByte(),
// rr.ReadByte(),
// rr.ReadByte()), out this.Address);
}
public override string ToString()
{
return Address.ToString();
}
}
}