Show / Hide Table of Contents

Class MapRequest

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

Inheritance
Object
NatMessage
Message
Request
MapRequest
PeerRequest
Implements
ICloneable
Inherited Members
Request.RequestedLifetime
Request.ClientAddress
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 MapRequest : Request, ICloneable

Constructors

| Improve this Doc View Source

MapRequest()

Creates a new instance of the MapRequest class.

Declaration
public MapRequest()

Properties

| 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
| Improve this Doc View Source

SuggestedExternalAdddress

Suggested external IPv4 or IPv6 address.

Declaration
public IPAddress SuggestedExternalAdddress { get; set; }
Property Value
Type Description
IPAddress

This is useful for refreshing a mapping, especially after the PCP server loses state.If the PCP client does not know the external address, or does not have a preference, it MUST use the address-family-specific all-zeros address

| Improve this Doc View Source

SuggestedExternalPort

Suggested external port for the mapping.

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

This is useful for refreshing a mapping, especially after the PCP server loses state.If the PCP client does not know the external port, or does not have a preference, it MUST use 0.

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

Derived classes must override this.

Implements

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