#[cfg(feature = "hooks")]
extern crate rns_hooks_crate as rns_hooks;
pub mod common;
pub mod event;
pub mod hdlc;
pub mod kiss;
pub mod logging;
pub mod rnode_kiss;
pub use common::time;
pub mod driver;
pub mod interface;
pub mod node;
pub use common::config;
pub mod announce_cache;
pub mod ifac;
pub mod md5;
pub mod pickle;
pub mod profiling;
#[cfg(feature = "iface-local")]
pub mod remote_management;
pub mod resource;
pub mod rpc;
pub mod serial;
pub mod storage;
pub use common::compressor;
pub use common::link_manager;
pub mod management;
#[cfg(feature = "iface-local")]
pub mod shared_client;
pub use common::destination;
pub mod discovery;
pub mod holepunch;
#[cfg(feature = "hooks")]
pub mod provider_bridge;
pub use config::RnsConfig;
pub use destination::{AnnouncedIdentity, Destination, GroupKeyError};
#[cfg(feature = "iface-backbone")]
pub use driver::BackbonePeerPoolSettings;
pub use driver::{AnnounceRateDefaults, Callbacks};
pub use event::{
BackbonePeerHookEvent, BackbonePeerPoolMemberStatus, BackbonePeerPoolStatus,
BackbonePeerStateEntry, BlackholeInfo, Event, HookInfo, InterfaceStatsResponse,
LinkDatagramError, LinkInfoEntry, LocalDestinationEntry, NextHopResponse, PathTableEntry,
QueryRequest, QueryResponse, RateTableEntry, ResourceInfoEntry, RuntimeConfigApplyMode,
RuntimeConfigEntry, RuntimeConfigError, RuntimeConfigErrorCode, RuntimeConfigSource,
RuntimeConfigValue, SingleInterfaceStat, TrafficDetail,
};
pub use ifac::IfacState;
#[cfg(feature = "iface-auto")]
pub use interface::auto::{AutoConfig, AutoFactory};
#[cfg(feature = "iface-ax25-kiss")]
pub use interface::ax25_kiss::{
decode_ui_frame as decode_ax25_ui_frame, encode_ui_frame as encode_ax25_ui_frame,
validate_address as validate_ax25_address, Ax25KissFactory,
};
#[cfg(feature = "iface-backbone")]
pub use interface::backbone::{
BackboneClientConfig, BackboneClientInterfaceFactory, BackboneConfig, BackboneInterfaceFactory,
};
#[cfg(feature = "iface-i2p")]
pub use interface::i2p::{I2pConfig, I2pFactory};
#[cfg(feature = "iface-ax25-kiss")]
pub use interface::kiss_iface::Ax25Address;
#[cfg(feature = "iface-kiss")]
pub use interface::kiss_iface::{KissFactory, KissIfaceConfig};
#[cfg(feature = "iface-local")]
pub use interface::local::{
LocalClientConfig, LocalClientFactory, LocalServerConfig, LocalServerFactory,
};
#[cfg(feature = "iface-pipe")]
pub use interface::pipe::{PipeConfig, PipeFactory};
pub use interface::registry::InterfaceRegistry;
#[cfg(feature = "iface-rnode")]
pub use interface::rnode::{RNodeConfig, RNodeFactory, RNodeMultiFactory, RNodeSubConfig};
#[cfg(feature = "iface-serial")]
pub use interface::serial_iface::{SerialFactory, SerialIfaceConfig};
#[cfg(feature = "iface-tcp")]
pub use interface::tcp::{TcpClientConfig, TcpClientFactory};
#[cfg(feature = "iface-tcp")]
pub use interface::tcp_server::{TcpServerConfig, TcpServerFactory};
#[cfg(feature = "iface-udp")]
pub use interface::udp::{UdpConfig, UdpFactory};
#[cfg(all(feature = "iface-weave", target_os = "linux"))]
pub use interface::weave::{
parse_device_frame as parse_weave_device_frame, WdclFrame, WeaveConfig, WeaveFactory,
WeaveInput, WeaveLogFrame, WeavePeerState, WeaveState,
};
pub use interface::{install_socket_protector, SocketProtector, SocketProtectorGuard};
pub use interface::{
InterfaceConfigData, InterfaceFactory, StartContext, StartResult, SubInterface,
};
pub use link_manager::{LinkManager, LinkManagerAction, RequestFailure, RequestResponse};
pub use management::ManagementConfig;
pub use node::{ChannelSendError, IfacConfig, InterfaceConfig, NodeConfig, RnsNode, SendError};
#[cfg(feature = "hooks")]
pub use provider_bridge::{
HookProviderEventEnvelope, OverflowPolicy, ProviderBridge, ProviderBridgeConfig,
ProviderEnvelope, ProviderMessage,
};
pub use resource::{
ReceivedResourceFile, ResourceReceiveMode, ResourceTransferError, ResourceTransferId,
};
pub use rpc::{RpcAddr, RpcClient, RpcServer};
pub use serial::Parity;
#[cfg(feature = "iface-local")]
pub use shared_client::SharedClientConfig;
pub use storage::{
FsRatchetStore, KnownDestination, RatchetCleanupStats, RatchetEntry, RatchetStore, StoragePaths,
};
pub use rns_core::constants::{
MODE_ACCESS_POINT, MODE_BOUNDARY, MODE_FULL, MODE_GATEWAY, MODE_INTERNAL, MODE_POINT_TO_POINT,
MODE_ROAMING,
};
pub use rns_core::link::TeardownReason;
pub use rns_core::transport::types::InterfaceId;
pub use rns_core::types::{
DestHash, DestinationType, Direction, IdentityHash, LinkId, PacketHash, ProofStrategy,
};
#[cfg(test)]
mod test_support;
#[cfg(test)]
mod module_initialization_tests {
#[test]
fn profiler_is_available_from_the_crate_root_without_late_imports() {
let sample = crate::profiling::profile("entry117.crate-root");
drop(sample);
assert_eq!(
crate::profiling::results()["entry117.crate-root"]
.stats_all
.count,
1
);
}
}