Files
ferrix/crates/server/src/lib.rs
T
Rayhaan JaufeerallyandClaude Fable 5.1 0829f873f2 Server: the long functions in named steps
Five functions did several things each in one body of 120 to 190 lines.
Each is now a list of steps with a name and a doc comment of their own,
with nothing changed in what they do:

- run_session: hold_down_after, keep_for and release_routes.
- Session::establish: session_handle, validation and route_source. A
  session keeps the peer's settings as one PeerSettings rather than
  eight fields copied out of it one by one; the sweeps' two channel ends
  are named fields, not .0 and .1; whether the peer can be asked to send
  its routes again is a bool, not a copy of the families.
- Fsm::on_open: negotiate_role and negotiate_add_path.
- BgpServer::run: log_startup and spawn_tasks.
- Config::from_proto: parse_listen_endpoints, parse_peers, check_roles,
  parse_originate and Ours::tell_peers, with the three per-peer defaults
  in one PeerDefaults.
- Egress::outgoing: may_go, rewrite and next_hop_for.
- Exporter::follow: Learned::drain, judge and flush, with the three
  things called "announced" told apart (own_announced, learned.announced,
  batches) and the verdicts given a type.

The hold-downs are a module of their own, holddown.rs; policy.rs is
about policy again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 11:32:20 +02:00

29 lines
445 B
Rust

pub mod address;
pub mod advertise;
pub mod collision;
pub mod config;
mod connection;
mod dialer;
pub mod error;
pub mod export;
pub mod family;
mod fsm;
pub(crate) mod holddown;
pub mod marks;
pub mod metrics;
mod panic;
pub mod policy;
mod reach;
pub mod refusals;
pub mod restart;
mod routes;
pub mod rpki;
pub mod server;
pub mod session;
mod sync;
mod throttle;
pub mod proto {
include!(concat!(env!("OUT_DIR"), "/protos/mod.rs"));
}