Show / Hide Table of Contents

Class MapResponse

Response that contains a public (external) end point that can be connected to by devices outside of the NAT.

Inheritance
Object
NatMessage
Message
Response
MapResponse
Implements
ICloneable
Inherited Members
Response.ResultCode
Response.Lifetime
Response.EpochTime
Response.EnsureSuccess()
Message.NonceLength
Message.Version
Message.Opcode
Message.IsResponse
Message.Create(Byte[])
Message.Create<T>(Byte[])
NatMessage.Length()
NatMessage.Clone()
NatMessage.Clone<T>()
NatMessage.ToByteArray()
NatMessage.Write(Stream)
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Makaretu.Nat.Pcp
Assembly: Makaretu.Nat.dll
Syntax
public class MapResponse : Response, ICloneable

Constructors

| Improve this Doc View Source

MapResponse()

Creates a new instance of the MapResponse class.

Declaration
public MapResponse()

Properties

| Improve this Doc View Source

AssignedExternalAdddress

Assigned external IPv4 or IPv6 address.

Declaration
public IPAddress AssignedExternalAdddress { get; set; }
Property Value
Type Description
IPAddress
| Improve this Doc View Source

AssignedExternalPort

Assigned external port for the mapping.

Declaration
public ushort AssignedExternalPort { get; set; }
Property Value
Type Description
UInt16
| Improve this Doc View Source

InternalPort

Internal port for the mapping.

Declaration
public ushort InternalPort { get; set; }
Property Value
Type Description
UInt16

The value 0 indicates 'all ports', and is legal when the lifetime is zero (a delete request), if the protocol does not use 16-bit port numbers, or the client is requesting 'all ports'. If the protocol is zero (meaning 'all protocols'), then internal port MUST be zero on transmission and MUST be ignored on reception.

| Improve this Doc View Source

Nonce

A randome value.

Declaration
public byte[] Nonce { get; set; }
Property Value
Type Description
Byte[]

Must be 96 bits (12 byte).

| Improve this Doc View Source

Protocol

Upper-layer protocol associated with this Opcode.

Declaration
public ProtocolType Protocol { get; set; }
Property Value
Type Description
ProtocolType

One of the IANA assigned protocol values. TCP=6 and UDP=17. Zero, the default, indicates all protocols.

See Also
https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml

Methods

| Improve this Doc View Source

Read(NatReader)

Reads the NAT message.

Declaration
public override void Read(NatReader reader)
Parameters
Type Name Description
NatReader reader

The source for the NAT message.

Overrides
Response.Read(NatReader)
Remarks

Derived classes must override this.

| Improve this Doc View Source

Write(NatWriter)

Writes the NAT message.

Declaration
public override void Write(NatWriter writer)
Parameters
Type Name Description
NatWriter writer

The destination for the NAT message.

Overrides
Response.Write(NatWriter)
Remarks

Derived classes must override this.

Implements

System.ICloneable
  • Improve this Doc
  • View Source
Back to top Generated by DocFX