Class MapResponse
Response that contains a public (external) end point that can be connected to by devices outside of the NAT.
Implements
Inherited Members
Namespace: Makaretu.Nat.Pcp
Assembly: Makaretu.Nat.dll
Syntax
public class MapResponse : Response, ICloneable
Constructors
| Improve this Doc View SourceMapResponse()
Creates a new instance of the MapResponse class.
Declaration
public MapResponse()
Properties
| Improve this Doc View SourceAssignedExternalAdddress
Assigned external IPv4 or IPv6 address.
Declaration
public IPAddress AssignedExternalAdddress { get; set; }
Property Value
| Type | Description |
|---|---|
| IPAddress |
AssignedExternalPort
Assigned external port for the mapping.
Declaration
public ushort AssignedExternalPort { get; set; }
Property Value
| Type | Description |
|---|---|
| UInt16 |
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. |
Nonce
A randome value.
Declaration
public byte[] Nonce { get; set; }
Property Value
| Type | Description |
|---|---|
| Byte[] | Must be 96 bits (12 byte). |
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
Methods
| Improve this Doc View SourceRead(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
Remarks
Derived classes must override this.
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
Remarks
Derived classes must override this.