-`logLevel`: verbosity of internal logs, from `PLUM_LOG_LEVEL_VERBOSE` to `PLUM_LOG_LEVEL_NONE` (default: none); import `libplum/libplum` to access these constants
Returns a `MappingResult` containing the mapping `id` (needed for `destroyMapping`) and the `PlumMapping` with the external address, port, and `mappingProtocol` indicating which protocol was used (`PCP`, `NatPmp`, or `UPnP`).
Returns an error if no NAT device is found, the mapping fails, or the timeout expires.
### destroyMapping
```nim
proc destroyMapping*(id: cint)
```
Removes a mapping. Must be called exactly once after a successful `createMapping`.
### hasMapping
```nim
proc hasMapping*(id: cint): bool
```
Returns true if the mapping exists and has not been destroyed yet.
### getLocalAddress
```nim
proc getLocalAddress*(): Result[string, string]
```
Returns the local IP address as seen from the network interface. Useful to check whether the machine already has a public IP (in which case no NAT mapping is needed).