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;
2using System.Collections.Generic;
3using System.IO;
7
9{
13 public class SOA : ResourceRecord
14 {
15 private string mName;
16 private string rName;
17 private uint serial;
18 private uint refresh;
19 private uint retry;
20 private uint expire;
21 private uint minimum;
22
26 public SOA()
27 : base()
28 {
29 this.mName = string.Empty;
30 this.rName = string.Empty;
31 this.serial = 0;
32 this.refresh = 0;
33 this.retry = 0;
34 this.expire = 0;
35 this.minimum = 0;
36 }
37
46 public SOA(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data)
47 : base(Name, Type, Class, Ttl)
48 {
49 this.mName = DnsClient.ReadName(Data);
50 this.rName= DnsClient.ReadName(Data);
51 this.serial = DnsClient.ReadUInt32(Data);
52 this.refresh = DnsClient.ReadUInt32(Data);
53 this.retry = DnsClient.ReadUInt32(Data);
54 this.expire = DnsClient.ReadUInt32(Data);
55 this.minimum = DnsClient.ReadUInt32(Data);
56 }
57
61 [DefaultValueStringEmpty]
62 public string MName
63 {
64 get => this.mName;
65 set => this.mName = value;
66 }
67
71 [DefaultValueStringEmpty]
72 public string RName
73 {
74 get => this.rName;
75 set => this.rName = value;
76 }
77
81 [DefaultValue(0)]
82 public uint Serial
83 {
84 get => this.serial;
85 set => this.serial = value;
86 }
87
91 [DefaultValue(0)]
92 public uint Refresh
93 {
94 get => this.refresh;
95 set => this.refresh = value;
96 }
97
101 [DefaultValue(0)]
102 public uint Retry
103 {
104 get => this.retry;
105 set => this.retry = value;
106 }
107
112 [DefaultValue(0)]
113 public uint Expire
114 {
115 get => this.expire;
116 set => this.expire = value;
117 }
118
122 [DefaultValue(0)]
123 public uint Minimum
124 {
125 get => this.minimum;
126 set => this.minimum = value;
127 }
128
130 public override string ToString()
131 {
132 return base.ToString() + "\t" + this.mName + "\t" + this.rName +
133 "\t" + this.serial + "\t" + this.refresh + "\t" + this.retry +
134 "\t" + this.expire + "\t" + this.minimum;
135 }
136 }
137}
Abstract base class for DNS clients.
Definition: DnsClient.cs:21
Abstract base class for a resource record.
Start Of zone Authority
Definition: SOA.cs:14
SOA()
Start Of zone Authority
Definition: SOA.cs:26
string RName
Specifies the mailbox of the person responsible for this zone
Definition: SOA.cs:73
uint Minimum
Minimum TTL field that should be exported with any RR from this zone
Definition: SOA.cs:124
string MName
Name server that was the original or primary source of data for this zone
Definition: SOA.cs:63
uint Expire
Specifies the upper limit on the time interval that can elapse before the zone is no longer authorita...
Definition: SOA.cs:114
uint Retry
Interval that should elapse before a failed refresh should be retried
Definition: SOA.cs:103
SOA(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data)
Start Of zone Authority
Definition: SOA.cs:46
uint Refresh
Time interval before the zone should be refreshed
Definition: SOA.cs:93
uint Serial
Version number of the original copy of the zone.
Definition: SOA.cs:83
CLASS
TYPE fields are used in resource records.
Definition: CLASS.cs:11
TYPE
TYPE fields are used in resource records.
Definition: TYPE.cs:11