Class AddressRecord
Base class for an Internet address.
Inherited Members
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.dll
Syntax
public abstract class AddressRecord : ResourceRecord, IWireSerialiser, ICloneable, IPresentationSerialiser
Constructors
| Improve this Doc View SourceAddressRecord()
Creates a new instance of the AddressRecord class.
Declaration
public AddressRecord()
Properties
| Improve this Doc View SourceAddress
The Internet address.
Declaration
public IPAddress Address { get; set; }
Property Value
| Type | Description |
|---|---|
| IPAddress | Either IPv4 or IPv6. |
Methods
| Improve this Doc View SourceCreate(DomainName, IPAddress)
Creates an A or AAAA record based on the AddressFamily.
Declaration
public static AddressRecord Create(DomainName name, IPAddress address)
Parameters
| Type | Name | Description |
|---|---|---|
| DomainName | name | The name of the node that owns the address. |
| IPAddress | address | An IPv4 or IPv6 address. |
Returns
| Type | Description |
|---|---|
| AddressRecord | An ARecord or AAAARecord tha describes
the |
ReadData(PresentationReader)
Read the textual representation of the data that is specific to the resource record Type.
Declaration
public override void ReadData(PresentationReader reader)
Parameters
| Type | Name | Description |
|---|---|---|
| PresentationReader | reader | The source of the resource record's data. |
Overrides
Remarks
Derived classes must implement this method.
ReadData(WireReader, Int32)
Read the data that is specific to the resource record Type.
Declaration
public override void ReadData(WireReader reader, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| WireReader | reader | The source of the resource record's data. |
| Int32 | length | The length, in bytes, of the data. |
Overrides
Remarks
Derived classes must implement this method.
WriteData(PresentationWriter)
Write the textual representation of the data that is specific to the resource record.
Declaration
public override void WriteData(PresentationWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| PresentationWriter | writer | The destination for the resource record's data. |
Overrides
Remarks
Derived classes should implement this method.
By default, this will write the hex encoding of the GetData() preceeded by "#" and the number integer bytes.
WriteData(WireWriter)
Write the data that is specific to the resource record Type.
Declaration
public override void WriteData(WireWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| WireWriter | writer | The destination for the DNS object's data. |
Overrides
Remarks
Derived classes must implement this method.