Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
WKS.cs
1using System.IO;
5
7{
12 {
13 private byte protocol;
14 private byte[] bitMap;
15
19 public WKS()
20 : base()
21 {
22 this.protocol = 0;
23 this.bitMap = null;
24 }
25
35 public WKS(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
36 : base(Name, Type, Class, Ttl, Data)
37 {
38 this.protocol = (byte)Data.ReadByte();
39 int c = (int)(EndPos - Data.Position);
40 this.bitMap = new byte[c];
41 Data.ReadAll(this.bitMap, 0, c);
42 }
43
47 protected override int AddressSize => 4;
48
52 [DefaultValue((byte)0)]
53 public byte Protocol
54 {
55 get => this.protocol;
56 set => this.protocol = value;
57 }
58
62 [DefaultValueNull]
63 public byte[] BitMap
64 {
65 get => this.bitMap;
66 set => this.bitMap = value;
67 }
68
70 public override string ToString()
71 {
72 return base.ToString() + "\t" + this.protocol.ToString() +
73 "\t" + this.bitMap.ToString();
74 }
75 }
76}
Abstract base class for Resource Address Records.
Well Known Services, as defined in RFC 1010
Definition: WKS.cs:12
override int AddressSize
IP Address size.
Definition: WKS.cs:47
WKS(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
Well Known Services
Definition: WKS.cs:35
WKS()
Well Known Services
Definition: WKS.cs:19
byte[] BitMap
Service Bit-map
Definition: WKS.cs:64
byte Protocol
Protocol Number
Definition: WKS.cs:54
CLASS
TYPE fields are used in resource records.
Definition: CLASS.cs:7
TYPE
TYPE fields are used in resource records.
Definition: TYPE.cs:7