[#MappingResult]
= MappingResult
:mrdocs:

Successful response to a port mapping&period;

== Synopsis

Declared in `&lt;common&sol;pcp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct MappingResult;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:MappingResult/2constructor.adoc[`MappingResult`]         [.small]#[constructor]#
| Construct a successful mapping result&period;
| xref:MappingResult/ToString.adoc[`ToString`] 
| Format mapping as string for logging&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:MappingResult/external.adoc[`external`] 
| External host&colon;port&period;
| xref:MappingResult/lifetime.adoc[`lifetime`] 
| Granted lifetime of binding (seconds)&period;
| xref:MappingResult/version.adoc[`version`] 
| Protocol version, one of NATPMP&lowbar;VERSION or PCP&lowbar;VERSION&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:NATPMPRequestPortMap.adoc[`NATPMPRequestPortMap`]
| Try to open a port using RFC 6886 NAT&hyphen;PMP&period; IPv4 only&period;
| xref:PCPRequestPortMap.adoc[`PCPRequestPortMap`]
| Try to open a port using RFC 6887 Port Control Protocol (PCP)&period; Handles IPv4 and IPv6&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
