Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SOA.cs
1using System.IO;
5
7{
11 public class SOA : ResourceRecord
12 {
13 private string mName;
14 private string rName;
15 private uint serial;
16 private uint refresh;
17 private uint retry;
18 private uint expire;
19 private uint minimum;
20
24 public SOA()
25 : base()
26 {
27 this.mName = string.Empty;
28 this.rName = string.Empty;
29 this.serial = 0;
30 this.refresh = 0;
31 this.retry = 0;
32 this.expire = 0;
33 this.minimum = 0;
34 }
35
44 public SOA(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data)
45 : base(Name, Type, Class, Ttl)
46 {
47 this.mName = DnsClient.ReadName(Data);
48 this.rName= DnsClient.ReadName(Data);
49 this.serial = DnsClient.ReadUInt32(Data);
50 this.refresh = DnsClient.ReadUInt32(Data);
51 this.retry = DnsClient.ReadUInt32(Data);
52 this.expire = DnsClient.ReadUInt32(Data);
53 this.minimum = DnsClient.ReadUInt32(Data);
54 }
55
59 [DefaultValueStringEmpty]
60 public string MName
61 {
62 get => this.mName;
63 set => this.mName = value;
64 }
65
69 [DefaultValueStringEmpty]
70 public string RName
71 {
72 get => this.rName;
73 set => this.rName = value;
74 }
75
79 [DefaultValue(0)]
80 public uint Serial
81 {
82 get => this.serial;
83 set => this.serial = value;
84 }
85
89 [DefaultValue(0)]
90 public uint Refresh
91 {
92 get => this.refresh;
93 set => this.refresh = value;
94 }
95
99 [DefaultValue(0)]
100 public uint Retry
101 {
102 get => this.retry;
103 set => this.retry = value;
104 }
105
110 [DefaultValue(0)]
111 public uint Expire
112 {
113 get => this.expire;
114 set => this.expire = value;
115 }
116
120 [DefaultValue(0)]
121 public uint Minimum
122 {
123 get => this.minimum;
124 set => this.minimum = value;
125 }
126
128 public override string ToString()
129 {
130 return base.ToString() + "\t" + this.mName + "\t" + this.rName +
131 "\t" + this.serial + "\t" + this.refresh + "\t" + this.retry +
132 "\t" + this.expire + "\t" + this.minimum;
133 }
134 }
135}
Abstract base class for DNS clients.
Definition: DnsClient.cs:22
Abstract base class for a resource record.
Start Of zone Authority
Definition: SOA.cs:12
SOA()
Start Of zone Authority
Definition: SOA.cs:24
string RName
Specifies the mailbox of the person responsible for this zone
Definition: SOA.cs:71
uint Minimum
Minimum TTL field that should be exported with any RR from this zone
Definition: SOA.cs:122
string MName
Name server that was the original or primary source of data for this zone
Definition: SOA.cs:61
uint Expire
Specifies the upper limit on the time interval that can elapse before the zone is no longer authorita...
Definition: SOA.cs:112
uint Retry
Interval that should elapse before a failed refresh should be retried
Definition: SOA.cs:101
SOA(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data)
Start Of zone Authority
Definition: SOA.cs:44
uint Refresh
Time interval before the zone should be refreshed
Definition: SOA.cs:91
uint Serial
Version number of the original copy of the zone.
Definition: SOA.cs:81
CLASS
TYPE fields are used in resource records.
Definition: CLASS.cs:7
TYPE
TYPE fields are used in resource records.
Definition: TYPE.cs:7