Class DNSPacket
DNSPacket class.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Cosmos.System.Network.IPv4.UDP.DNS
Assembly: Cosmos.System2.dll
Syntax
public class DNSPacket : UDPPacket
Constructors
| Improve this Doc View SourceDNSPacket(Address, Address, UInt16, UInt16)
Create new instance of the UDPPacket class.
Declaration
public DNSPacket(Address source, Address dest, ushort urlnb, ushort len)
Parameters
Type | Name | Description |
---|---|---|
Address | source | Source address. |
Address | dest | Destination address. |
System.UInt16 | urlnb | Domain name number. |
System.UInt16 | len | Length |
Exceptions
Type | Condition |
---|---|
System.OverflowException | Thrown if data array length is greater than Int32.MaxValue. |
System.ArgumentException | Thrown if RawData is invalid or null. |
DNSPacket(Byte[])
Create new instance of the DNSPacket class.
Declaration
public DNSPacket(byte[] rawData)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | rawData | Raw data. |
Methods
| Improve this Doc View SourceInitFields()
Init DNSPacket fields.
Declaration
protected override void InitFields()
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown if RawData is invalid or null. |
ParseName(Byte[], ref Int32)
Get name from data and offset
Declaration
public string ParseName(byte[] RawData, ref int index)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | RawData | Data |
System.Int32 | index | Data offset |
Returns
Type | Description |
---|---|
System.String |
ToString()
To string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | string value. |