getStatusSummary method

Map<String, dynamic> getStatusSummary()

Gets a summary of the current NAT status

Implementation

Map<String, dynamic> getStatusSummary() {
  return {
    'currentBehavior': {
      'mappingBehavior': currentBehavior.mappingBehavior.name,
      'filteringBehavior': currentBehavior.filteringBehavior.name,
      'supportsHairpinning': currentBehavior.supportsHairpinning,
      'preservesPorts': currentBehavior.preservesPorts,
      'supportsPortMapping': currentBehavior.supportsPortMapping,
      'mappingLifetime': currentBehavior.mappingLifetime,
    },
    'recommendedStrategy': recommendedStrategy.name,
    'recommendedStrategyDescription': recommendedStrategyDescription,
    'historySize': behaviorHistory.length,
    'lastUpdated': behaviorHistory.isNotEmpty
        ? behaviorHistory.last.timestamp.toIso8601String()
        : null,
  };
}