Error codes the WAN connection services add to the UDA set.
WANIPConnection:1 §2.4 - the 700 range is reserved for a working committee, so these numbers mean something different in a non-gateway service.
These are plain int values to compare UPnPException.errorCode against,
not a type the exception carries. Nothing here is enforced by the type
system, so an unrecognised code is not a compile error - a gateway may
answer one of these, a UDA code from §3.2.5, or a vendor code in the 800
range, and only the first is named here:
try {
await connection.addPortMapping(/* ... */);
} on UPnPException catch (e) {
if (e.errorCode == WanConnectionError.onlyPermanentLeasesSupported) {
// retry with Duration.zero
}
}
Scoped to the port mapping and status actions WanConnectionService wraps.
The connection-lifecycle codes 701 to 712, and PPP's 719, belong to
SetConnectionType, RequestConnection and ForceTermination, which are
not wrapped; reach those through invokeAction and read the code off the
UPnPException directly.
All of these are worth knowing even against a v2 gateway. WANIPConnection:2 retires four of them - samePortValuesRequired, onlyPermanentLeasesSupported, remoteHostOnlySupportsWildcard and externalPortOnlySupportsWildcard - with the wording "This error code MUST NOT be used by WANIPConnection:2 services, but Control points are REQUIRED to support this error code", and adds three more, marked below. WANPPPConnection:1 declares the same v1 set.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- conflictInMappingEntry → const int
- The requested mapping is held by a different internal client.
- conflictWithOtherMechanisms → const int
- The mapping collides with something outside UPnP's view - a static rule, or another port-control protocol. WANIPConnection:2 only.
- externalPortOnlySupportsWildcard → const int
-
externalPortmust be the0wildcard on this gateway. - noPortMapsAvailable → const int
- The gateway has no free ports left to map. WANIPConnection:2 only.
- noSuchEntryInArray → const int
- No mapping matches the requested host, port and protocol.
- onlyPermanentLeasesSupported → const int
- The gateway supports permanent mappings only, so a non-zero lease was refused. Retrying with Duration.zero is the usual response.
- remoteHostOnlySupportsWildcard → const int
-
remoteHostmust be the wildcard on this gateway, so pass an empty string rather than a specific address or name. - samePortValuesRequired → const int
-
The gateway requires
internalPortto equalexternalPort. - specifiedArrayIndexInvalid → const int
-
The port mapping index is past the end of the table. Ends an enumeration
with
GetGenericPortMappingEntry. - wildCardNotPermittedInExtPort → const int
-
externalPortmay not be the0wildcard on this gateway; ask for a specific port. - wildCardNotPermittedInIntPort → const int
-
internalPortmay not be the0wildcard. WANIPConnection:2 only. - wildCardNotPermittedInSrcIp → const int
-
internalClientmay not be a wildcard, and an empty string is one.