Class UpdateMessage
Dynamic updates in the Domain Name System.
Inherited Members
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.dll
Syntax
public class UpdateMessage : DnsObject, IWireSerialiser, ICloneable
Remarks
RFC 2136 allows adding or deleting resource records from a specified zone.
Prerequisites are specified separately from Updates, and can specify a dependency upon either the previous existence or nonexistence of an RRset, or the existence of a single RR.
An update is atomic, i.e., all prerequisites must be satisfied or else no update operations will take place. There are no data dependent error conditions defined after the prerequisites have been met.
Properties
| Improve this Doc View SourceAdditionalResources
The list of additional resource records.
Declaration
public List<ResourceRecord> AdditionalResources { get; }
Property Value
Type | Description |
---|---|
List<ResourceRecord> | Defaults to an empty list. |
Remarks
The resources which are related to the update itself, or to new resources being added by the update. For example, out of zone glue (A RRs referred to by new NS RRs) should be presented here.
The server can use or ignore out of zone glue, at the discretion of the server implementor.
Id
A 16 bit identifier assigned by the program that generates any kind of update.
Declaration
public ushort Id { get; set; }
Property Value
Type | Description |
---|---|
UInt16 | A unique identifier assigned by the requestor. |
Remarks
This identifier is copied to the corresponding response and can be used by the requestor to match up replies to outstanding queries.
IsResponse
Determines if the message is a response to an update.
Declaration
public bool IsResponse { get; }
Property Value
Type | Description |
---|---|
Boolean | true if QR is true. |
IsUpdate
Determines if the message is an update.
Declaration
public bool IsUpdate { get; }
Property Value
Type | Description |
---|---|
Boolean | true if QR is false. |
Opcode
The kind of message.
Declaration
public MessageOperation Opcode { get; set; }
Property Value
Type | Description |
---|---|
MessageOperation | Defaults to Update. |
Prerequisites
Resource records which must (not) preexist.
Declaration
public UpdatePrerequisiteList Prerequisites { get; }
Property Value
Type | Description |
---|---|
UpdatePrerequisiteList | Defaults to an empty list. |
QR
Determines if the message is a request or a response.
Declaration
public bool QR { get; set; }
Property Value
Type | Description |
---|---|
Boolean | 0 if the message is a request or 1 if the message is a response. |
See Also
| Improve this Doc View SourceStatus
Response code - this 4 bit field is set as part of responses.
Declaration
public MessageStatus Status { get; set; }
Property Value
Type | Description |
---|---|
MessageStatus | One of the MessageStatus values. |
Updates
Resource records to be added or deleted.
Declaration
public UpdateResourceList Updates { get; }
Property Value
Type | Description |
---|---|
UpdateResourceList | Defaults to an empty list. |
Z
Reserved for future use. Must be zero in all updates and responses.
Declaration
public int Z { get; set; }
Property Value
Type | Description |
---|---|
Int32 | Must be zero. |
Zone
The zone to update.
Declaration
public Question Zone { get; set; }
Property Value
Type | Description |
---|---|
Question | Defaults to the empty zone. Name is null, Class is IN and Type is SOA (6). |
Methods
| Improve this Doc View SourceCreateResponse()
Create a response for the update message.
Declaration
public UpdateMessage CreateResponse()
Returns
Type | Description |
---|---|
UpdateMessage |
Read(WireReader)
Reads the DNS object that is encoded in the wire format.
Declaration
public override IWireSerialiser Read(WireReader reader)
Parameters
Type | Name | Description |
---|---|---|
WireReader | reader | The source of the DNS object. |
Returns
Type | Description |
---|---|
IWireSerialiser | The final DNS object. |
Overrides
Remarks
Reading a ResourceRecord will return a new instance that is type specific unless the GetDataLength() is zero.
Write(WireWriter)
Writes the DNS object encoded in the wire format.
Declaration
public override void Write(WireWriter writer)
Parameters
Type | Name | Description |
---|---|---|
WireWriter | writer | The destination of the DNS object. |