public Optional<NatPortMapping> getPortMapping(
      final NatServiceType serviceType, final NetworkProtocol networkProtocol) {
    if (isNatEnvironment()) {
      try {
        final NatManager natManager = getNatManager().orElseThrow();
        return Optional.of(natManager.getPortMapping(serviceType, networkProtocol));
      } catch (Exception e) {
        LOG.warn(
            "Caught exception while trying to query port mapping (ignoring): {}", e.toString());
      }
    }
    return Optional.empty();
  }
Returns the port mapping associated to the passed service type.

@param serviceType The service type {@link NatServiceType}.
@param networkProtocol The network protocol {@link NetworkProtocol}.
@return The port mapping {@link NatPortMapping}
nat/src/main/java/org/hyperledger/besu/nat/NatService.java