C# Класс DnDns.Records.RecordHeader

The DnsRecordHeader class contains fields, properties and parsing cababilities within the DNS Record except the the RDATA. The Name, Type, Class, TTL, and RDLength. This class is used in the DnsRecordFactory to instantiate concrete DnsRecord Classes. RFC 1035 3.2.1. Format All RRs have the same top level format shown below: 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / / / NAME / | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TYPE | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | CLASS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TTL | | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | RDLENGTH | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--| where: NAME an owner name, i.e., the name of the node to which this resource record pertains. TYPE two octets containing one of the RR TYPE codes. CLASS two octets containing one of the RR CLASS codes. TTL a 32 bit signed integer that specifies the time interval that the resource record may be cached before the source of the information should again be consulted. Zero values are interpreted to mean that the RR can only be used for the transaction in progress, and should not be cached. For example, SOA records are always distributed with a zero TTL to prohibit caching. Zero values can also be used for extremely volatile data. RDLENGTH an unsigned 16 bit integer that specifies the length in octets of the RDATA field.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ParseRecordHeader ( MemoryStream &ms ) : void

RecordHeader ( ) : System
RecordHeader ( string name, NsType nsType, NsClass nsClass, int timeToLive ) : System

Initalise the RecordHeader

Приватные методы

Метод Описание
GetMessageBytes ( ) : byte[]

Описание методов

ParseRecordHeader() публичный Метод

public ParseRecordHeader ( MemoryStream &ms ) : void
ms System.IO.MemoryStream
Результат void

RecordHeader() публичный Метод

public RecordHeader ( ) : System
Результат System

RecordHeader() публичный Метод

Initalise the RecordHeader
public RecordHeader ( string name, NsType nsType, NsClass nsClass, int timeToLive ) : System
name string The header name
nsType NsType The resource type
nsClass NsClass The class type
timeToLive int The time to live
Результат System