MailSharp / MailSharp.DNS / Records / RecordHINFO.cs
Code · 34 lines · 1033 bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34/*
 3.3.2. HINFO RDATA format

    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    /                      CPU                      /
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    /                       OS                      /
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

where:

CPU             A <character-string> which specifies the CPU type.

OS              A <character-string> which specifies the operating
                system type.

Standard values for CPU and OS can be found in [RFC-1010].

HINFO records are used to acquire general information about a host.  The
main use is for protocols such as FTP that can use special procedures
when talking between machines or operating systems of the same type.
 */

using MailSharp.DNS.Records;

namespace MailSharp.DNS.Records;

public record RecordHINFO(RecordReader rr) : DnsRecord(rr)
{
	public string Cpu { get; } = rr.ReadString();
	public string Os { get; } = rr.ReadString();

	public override string ToString() => $"CPU={Cpu} OS={Os}";
}