Show / Hide Table of Contents

Class MapRequest

Request that an external port is mapped to an internal port.

Inheritance
Object
NatMessage
Message
MapRequest
Implements
ICloneable
Inherited Members
Message.Version
Message.Opcode
Message.IsResponse
Message.Read(NatReader)
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.Pmp
Assembly: Makaretu.Nat.dll
Syntax
public class MapRequest : Message, ICloneable

Properties

| Improve this Doc View Source

InternalPort

The local port on which the client is listening.

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

Lifetime

How long to reserve the mapping.

Declaration
public TimeSpan Lifetime { get; set; }
Property Value
Type Description
TimeSpan

Defaults to 2 hours.

| Improve this Doc View Source

PreferredExternalPort

Preferred external port.

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

If zero, then NAT assigns a random port number.

Remarks

The NAT can ignore the external port and assign it own value.

Methods

| 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
Message.Write(NatWriter)
Remarks

Derived classes must override this.

Implements

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