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;
2using System.IO;
6
8{
13 {
14 private byte protocol;
15 private byte[] bitMap;
16
20 public WKS()
21 : base()
22 {
23 this.protocol = 0;
24 this.bitMap = null;
25 }
26
36 public WKS(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
37 : base(Name, Type, Class, Ttl, Data)
38 {
39 this.protocol = (byte)Data.ReadByte();
40 int c = (int)(EndPos - Data.Position);
41 this.bitMap = new byte[c];
42 Data.ReadAll(this.bitMap, 0, c);
43 }
44
48 protected override int AddressSize => 4;
49
53 [DefaultValue((byte)0)]
54 public byte Protocol
55 {
56 get => this.protocol;
57 set => this.protocol = value;
58 }
59
63 [DefaultValueNull]
64 public byte[] BitMap
65 {
66 get => this.bitMap;
67 set => this.bitMap = value;
68 }
69
71 public override string ToString()
72 {
73 return base.ToString() + "\t" + this.protocol.ToString() +
74 "\t" + this.bitMap.ToString();
75 }
76 }
77}
Abstract base class for Resource Address Records.
Well Known Services, as defined in RFC 1010
Definition: WKS.cs:13
override int AddressSize
IP Address size.
Definition: WKS.cs:48
WKS(string Name, TYPE Type, CLASS Class, uint Ttl, Stream Data, long EndPos)
Well Known Services
Definition: WKS.cs:36
WKS()
Well Known Services
Definition: WKS.cs:20
byte[] BitMap
Service Bit-map
Definition: WKS.cs:65
byte Protocol
Protocol Number
Definition: WKS.cs:55
CLASS
TYPE fields are used in resource records.
Definition: CLASS.cs:11
TYPE
TYPE fields are used in resource records.
Definition: TYPE.cs:11