Code
·
22 lines
·
469 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22/*
*/
using MailSharp.DNS.Records;
namespace MailSharp.DNS.Records;
public record RecordATMA : DnsRecord
{
public byte Format { get; init; } // 0 = E.164, 1 = NSAP
public string Address { get; init; } = string.Empty;
public RecordATMA(RecordReader rr) : base(rr)
{
ushort rdLength = rr.ReadUInt16(-2);
Format = rr.ReadByte();
Address = Convert.ToHexString(rr.ReadBytes(rdLength - 1));
}
public override string ToString() => $"{Format} {Address}";
}