Class MapRequest
Requests 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 MapRequest : Request, ICloneable
Constructors
| Improve this Doc View SourceMapRequest()
Creates a new instance of the MapRequest class.
Declaration
public MapRequest()
Properties
| Improve this Doc View SourceInternalPort
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
| Improve this Doc View SourceSuggestedExternalAdddress
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 |
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 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.