Module error

Module error 

Source
Expand description

Error Types for Network Traversal and Firewall Operations

This module defines error types specific to network traversal and firewall operations in the Citadel Protocol. It handles errors from UPnP port forwarding, hole punching, and other network-related operations.

§Features

  • Custom error types for UPnP and hole punching operations
  • Conversion traits between custom and standard IO errors
  • Descriptive error messages for debugging
  • Error categorization for different network scenarios

§Examples

use citadel_wire::error::FirewallError;
use std::io::Error;

// Create a UPnP error
let upnp_err = FirewallError::UPNP("Port mapping failed".to_string());

// Convert to standard IO error
let io_err: Error = upnp_err.into();

§Important Notes

  • FirewallError::Skip indicates operation should be skipped
  • FirewallError::NotApplicable for unsupported operations
  • FirewallError::HolePunchExhausted when all attempts fail
  • Implements standard error traits for interoperability

Enums§

FirewallError